How do I list the RSSI (strength) of the Wi-Fi SSID I'm connected to?
-
- Posts: 83
- Joined: Mon Mar 20, 2017 10:22 pm
How do I list the RSSI (strength) of the Wi-Fi SSID I'm connected to?
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.
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.
-
- Posts: 83
- Joined: Mon Mar 20, 2017 10:22 pm
Re: How do I list the RSSI (strength) of the Wi-Fi SSID I'm connected to?
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?
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
sc
-
- Posts: 83
- Joined: Mon Mar 20, 2017 10:22 pm
Re: How do I list the RSSI (strength) of the Wi-Fi SSID I'm connected to?
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.
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?
I can not check just now, but do you have access to the WIFI's routers MAC addresses?
-
- Posts: 83
- Joined: Mon Mar 20, 2017 10:22 pm
Re: How do I list the RSSI (strength) of the Wi-Fi SSID I'm connected to?
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?
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.BetterAutomations wrote:On my own personal router yes, on my customer's router no.
I can not check my ESP8266 now. Out of home.
-
- Posts: 83
- Joined: Mon Mar 20, 2017 10:22 pm
Re: How do I list the RSSI (strength) of the Wi-Fi SSID I'm connected to?
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?
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')
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect("your_ssid")
you can get the rssi from:
wlan.status('rssi')
- Hasenradball
- Posts: 15
- Joined: Tue May 21, 2019 12:52 pm
- Location: Germany
- Contact:
Re: How do I list the RSSI (strength) of the Wi-Fi SSID I'm connected to?
Hello,
do I get the RSSI by wlan.status('rssi') only when I am connected?
do I get the RSSI by wlan.status('rssi') only when I am connected?