0

How to get the RSSI value of the WLAN device connected to WiFi of my NodeMCU device using MicroPython? Actually I tried the following code but I'm getting an error:

>>> sta_if.ifconfig()         
('192.168.1.103', '255.255.255.0', '192.168.1.1', '192.168.1.1')

>>> sta_if.rssi()        
Traceback (most recent call last):        
  File "<stdin>", line 1, in <module>        
AttributeError: 'WLAN' object has no attribute 'rssi'

I don't know what I should do to get the RSSI value of the network.

dda
  • 6,030
  • 2
  • 25
  • 34
Jagdish Chauhan
  • 129
  • 1
  • 10

1 Answers1

1

From the WLAN class documentation:

wlan.scan()

Scan for the available wireless networks.

Scanning is only possible on STA interface. Returns list of tuples with the information about WiFi access points:

(ssid, bssid, channel, RSSI, authmode, hidden)

nekomatic
  • 5,988
  • 1
  • 20
  • 27