WIFI problems and wlan.status

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
SouthWestern
Posts: 1
Joined: Fri Mar 12, 2021 7:39 pm

WIFI problems and wlan.status

Post by SouthWestern » Thu Feb 24, 2022 1:51 pm

From time to time my WeMOS 8266 board loses WIFI connection, and can't re-establish without a reset.
In trying to find out what is going on, I am looking regularly at wlan.isconnected which is as expected, and wlan.status which is not.
The documentation (like https://docs.micropython.org/en/v1.10/l ... .WLAN.html) describes various states, but all I get back is a value like 0, 1, 5, 255. Where are these values described?
Sorry if I missed a simple answer, I have spent quite a while looking!

nekomatic
Posts: 37
Joined: Thu May 08, 2014 9:31 pm

Re: WIFI problems and wlan.status

Post by nekomatic » Tue Apr 05, 2022 10:34 am

These are constants defined by the network module. So if the result of WLAN.status() is equal to network.STAT_GOT_IP you have successfully connected, and so on.

Post Reply