Quality wstats.


From: Jordi Murgo (jordi_at_lleida.com)
Date: 2002-04-05 12:10:42 UTC



After some hours of hacking, I have found the correct method to translate RID_COMMSQUALITY values to the dBm equivalence.

dBm = (RID_COMSQUALITY_SIGNAL * 100 / 255) - 100;

I have contrasted dBm values with dBm values reported by another orinoco_cs card in the same laptop, ap, distance and position.

This isn't 100% accurate, but it's better than nothing.

Sample code implemented on my prism2_get_wireless_stats():

/* get the qualitity settings from the RID and return them

/* Update wireless signal stats. 20020402 - jordi_at_lleida.com */

if (local->iw_mode != IW_MODE_MASTER && len > 0) {
    local->wstats.qual.qual = __le16_to_cpu(qual.quality);
    local->wstats.qual.level = 0x100 + ( __le16_to_cpu(qual.signal) *
100 / 255 ) - 100;

    local->wstats.qual.noise = 0x100 + ( __le16_to_cpu(qual.silence) * 100 / 255 ) - 100;

    local->wstats.qual.updated = 7;
} else {

    local->wstats.qual.qual = 0;
    local->wstats.qual.level = 0;
    local->wstats.qual.noise = 0;
    local->wstats.qual.updated = 0;

}

Some documents around the net talk about RIDs 0xFD51, 0xFD52 or 0xFD53, teorically named DBMCOMMSQUALITY, but my fw 0.8.3 does not recognize those RIDs. Does anyone have Intersil's official info about ?

BTW all this work are done to run a nice GNOME applet (wireless monitor), created by a friend. It's available at http://polakilandia.org/gwlan-0.3.tar.gz

Salut, <jordi/>

-- 
Jordi Murg� i Ambou
Internet Web Serveis, S.L.
Lleida / Catalonia / Spain
Tfn: +34-973234106


This archive was generated by hypermail 2.1.4.