2

I noticed when I run iwlist wlan1 scan I sometimes get lines like this:

Quality=0/100  Signal level=62/100

But other times I get lines like this:

Quality:0  Signal level:0  Noise level:0

Why does the second example use : instead of =?

Is the colon only used if iwlist failed to get the values?

3
  • Not an answer, but try iw wlan1 scan or iw wlan1 scan dump (doesn't do a new scan) instead - it will have a consistent format.
    – dirkt
    Nov 29, 2017 at 15:19
  • @dirkt I don't know why but my target device doesn't seem to work with iw I get back No such device (-19). The device has iw version 3.4. I think it might be that the interface doesn't support the nl80211 driver but I'm not sure. (using RTL8188 wireless chip) Nov 29, 2017 at 15:24
  • My USB WLAN adapter is also not recognised by iw. That "new" tool (since when already?) doesn't seem to be stable or reliable yet, so iwlist is the way to go, really.
    – ygoe
    Aug 12, 2020 at 19:10

1 Answer 1

4

In principle it seems that your basic premise is correct

The interface for wireless tools for linux is at

cat /proc/net/wireless

and gives your basic parameters including link/level/noise

Inter-| sta-|   Quality        |   Discarded packets               | Missed | WE
 face | tus | link level noise |  nwid  crypt   frag  retry   misc | beacon | 22
wlan0: 0000   66.  -44.  -256        0      0      0      0      0        0

and if there is a viable connection with traffic then more data regarding the link and traffic is at

cat /proc/net/dev
Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
    lo:  442540    7574    0    0    0     0          0         0   442540    7574    0    0    0     0       0          0
 wlan0: 11837166   18597    0    0    0  5272          0         0  2650725   18388    0    0    0     0       0          0

So if iwlist sees 0/0/0 for link/level/noise in /proc/net/wireless it just reports them and doesn't process any data from there or /proc/dev/net for the other statistics.

It may also help to understand that

Quality=0/100

is the link quality (the proportion of correctly received packets) while

Quality:0

Is some measure of signal quality (/proc/net/wireless) reported from your card.

Same word, different usage.

I looked all that up because of your question, but couldn't find the source code for iwlist to double check. Thanks for the education.

2
  • 1
    Thanks lots of interesting information, still reading. I think this might be the source code for iwlist you mentioned at the end: github.com/HewlettPackard/wireless-tools/blob/master/… Nov 29, 2017 at 16:18
  • I think I learn more from other peoples questions than my own. Well observed question by the way. I'd ever noticed that until you pointed it out.
    – bu5hman
    Nov 29, 2017 at 16:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .