Unknown Status of 2 From Network #10746
Replies: 2 comments 7 replies
|
My understanding is that Micropython error messages are or were preceded by a - sign to distinguish them from "normal" Python errors. Hmmm, I see some have - signs and another ones don't. Can you do a scan? I use this on my ESPNow systems and it should give you more information: https://github.com/glenn20/micropython-espnow-utils |
|
Me too gets the status() == 2 after an apperently successful connect. 'connected: ('0.0.0.0', '255.255.255.0', '192.168.0.1', '8.8.8.8') `for a in dir (network): STAT_CONNECTING = 1 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I'm getting a status of 2 coming back from WLAN.status() after WLAN.connect(...). What does the 2 mean? I can't see it listed in help(network)
Here's the code snippet
wlan.connect(secrets.ssid, secrets.pwd)
sleep(3)
# If the status is not 'connecting' (1) or connected abort
status = wlan.status()
if not ((status == 1) or wlan.isconnected() ):
This is what I see from help(network)
STAT_IDLE -- 0
STAT_CONNECTING -- 1
STAT_WRONG_PASSWORD -- -3
STAT_NO_AP_FOUND -- -2
STAT_CONNECT_FAIL -- -1
STAT_GOT_IP -- 3
All reactions