-
Notifications
You must be signed in to change notification settings - Fork 218
Connecting to AP that is "out-of-range" #231
Comments
Have you got some example code?
Normally, you need to do something like:
wlan = network.WLAN()
wlan.connect('foo','bar')
while not wlan.isconnected():
time.sleep(1)
print(wlan.ifconfig())
... because execution continues without waiting for the connection
to complete.
|
Code is just like yours: and after executing connectWLAN() it starts to write to serial console: Keyboart interrupt doesnt affect this, because it's trying to connect somewhere in background, meanwhile you cannot issue any commands in console (and sometimes ampy also doesn't work). I think it's related to #165 - I'll check that. |
Checked dpgeorge fix, but seems like except to logger it prints "no AP found"
|
Don't know if that helps, but you can stop those connect attempts and the related messages with disconnect(), e.g. after your timeout, and try maybe later. |
I've already made workaround. First scan, then check is essid I want to connect in list and if yes - connect. |
Hi
When I'm trying to connect to AP that is currently out-of-range ESP starts to spin trying to connect (with error: No AP found). Only way to stop it is reboot (until you don't have this in boot.py).
I've made workaround in my code, but can someone check is this expected behavior? Maybe n-attempts and then throw some exception?
The text was updated successfully, but these errors were encountered: