tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: NetBSD volunteering (WiFi browser, NPF Web UI)
On Mon, May 18, 2015 at 04:04:33PM +0100, Roy Marples wrote:
> On 18/05/2015 14:56, Roy Marples wrote:
> > On 18/05/2015 12:22, Pierre Pronchery wrote:
> >> On 18/05/2015 13:16, Roy Marples wrote:
> >>> On 17/05/2015 23:14, Pierre Pronchery wrote:
> >>>> @roy: any screenshots available for dhcpcd-ui?
> >>>
> >>> Just added one to the project page:
> >>> http://roy.marples.name/projects/dhcpcd-ui/home
> >>>
> >>> Sadly on my iwn(4) interface wpa_supplicant doesn't show anything useful
> >>> with the signal strength which is why they are all at max.
> >>
> >> Have you tried this patch from jakllsch?
> >> http://git.edgebsd.org/gitweb/?p=edgebsd-src.git;a=commitdiff;h=9e6eccb2f22dfe2c2b202ddf7df13b19566ff8d6
> >>
> >> http://cvsweb.netbsd.org/bsdweb.cgi/src/external/bsd/wpa/dist/src/drivers/driver_bsd.c.diff?r1=1.8&r2=1.9&f=h
> >
> > The laptop is running a very recent -current, so yes.
> > The numbers returned range from 85, which is hardly reachable from my
> > windows pc sat next to the laptop up to 106 where the AP is just next
> > door and windows gives that 5 bars.
> >
> > My code which handles the numbers is similar to other wifi strength
> > meters - if <0 then assume dBM and convert to a percentage otherwise
> > assume the number IS a percentage. As it's over 100 we can assume the
> > number returned is neither a percentage nor a dBM value - what should we
> > do then?
> >
> > My other laptop uses a iwi(4) interface which showed much better signals
> > on NetBSD, but sadly the laptop itself is pretty non functional atm.
>
> A quick look at our sources shows that rssi is uint8_t whereas it should
> be int8_t.
> Looking into the iwn driver itself, it thinks that rssi should be dBm,
> and right away wpa_supplicant now reports -22 (my strong AP) to -40 the
> weakest AP after making the above change. But those numbers should be
> around -55 to -90 instead. So while it's better, it's still far from
> correct.
Some WLAN adapters report as a WLAN frame's RSSI a function of the gain
level set by the automatic gain control (AGC) loop while it received
the frame's preamble. Typically the gain level, g, is the final value
written by AGC to the digital-to-analog converter (DAC) that controls
the Rx amplifier. For n = 6, 7, or 8, depending on the DAC resolution,
g is in 0..2^n-1.
The RSSI reported by some drivers is the simplest function of the
adapter's RSSI such that greater RSSI actually indicates greater signal
strength! For example, rssi(driver) = 255 - gain level. Consequently,
the numbers are unitless, and it's difficult or impossible to predict
a priori the narrowest range of possible RSSI.
Incidentally, the RSSI is sometimes assumed to be base-10 logarithmic.
Radiotap assumes that, just for example. That may not be a justifiable
assumption!
The most you can usually say about two RSSI from the same adapter is
that the higher one indicates a higher signal strength at the spot where
the measurement was taken. It is hard to be more specific unless you
or your adapter's maker have taken pains to document and calibrate the
RSSI.
The upshot of all this is that RSSI may be somewhat useful to put access
points into order from highest to lowest signal strength. It is less
useful for making quantitative comparisons in bars, percents, decibels,
or whatever unit you prefer. I wouldn't count on it as an absolute
measurement of anything unless you have performed your own calibration.
Dave
--
David Young
dyoung%pobox.com@localhost Urbana, IL (217) 721-9981
Home |
Main Index |
Thread Index |
Old Index