From: Christopher Piggott <cpiggott@gmail.com>
To: linux-wireless@vger.kernel.org
Subject: getting back QUALITY
Date: Mon, 23 Aug 2010 12:03:21 -0400 [thread overview]
Message-ID: <AANLkTin=gfXmomRa2UnMfn1WaG_2PJc53m1mi8Q-6vpJ@mail.gmail.com> (raw)
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
reply other threads:[~2010-08-23 16:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTin=gfXmomRa2UnMfn1WaG_2PJc53m1mi8Q-6vpJ@mail.gmail.com' \
--to=cpiggott@gmail.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).