How to get RSSI in a linux AP (iw station dump doesn't work)
<p>I'm trying to measure the RSSI from a station connected to my AP which is running OpenWRT. I know that by using <strong>iw wlan0 station dump</strong> or <strong>iw wlan0 station get [MAC]</strong>, I should be able to see it. Though for some reason it doesn't show the RSSI on my AP. </p>

<p>Here is the output that I get:</p>

<pre><code>~# iw wlan0 station get 40:b0:fa:c1:75:41

Station 40:b0:fa:c1:75:41 (on wlan0)
inactive time:  75 ms
rx bytes:   17588
rx packets: 134
tx bytes:   10771
tx packets: 76
tx retries: 3
tx failed:  0
tx bitrate: 6.0 MBit/s
rx bitrate: 6.0 MBit/s
authorized: yes
authenticated:  yes
preamble:   short
WMM/WME:    yes
MFP:        no
TDLS peer:  no
</code></pre>

<p>I'm running <strong>hostapd</strong> and <strong>dnsmasq</strong>. Any ideas of how I can get the RSSI? Maybe somehow in C?</p>

<p>Thanks!</p>

<p><strong>UPDATE</strong></p>

<p>I was checking the code of iw, and for some reason NL80211_STA_INFO_SIGNAL comes up NULL - If anyone has an idea of why this could be happening, would be a great help!</p>

<p><strong>UPDATE 2</strong></p>

<p>Apperently the source of iw in the project I was working was changed and the line with the RSSI for some reason has been commented. This change has never been documented. Thank you for everyone that answered this question.</p>