Skip to content
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

Wifi Disconnect Loop #16

Closed
aaronweaver opened this issue Apr 8, 2024 · 1 comment
Closed

Wifi Disconnect Loop #16

aaronweaver opened this issue Apr 8, 2024 · 1 comment

Comments

@aaronweaver
Copy link

aaronweaver commented Apr 8, 2024

If for some reason the wifi cannot reconnect the while statement check continues in an endless loop.

[ 1289 ] [WiFi] Connecting to WiFi...
..E (6107) wifi:Set status to INIT
[ 2951 ] [WiFi] Connection lost
...[ 4479 ] [WiFi] Connection lost
....[ 6479 ] [WiFi] Spurious disconnect event ignored
..........................................................................................................................................................................................................................................

WiFi.reconnect();
    while(WiFi.status() != WL_CONNECTED) {
      delay(500);
      Serial.print(":");
    }
@Gixy31
Copy link
Owner

Gixy31 commented Apr 13, 2024

I know. As Microsoft says: it's not a bug, it's a feature... I never had a total failure of the WiFi, but if you need it, you can easily implement a retry count.
It has been confirmed that the STA_DISCONNECTED event occuring just before STA_GOT_IP is now normal on the new ESP32_ARDUINO release, justifying the workaround.

@Gixy31 Gixy31 closed this as completed Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants