micropython / micropython-esp32

Old port of MicroPython to the ESP32 -- new port is at https://github.com/micropython/micropython
MIT License
669 stars 216 forks source link

ports/esp32/modnetwork.c: Reliably tell the status with isconnected() #217

Closed robert-hh closed 6 years ago

robert-hh commented 6 years ago

The status will be changed by the event notifications. There is still a small lag between the python command affecting the status and the status change. Also, after an intentional disconnect() do not try to reconnect automatically.

robert-hh commented 6 years ago

Note: This aims at fixing issue https://github.com/micropython/micropython-esp32/issues/212

PikWay commented 6 years ago

I've just tested the provided patch - it's fine.

dpgeorge commented 6 years ago

Sorry I missed this. It looks like https://github.com/micropython/micropython/pull/3838 is doing a similar thing and maybe more robust than this in case the IP address is statically assigned.

dpgeorge commented 6 years ago

Should be fixed by commit in main repo: https://github.com/micropython/micropython/commit/039f196c56b97d879b7ce731cd479395dd479c3d