Page 1 of 1

How do I list the RSSI (strength) of the Wi-Fi SSID I'm connected to?

Posted: Thu Apr 13, 2017 1:41 pm
by BetterAutomations
I've got a successful connection to my router using STA mode. How do I list the RSSI strength of my connection?

I had thought to do another scan and list out the RSSI from there, but that's slow. (Speed is important; I'm building a web GUI for a product to sell.) Further, sometimes there are multiple routers with the same SSID ('xfinitywifi' for example) so I want to look only at the router I'm connected to.

Re: How do I list the RSSI (strength) of the Wi-Fi SSID I'm connected to?

Posted: Fri Apr 14, 2017 12:39 pm
by BetterAutomations
I gather by the lack of response and also by some Googling around that this is not possible. I'll just do it as I proposed: Scan all networks and pull out my SSID. Where there are multiple matches I'll use the strongest one. I may do a scan at boot up and cache the results then refer back to them as needed. Since my product will be stationary the RSSI won't change much.

Re: How do I list the RSSI (strength) of the Wi-Fi SSID I'm connected to?

Posted: Sat Apr 29, 2017 5:52 pm
by skeatz
After you have activated station mode, do a scan, e.g. wlan.scan(). The signal strength is one of the fields returned. If you are interested in the wifi signal strength for a specific ssid, write a loop to check for matching ssid, then extract the signal strength for that ssid.

sc

Re: How do I list the RSSI (strength) of the Wi-Fi SSID I'm connected to?

Posted: Sun Apr 30, 2017 3:33 pm
by BetterAutomations
The down side of this method is when there are multiple APs with the same SSID such as xfinitywifi. I'm going to just choose the strongest one since that's the one most likely to be connected.

Also this method is slow. I'll just grab the list once and refer back to it later since my device will be stationary and not likely to change.

Re: How do I list the RSSI (strength) of the Wi-Fi SSID I'm connected to?

Posted: Thu May 11, 2017 7:31 am
by jcea
I can not check just now, but do you have access to the WIFI's routers MAC addresses?

Re: How do I list the RSSI (strength) of the Wi-Fi SSID I'm connected to?

Posted: Thu May 11, 2017 8:07 am
by BetterAutomations
On my own personal router yes, on my customer's router no.

Re: How do I list the RSSI (strength) of the Wi-Fi SSID I'm connected to?

Posted: Thu May 11, 2017 4:02 pm
by jcea
BetterAutomations wrote:On my own personal router yes, on my customer's router no.
I am talking about the ESP8266 knowing the MAC of the router which it is connected to via WIFI. If the code has access to that information (the MAC of the currently connected router), you could filter the wifi scan.

I can not check my ESP8266 now. Out of home.

Re: How do I list the RSSI (strength) of the Wi-Fi SSID I'm connected to?

Posted: Sat May 13, 2017 4:27 pm
by BetterAutomations
That would be a clever workaround but I don't see anywhere that I can get the MAC of the router I associate with.

Re: How do I list the RSSI (strength) of the Wi-Fi SSID I'm connected to?

Posted: Mon Oct 29, 2018 8:31 pm
by kamkalian
if you are connected with:
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect("your_ssid")

you can get the rssi from:
wlan.status('rssi')