CVS-2-2 NMApplet empty bar explained



Wireless drivers report two types of quality information: results for an associated AP and a list of results for scanned AP's. These results are reported using

struct iw_quality
{
    uint8 qual;
    uint8 level;
    uint8 noise;
}

Unfortunately, as Dan pointed out in

http://www.redhat.com/archives/fedora-devel-list/2004-September/msg00767.html

drivers don't report the data in the same way for associated AP and scanned AP's. As an example, consider ipw2200-1.0.0 and NM CVS-2-2 on my T42, with these structures printed from NetworkManagerDevice.c. This is my home network with only one SMC AP in the scan list.

Feb 3 23:58:45 localhost NetworkManager: Activation (eth1) successful, device activated.

First, look at the results for the associated AP.

Feb 3 23:58:47 localhost NetworkManager: nm_device_update_signal_strength stats.qual.qual=76 Feb 3 23:58:47 localhost NetworkManager: nm_device_update_signal_strength stats.qual.level=203 Feb 3 23:58:47 localhost NetworkManager: nm_device_update_signal_strength stats.qual.noise=175

These same values show up in /proc/net/wireless

Inter-| sta-| Quality | Discarded packets | Missed | WE face | tus | link level noise | nwid crypt frag retry misc | beacon | 17
 eth1: 0000   76.  203.  175.       0      0      0      0      0        0

and in the output of iwconfig

Link Quality=79/100  Signal level=-53 dBm  Noise level=-81 dBm

The iwconfig level and noise values in dBm are obtained by substracting 256 from the unsigned values [0 - 255] in the proc file and NM output. dBm is a measure of power.

The 79 is an RSSI value and 100 is RSSI_MAX. A quality percentage can be computed as

(100 * RSSI) / RSSI_MAX

Some drivers provide a lookup table to convert from dBm to RSSI along with RSSI_MAX. The ipw2200 driver does not do this. Instead, it originally used a linear model to convert from dBm to RSSI but the developers have accepted a more accurate quadratic model I submitted. I based by model on matching the percentages reported by the Windows XP driver for this card. That was the only thing I could think to do.

Now look at the results for the scanned AP's (list of one here). qual and noise are reported as 0. This is why the CVS-2-2 NMApplet bar is empty for the ipw2200 driver. NM uses the qual value of zero to create the bar length. We can convert the level of 198 to -58 dBm but NM has no idea how ipw2200 would convert this into a percentage. to make matters worse the dBm range varies from driver to driver. We are stuck. There is no way the NM nm_wireless_qual_to_percent function can deal with this. A new nm_wireless_level_to_percent function could be created to do this conversion but it would be guess work at best and impossible to normalize across all drivers.

Feb 3 23:58:50 localhost NetworkManager: nm_device_wireless_process_scan stats.qual.qual=0 Feb 3 23:58:50 localhost NetworkManager: nm_device_wireless_process_scan stats.qual.level=198 Feb 3 23:58:50 localhost NetworkManager: nm_device_wireless_process_scan stats.qual.noise=0

So what to do . . .

--
Bill Moss
Professor, Mathematical Sciences
Clemson University




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]