在 NodeMCU ESP8266 中使用 MicroPython 的 RSSI 值

RSSI value using MicroPython in NodeMCU ESP8266

如何使用MicroPython获取连接到我的NodeMCU设备WiFi的WLAN设备的RSSI值?实际上,我尝试了以下代码,但出现错误:

>>> 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'

不知道如何获取网络的RSSI值

来自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)