Any way to get RSSI of existing connection without scan?
-
Is there any way of getting the RSSI of the connected router? I know its returned in a scan but I've found that starting a scan can often cause my WiPy 2.0 to hang indefinitely until power cycled. It would be nice if there was a WLAN.rssi() function or if it was returned with the ssid in WLAN.ssid().
-
This post is deleted!
-
While the official MicroPython has "wlan.status('rssi')" to to retrieve the RSSI of the AP signal (when you are in STA mode connect to the AP), Pycom firmware >= 1.20.0.rc0](https://forum.pycom.io/topic/4099/new-firmware-release-candidate-v1-20-0) has a new function :
wlan.joined_ap_info()
Returns a tuple with (bssid, ssid, primary channel, rssi, Authorization method, wifi standard used) of the connected AP in case of STA mode.Tested it with firmware 1.20.0.rc4 on LoPy4 and it works.
So no need to call 'wlan.scan()' when there is already a connection to an access point.Also note that the same firmware 1.20.0.rc0 brings new features (for example, to filter by ssid or bssid) to 'wlan.scan' :
wlan.scan([ssid=NULL, bssid=NULL, channel=0, show_hidden=False, type=WLAN.SCAN_ACTIVE, scantime=120ms])"
-
@mfallavol I would like a way to do this also, as well as see signal strength of all available carriers before connecting. Currently I'm just doing LTE.disconnect(), then sending AT+CSQ to the modem, and reconnecting. In newer firmwares I could use LTE.pppsuspend() and LTE.pppresume(). A better method would be great to have.
EDIT: I just reread your post and you're talking about WiFi, but the same applies for LTE, which is my application.
-
Exactly the same question... I have a sensor and want it to publish the Wifi RSSI along with other measurement data. How do I read it (except for using the scan)?