Scan Wifi program not working, Need help figuring out
Posted: Thu Dec 15, 2016 9:02 pm
I found somewhere on this forum a way to scan the available networks, but I think it was written before V3 was available. I went over it as much as I could to try and convert it to work using V3.65 but for the life of me can't seem to get the dropdown list to work properly. I added a serialprint to see what the list should have in it, and it seems like good data, but I can't seem to get them to list in the dropdown. Can you take a look and recommend where I am not getting it? Thanks in advance!!!!
Code: Select all
memclear
cls
button "Set Wifi Settings", [WifiSettings]
button "End Program", [endprog]
wprint "<br> <br>"
wait
[WifiSettings]
listWifis$ = ""
n = wifi.scan()
n = n - 1
wprint "Number of network found = "
wprint n
for x = 1 to n
listWifis$ = listWifis$ & wifi.ssid(x)
listWifis$ = listWifis$ & ","
next x
serialprint listWifis$
wprint "<br>Select SSID: "
dropdown listWifis$, selectedWifi
wprint "<br>Password: "
passwordbox networkPW
wprint "<br>"
button "Connect To Wifi", [connectWifi]
wprint "<br> <br>"
wprint "Standalone Access Point (AP) without connecting to your wifi use this! <br> <br> Enter AP Name: "
textbox networkSSID
wprint "<br>Enter AP Password: "
passwordbox networkPWap
wprint "<br>"
button "Start AP", [StartAP]
wprint "<br>"
wait
[StartAP]
WiFioff
bla = wifi.ap(networkSSID,networkPWap)
wait
[connectWifi]
WiFioff
bla2 = wifi.connect(selectedWifi,networkPW)
wait
[endprog]
end