2010-08-23 16:03:22

by Christopher Piggott

[permalink] [raw]
Subject: getting back QUALITY

Hi,

I notice that through wpa_supplicant I can see noise, quality, and
signal strength ... but in my own app I can only see signal strength
in my netlink application. This is in response to a request for scan
results. I am able to retrieve the station's SSID out of the
NL80211_BSS_INFORMATION_ELEMENTS attribute, and I get a DBM signal
that makes sense.



nlattr *dbm_ptr = bss[NL80211_BSS_SIGNAL_MBM];
if (dbm_ptr == NULL) {
cout << "NO RSSI" << endl;
} else {
int dbm = nla_get_u32(dbm_ptr);
cout << "DBM: " << dbm << endl;
}

nlattr *quality_ptr = bss[NL80211_BSS_SIGNAL_UNSPEC];
if (quality_ptr == NULL) {
cerr << "NO QUALITY" << endl;
} else {
int quality = (int) nla_get_u8(quality_ptr);
cout << "QUALITY: " << (quality/100.0f) << endl;
}

I get "NO QUALITY" out of the above, yet wpa_supplicant tells me
"Quality=29/70" (or similar).

Is this actually a calculated parameter, and BSS_SIGNAL_UNSPEC isn't
really reported by the driver?

--Chris