Page 1 of 1
Wlan.scan()
Posted: Tue Mar 31, 2020 9:39 pm
by giants
Hi there!
When i use wlan.scan() for check the wireless networks i receve back a string with all’ networks, my problem is how i can exstrapolate the data ?
Thank you
Sergio
Re: Wlan.scan()
Posted: Tue Mar 31, 2020 10:58 pm
by jimmo
Hi,
Sorry I'm not sure what you mean by "extrapolate the data".
scan returns a list of tuples. Each tuple is (according to the docs) (ssid, bssid, channel, RSSI, authmode, hidden).
So for example, you can use Python's tuple unpacking:
Code: Select all
x = sta_if.scan()
for result in x:
ssid, bssid, channel, RSSI, authmode, hidden = x
print(ssid)
Re: Wlan.scan()
Posted: Wed Apr 01, 2020 9:05 am
by giants
Hi
yes that is what i mean thank you soo much. Your code gave me one error but i sobstitute result with x and now wok
Have a wonderful day
Sergio