Page 1 of 1

WIFI problems and wlan.status

Posted: Thu Feb 24, 2022 1:51 pm
by SouthWestern
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!

Re: WIFI problems and wlan.status

Posted: Tue Apr 05, 2022 10:34 am
by nekomatic
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.