Closed zouje closed 3 years ago
Hi,
Thanks for your interests and usage of the library.
As you know, examples are just simple examples, written to illustrate the basic usage of the library's features and functions. They are not expected to be used without any issue in every use-cases.
The non-autoreconnection is expected and by design for minimal
examples.
To select the best fit model for your use case, you have to test and understand the features / functions provided of each example, then apply the model.
The autoconnect()
function is used for the simplest minimal examples, certainly can't handle the autoreconnect feature, necessary for your case.
Have a look at more complex examples, at least the next to simplest example: AutoConnect to understand how the auto-reconnection are made, then apply to your case.
loop()
=> check_status()
=> check_WiFi()
=> connectMultiWiFi()
Good Luck,
Hi,
Thanks for your reply. I know it's been a while since your answer, but I thought I had it fixed, but it seems the issue is still around.
Sorry I am not advanced enough to understand where exactly in the example you gave me I should find the bit of code to use. Would you be able to point me to the specific bit of code that does the autoreconnect without hanging?
I updated to the latest version of the library (I was at 1.3.0, I moved to 1.7.8). Still same behaviour.
I appreciate the help!
zouje.
One last followup:
I added
ESP_wifiManager.setTimerout(60);
in my ESP_WiFiManagerConnect()
function. This made the reconnect loop break every 60 seconds to retry connecting. This works now.
Describe the bug
When calling autoConnect() when no WiFi is available, the program seems to hang on the reconnection. When WiFi comes back, is remains hanging and does not reconnect until a Reboot.
Serial Output:
Code:
Some info: