Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Implement status() for ESP32 STA_IF Resolves #3913 #3937
Implements the default method (no args) which provides the link status for the STA_IF on ESP32 devices.
Implementation is inspired and consistent with ESP8266, success codes are named similarly, as are most error names. Error codes and names for wifi disconnect are otherwise taken (returned directly) from what the ESP-IDF gives us but are defined in the const dictionary where appropriate.
Success codes are number from 1000 upwards so as not to clash with the 8-bit error codes from ESP-IDF.
Tested connection. failure and success on Wemos R32 device, it seems to return as expected.
@dpgeorge have revised this to reduce new enums and switch (It's slightly smaller size than before when compiled).
I'm not sure why the diff is showing more changes than I actually did, it's a bit misleading. I will see if there's anything I can do.
On a side note, the ESP32 MicroPython port can be a bit aggressive when it never actually connects in the first place continually retries. Bad name or password etc... See the logs where I test it with the wrong AP and then the right one to check the status. I might revisit this issue later.
changed the title from
Implement status() for ESP32 STA_IF
Implement status() for ESP32 STA_IF #3913
Jul 12, 2018
I think it's because your repo is not up to date with this repo and somehow you got a copy of the new modnetwork.c. I'd try updating your repo to match this one, then apply your fix.
BTW, it's much easier if you don't make the changes to the master branch of your fork, but rather to a new branch you create just for this PR. Eg, in your forked repo do:
Then make a PR for that new branch (it should come up automatically on github).