0

I'm doing a project regarding RSSI and I have to retrieve the signal level of a particular WiFi SSID that I'm working on using linux command line.

I've made use of iwlist scanning command but I just couldn't get it to display the values that I want by using grep to print only the SSID name, Quality and Signal Level.

Commands that I've tried that didn't gave me the results I wanted:

  1. iwlist INTERFACE scanning essid SpecificESSID | grep Signal

  2. iwlist INTERFACE scanning essid SpecificESSID | grep ESSID,Signal

  3. iwlist INTERFACE scan | grep 'ESSID:"SpecificESSID"\|Signal level' - This almost worked but it displayed other networks signal level as well and i only need one specific network information.

2

First, iwlist is the old command, there's the newer iw command with more features.

If the "SSID you are working on" is the access point (AP) you are currently connected to, use

iw wlan0 station dump

pick the value(s) you are interested in (say, average signal strength), and then something like

iw wlan0 station dump | grep 'signal avg:'

For the currently connected AP, you actually have more detailed information than for all APs.

If you want signal strength for all visible APs, do something like

iw wlan0 scan | egrep 'SSID|signal'

You can post-process this for SSIDs you are interested in. Say you want SSID1 and SSID2, then you can do

iw wlan0 scan | egrep 'SSID|signal' | egrep -B1 'SSID1|SSID2'

The -B1 displays the line before the match, because in the scanning output, the signal strength comes before the SSID.

  • Thanks for guiding me. The last command helped and saved me all the troubles from looking around the web aimlessly. – Terence Chew Mar 29 '18 at 5:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.