-
Notifications
You must be signed in to change notification settings - Fork 13.3k
maybe a fix for WiFi.setAutoReconnect (false) never connecting #4438
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
Comments
@odelot git has updated SDK to 2.2, where there is an incompatibility with the wifi settings. If you update your sketch from a git version before the sdk change to a git version after the sdk change, you can have weird connections issues. You have to erase the flash (or just the settings) after updating, and then do the wifi setup. |
@devyte I am using the most updated code (sdk 2.2) and I've used the new menu option to erase the sketch and wifi settings, but got a weird behavior anyway. Just with the code above that everything went normal. |
Does the same behavior happen with pr #3798 ? I think without that one persistent (or not persistent) may be incomplete,. |
@devyte I will try and let you know. Tks! |
@devyte it seems to work! If I got something different I let you know |
Using: 2.4.0 git version
I always used WiFi.persistent (false); and took care of ssid and pass stored in the eeprom by myself. Until 2.3.0 everything was working. I was connecting with begin function manually.
In 2.4.0 changed something and my sketch was just connecting once. The second one never got the WL_CONNECTED status.
When used WiFi.setAutoReconnect (false) I discovered that I wasn't manually reconnecting before. It was the device. With WiFi.setAutoReconnect (true) I got a error that my wifi network was not found and with WiFi.setAutoReconnect (false) it never connects after the first connection.
In file ESP8266WiFiSTA.cpp I changed this part of the begin function to set the config even if it hasn't changed if we are in the persist mode. Just this way I could kick off the connection procedure and DHCP
I tried to make a small sketch to simulate it but I couldn't. This behavior seems to happen just with my big project.
I will try to simulate this in a small sketch again. Maybe I am doing something wrong, calling a disconnect in a wrong place, I don't know. I just wanted to share this to someone that are facing the same problem.
The text was updated successfully, but these errors were encountered: