-
Notifications
You must be signed in to change notification settings - Fork 10
retries block the main loop #18
Comments
Hi @tomtobback Thanks for using the library as well as your nice words. This is definitely a necessary enhancement and I've already added / tested this new feature and will publish a new release soon. Any other enhancement you'd like to propose? The library will be certainly better and better thanks to users like you. Best Regards, |
Hi @tomtobback The new WiFiManager_NINA_Lite releases v1.5.0 has just been published. Your contribution has been noted in Contributions and Thanks Please test and see if there is any new issue. You can modify
Release v1.5.0
|
Hi @khoih-prog many thanks for your prompt follow-up. Unfortunately it does not seem to fix my issue, sorry for the misunderstanding. My goal is to keep the main loop() going without any blocking in between reconnect retries. In my sensor application, i want to catch events (and save to SD), also when wifi is temporarily unavailable. So i would need to have the retries occur only at e.g. 10min intervals, with the loop() running normally (i.e. fast) during that interval. This already works when the Config Portal is active; that does not block the loop().
In between the retries, the loop() only runs once, while my aim is to have it run at the usual high speed for a certain interval (e.g. 10min). My sensor application does not work when the loop runs only once per 10 seconds. |
### Major Release v1.6.0 1. Add support to RP2040-based boards, such as **NANO_RP2040_CONNECT**, using [**Earle Philhower's arduino-pico** core](https://github.com/earlephilhower/arduino-pico) 2. Configurable `WIFI_RECON_INTERVAL`. Check [retries block the main loop #18](#18 (comment))
Hi @tomtobback Try the WiFiManager_NINA_Lite releases v1.6.0 and post the results here, OK or not. You have to modify in
New instructions are at 13. To avoid blocking in loop when WiFi is lost Best Regards, Major Release v1.6.0
|
Hi @khoih-prog - great, that works for me and hopefully others will also find it useful in similar cases. Many thanks. |
### Major Release v1.5.0 1. Add support to RP2040-based boards, such as **NANO_RP2040_CONNECT**, using [**Earle Philhower's arduino-pico** core](https://github.com/earlephilhower/arduino-pico) 2. Fix the blocking issue in loop(). Check [retries block the main loop #18](khoih-prog/WiFiManager_NINA_Lite#18) 3. Configurable `WIFI_RECON_INTERVAL`. Check [retries block the main loop #18](khoih-prog/WiFiManager_NINA_Lite#18 (comment)) 4. Update `Packages' Patches`
### Release v1.5.0 1. Workaround for core WiFi.status() bug, which does not detect WiFi lost. 2. Fix the blocking issue in loop(). Check [retries block the main loop #18](khoih-prog/WiFiManager_NINA_Lite#18) 3. Configurable `WIFI_RECON_INTERVAL`. Check [retries block the main loop #18](khoih-prog/WiFiManager_NINA_Lite#18 (comment)) 4. Update `Packages' Patches`
### Release v1.5.0 1. Workaround for core WiFi.status() bug, which does not detect WiFi lost. 2. Fix the blocking issue in loop(). Check [retries block the main loop #18](khoih-prog/WiFiManager_NINA_Lite#18) 3. Configurable `WIFI_RECON_INTERVAL`. Check [retries block the main loop #18](khoih-prog/WiFiManager_NINA_Lite#18 (comment)) 4. Update `Packages' Patches`
### Release v1.7.0 1. Fix ESP8266 bug not easy to connect to Config Portal for ESP8266 core v3.0.0+ 2. Fix the blocking issue in loop(). Check [retries block the main loop #18](khoih-prog/WiFiManager_NINA_Lite#18) 3. Configurable `WIFI_RECON_INTERVAL`. Check [retries block the main loop #18](khoih-prog/WiFiManager_NINA_Lite#18 (comment)) 4. Clean up
### Release v1.5.0 1. Fix the blocking issue in loop(). Check [retries block the main loop #18](khoih-prog/WiFiManager_NINA_Lite#18) 2. Configurable `WIFI_RECON_INTERVAL`. Check [retries block the main loop #18](khoih-prog/WiFiManager_NINA_Lite#18 (comment)) 3. Update `Packages' Patches`
### Release v1.5.0 1. Fix the blocking issue in loop(). Check [retries block the main loop #18](khoih-prog/WiFiManager_NINA_Lite#18) 2. Configurable `WIFI_RECON_INTERVAL`. Check [retries block the main loop #18](khoih-prog/WiFiManager_NINA_Lite#18 (comment)) 3. Update `Packages' Patches`
### Major Release v1.7.0 1. Fix ESP8266 bug not easy to connect to Config Portal for ESP8266 core v3.0.0+ 2. Fix the blocking issue in loop(). Check [retries block the main loop #18](khoih-prog/WiFiManager_NINA_Lite#18) 3. Configurable `WIFI_RECON_INTERVAL`. Check [retries block the main loop #18](khoih-prog/WiFiManager_NINA_Lite#18 (comment)) 4. Optimize library code by using `reference-passing` instead of `value-passing` 5. Clean up
### Major Release v1.7.0 1. Fix ESP8266 bug not easy to connect to Config Portal for ESP8266 core v3.0.0+ 2. Fix the blocking issue in loop(). Check [retries block the main loop #18](khoih-prog/WiFiManager_NINA_Lite#18) 3. Configurable `WIFI_RECON_INTERVAL`. Check [retries block the main loop #18](khoih-prog/WiFiManager_NINA_Lite#18 (comment)) 4. Optimize library code by using `reference-passing` instead of `value-passing` 5. Clean up
Thanks for the great work on this library. I have an issue that might not be a bug; in that case it would be a useful feature i think.
When the configured WiFi network becomes unavailable, retries are blocking the loop.
Steps to Reproduce
I'm using
REQUIRE_ONE_SET_SSID_PW true
, and i can configure a single SSID/PWD via the portal and it connects successfully. When i switch off my home AP, the wifimanager keeps trying to reconnect for about 25 seconds, then goes back to the loop but immediately tries again to reconnect, producing and endless loop of:Expected behavior
My application requires the retries to occur only at a certain interval, to allow the main functions of the loop to continue to work even when the wifi connection is down (e.g. polling sensors and saving the data to SD to upload later). I have tried changing
RETRY_TIMES_RECONNECT_WIFI
but that does not accept lower than 2. Would it be possible to define an interval between retries, e.g.RETRY_RECONNECT_WIFI_INTERVAL
in order to allow the application to run in between retries? Or can you suggest a workaround?Also, i'm not seeing the behaviour described in the readme, where the Config Portal is reopened when both SSIDs fail. I set
REQUIRE_ONE_SET_SSID_PW false
and configure 2 SSIDs, and when they both become unavailable, the retries alternate but there is no countdown to the Config Portal.Information
The text was updated successfully, but these errors were encountered: