You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to deal with what I think could be two common situations.
1: WiFi goes down temporarily
2: Temporary Power cut (very common especially in developing countries) - and WiFi comes back up slower than a device.
In both cases, my concern is unattended devices that with a basic use of WiFiSettings would enter the portal state and get stuck there.
My first attempt to fix this was a simple timeout watchdog, this worked but was annoying if the user is interacting with portal at the time.
I've now got a version that if there is a configured Wifi (i.e. its read a SSID from the SPIFFS/LittleFS) will - after a configurable period (I'm using 2 minutes) - rescan and if it detects the missing WiFi try a restart.
Thanks to all the callbacks I've got it working without changing the library, and am happy to continue using it this way, but I'm thinking it would be a useful addition. I'm not sure what is the best way to integrate it.
Hi Juerd,
I'm trying to deal with what I think could be two common situations.
1: WiFi goes down temporarily
2: Temporary Power cut (very common especially in developing countries) - and WiFi comes back up slower than a device.
In both cases, my concern is unattended devices that with a basic use of WiFiSettings would enter the portal state and get stuck there.
My first attempt to fix this was a simple timeout watchdog, this worked but was annoying if the user is interacting with portal at the time.
I've now got a version that if there is a configured Wifi (i.e. its read a SSID from the SPIFFS/LittleFS) will - after a configurable period (I'm using 2 minutes) - rescan and if it detects the missing WiFi try a restart.
Thanks to all the callbacks I've got it working without changing the library, and am happy to continue using it this way, but I'm thinking it would be a useful addition. I'm not sure what is the best way to integrate it.
My code is at https://github.com/mitra42/frugal-iot/blob/main/system_wifi.cpp#L68 and its stored into WiFiSettings.onPortalWaitLoop at Line 130 based on WiFiSettings.onFailure
The text was updated successfully, but these errors were encountered: