Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Aug 2005 13:29:42 -0700
From:      Sam Leffler <sam@errno.com>
To:        Sam Pierson <samuel.pierson@gmail.com>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: Atheros driver and radiotap reliability
Message-ID:  <4314C1B6.4070204@errno.com>
In-Reply-To: <d9204e4c05083011405830aae4@mail.gmail.com>
References:  <d9204e4c050829120713734e3d@mail.gmail.com>	<4313A2EC.5070300@errno.com>	<d9204e4c05083010171fa6cfc9@mail.gmail.com>	<4314A65C.4070802@errno.com> <d9204e4c05083011405830aae4@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Sam Pierson wrote:
> On 8/30/05, Sam Leffler <sam@errno.com> wrote:
> 
>>David appears to be talking about how netbsd works.  Understand that
>>David does not work on FreeBSD; I'm not even sure he uses it.
> 
> ...
> 
>>tcpdump and ethereal get the same data.  If they display it differently
>>given identical data then one is wrong.  If you have an example of where
>>things are wrong please present it.
> 
> I tried and it looks like everything is being displayed correctly and that
> tcpdump and ethereal are displaying the same values.  The only reason
> I said they looked different is that in the morning when I examined a
> few hundred frames with ethereal, the values were consistently 10dB 
> lower than what I had observed through tcpdump.  I'm very glad that
> they are displaying the same values now though.

I'll try to verify this but I've never seen things look wrong.  If in 
doubt save to a file and replay from file using both tools.

> 
> 
>>>*it*, referring to the rssi value above?
>>
>>"it" = ds->ds_rxstat.rs_rssi which is the value returned by the hardware.
> 
> 
> Alright, it makes much more sense now.  You said earlier that we can use
> the RSSI value and correspond each unit to ~.5dBm above the noise
> floor.  I didn't see anything being passed through the hardware which
> records the noise on that same per packet basis, but I can get ahold
> of the average noise floor for the environment.  Will this affect the 
> accuracy of the measurements to the point where they will be 
> significantly skewed?  

Getting and interpreting the current noise floor is the issue.  I was 
wrong about .5dBm, was thinking of txpower which is done in .5 units. 
The following comment from the linux code describes how things work in 
principle:

/*
  * Units are in db above the noise floor. That means the
  * rssi values reported in the tx/rx descriptors in the
  * driver are the SNR expressed in db.
  *
  * If you assume that the noise floor is -95, which is an
  * excellent assumption 99.5 % of the time, then you can
  * derive the absolute signal level (i.e. -95 + rssi).
  * There are some other slight factors to take into account
  * depending on whether the rssi measurement is from 11b,
  * 11g, or 11a.   These differences are at most 2db and
  * can be documented.
  */

The last bit about differences being minimal isn't quite correct; to 
dtrt you need to collect the noise floor on all channels and then 
correlate data.  As I've said previously converting the units used 
internally by the h/w to physical units requires knowledge of things 
like the PA circuitry.  Some vendors (e.g. Cisco) do this in their 
software but since we don't know what card you're using or how it's been 
constructed there's no way to do this in general.

> 
> (Thanks for the help, again, it seems like there isn't a lot of information
> out there regarding these topics)

Information is in the code.

	Sam



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4314C1B6.4070204>