2017-04-19 9 views
0

MicroPython을 사용하여 NodeMCU 장치의 WiFi에 연결된 WLAN 장치의 RSSI 값을 얻는 방법은 무엇입니까? 실제로 다음 코드를 시도했지만 오류가 발생했습니다.NodeMCU에서 MicroPython을 사용하는 RSSI 값 ESP8266

>>> 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에서

답변

1

:

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)