New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement status() for ESP32 STA_IF Resolves #3913 #3937

Closed
wants to merge 0 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@mitchins

mitchins commented Jul 11, 2018

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.

wifi_log.txt

@mitchins

This comment has been minimized.

mitchins commented Jul 11, 2018

@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.

@mitchins mitchins changed the title from Implement status() for ESP32 STA_IF to Implement status() for ESP32 STA_IF #3913 Jul 12, 2018

@mitchins mitchins changed the title from Implement status() for ESP32 STA_IF #3913 to Implement status() for ESP32 STA_IF Resolves #3913 Jul 12, 2018

@dpgeorge

This comment has been minimized.

Contributor

dpgeorge commented Jul 13, 2018

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.

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:

$ git checkout -b my-esp32-fix master
(make changes)
$ git commit -a
$ git push
(this will tell you how to push to a new upstream branch, do what it says)

Then make a PR for that new branch (it should come up automatically on github).

@mitchins mitchins closed this Jul 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment