How to find out the wifi sensitivity (RSSI)
There are 2 commands you can use that can give you the RSSI value.
You can first cat /proc/net/wireless
file and get the results there. This uses the least amount of resources of the 2 methods
$ /bin/cat /proc/net/wireless
Inter-| sta-| Quality | Discarded packets | Missed | WE
face | tus | link level noise | nwid crypt frag retry misc | beacon | 22
wlo1: 0000 70. -31. -256 0 0 0 0 25 0
The other alternative is to use iwconfig/iwlist
(my wireless interface is wlo1, so replace with the appropriate interface name)
$ /sbin/iwconfig wlo1
wlo1 IEEE 802.11 ESSID:"COD PUBLIC WIRELESS"
Mode:Managed Frequency:5.745 GHz Access Point: 40:E3:D6:63:BC:B0
Bit Rate=866.7 Mb/s Tx-Power=22 dBm
Retry short limit:7 RTS thr:off Fragment thr:off<br>
Power Management:on
Link Quality=67/70 Signal level=-43 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:27 Missed beacon:0
$ iwlist wlo1 scanning
wlo1 Scan completed :
Cell 01 - Address: 40:E3:D6:63:BC:B0
Channel:149
Frequency:5.745 GHz
Quality=70/70 Signal level=-38 dBm
Encryption key:off
ESSID:"COD PUBLIC WIRELESS"
Bit Rates:12 Mb/s; 24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s
Mode:Master
Extra:tsf=00000075dccaa121
Extra: Last beacon: 81624ms ago
IE: Unknown: 0013434F44205055424C494320574952454C455353
IE: Unknown: 010598B048606C
IE: Unknown: 030195
IE: Unknown: 2D1AEF091BFFFFFFFF00000000000000000000000000000000000000
IE: Unknown: 3D1695050400000000000000000000000000000000000000
IE: Unknown: 4A0E14000A002C01C800140005001900
IE: Unknown: 7F080100080000000040
IE: Unknown: BF0CB1798B33AAFF0000AAFF0000
IE: Unknown: C005019B000000
IE: Unknown: DD180050F2020101800003A4000027A4000042435E0062322F00
The iwlist
and iwconfig
are part of wireless tools which is now deprecated.
You can list your devices with iw dev
You can get the rssi value of your current link when using WiFi station as follows (wlan0 is the usual default wi-fi device, but depends on the driver and configuration):
$ iw dev wlan0 link
Connected to 9c:4e:20:c8:ee:9e (on wlan0)
SSID: CORP1
freq: 5240
RX: 7306266 bytes (6124 packets)
TX: 776491 bytes (4117 packets)
signal: -75 dBm
tx bitrate: 39.0 MBit/s MCS 4
To list available WiFi signals:
$ ip link set wlan0 up
$ iw dev wlan0 scan
...
BSS 9c:4e:20:c8:ee:9d(on wlan0)
TSF: 0 usec (0d, 00:00:00)
freq: 5240
beacon interval: 102 TUs
capability: ESS Privacy RadioMeasure (0x1011)
signal: -75.00 dBm
last seen: 765 ms ago
SSID: CORP1
...