How to lists available APs included MAC on Micropython likes AT instruction set "AT+CWLAP" ?
I use ">>> sta_if.scan()" to lists available APs is not included MAC.
Thanks.
How to lists available APs include MAC on Micropython ?
Re: How to lists available APs include MAC on Micropython ?
Is there no BSSID entry in the second position as per https://docs.micropython.org/en/latest/ ... twork.scan ?
Apparently BSSID corresponds with MAC address of the Access point.
On my ESP8266 I get...
It might look more familiar as a Mac address if you do this...
Apparently BSSID corresponds with MAC address of the Access point.
On my ESP8266 I get...
Code: Select all
>>> import network
>>> nic = network.WLAN(network.STA_IF)
>>> nic.active(True)
mode : sta(a0:20:a6:06:d8:8e) + softAP(a2:20:a6:06:d8:8e)
#5 ets_task(4020ed88, 28, 3fff9fa0, 10)
add if0
>>> nic.scan()
scandone
[(b'SkyHome', b'H\x8d6\xdc\x16\\', 1, -50, 4, 0), (b'SKYA3BC9', b'\x90!\x06\xc9)\xf1', 1, -84, 3, 0), (b'PS4-63E5C4F1030A', b'\xec\x0e\xc4\xccaG', 6, -93, 3, 0), (b'BTHub6-G29T', b'\xac\x84\xc9\xb0g\xb6', 6, -92, 3, 0), (b'BTWifi-with-FON', b'\xae\x84\xc9\xb0i\xb7', 6, -93, 0, 0), (b'BTWifi-X', b'\xae\x84\xc9\xb0i\xb4', 6, -90, 5, 0), (b'SKY56CDC', b'\x90!\x06\xaai\xf9', 1, -91, 3, 0)]
Code: Select all
>>> bssid = b'H\x8d6\xdc\x16\\'
>>> print(":".join([hex(b)[2:] for b in bssid]))
48:8d:36:dc:16:5c
Re: How to lists available APs include MAC on Micropython ?
MAC same as BSSID ,Unexpectedly.
Thanks.
Thanks.