khoih-prog / ESPAsync_WiFiManager

This is an ESP32 (including ESP32-S2 and ESP32-C3) / ESP8266 WiFi Connection Manager, using ESPAsyncWebServer, with fallback web configuration portal. Use this library for configuring ESP32, ESP8266 modules' WiFi, etc. Credentials at runtime. You can also specify static DNS servers, personalized HostName, fixed or random AP WiFi channel. With examples supporting ArduinoJson 6.0.0+ as well as 5.13.5- . Using AsyncDNSServer instead of DNSServer now.
MIT License
290 stars 73 forks source link

How to automatics reconnect to the WiFi network if restart the WiFi router? #56

Closed seksity closed 3 years ago

seksity commented 3 years ago

Is your feature request related to a problem? Please describe.

I getting started to use with "Async_ConfigOnDRD_ESP32_minimal.ino" and it works fine but while ESP32 DevModule(ESP32-WROOM-32) connected to WiFi router but getting the some problem and restart WiFi router, then ESP32 doesn't know it loss connection.

Describe the solution you'd like

I not sure may you already have solution, with my opinion I like to ESP32 automatic disconnect after heartbeat timeout then automatic try to reconnect with some timeout period to the previous connect WiFi AP.

Describe alternatives you've considered

Alternative way is using Asynchronous event on("disconnect") to call some function to re-connect to WiFi router

Additional context

NOTE: If you have any solution for this ideas please suggest me.

Thank you

seksity commented 3 years ago

I found the solution by using multiwifi auto reconnect as like below:-

https://github.com/khoih-prog/ESPAsync_WiFiManager#16-using-multiwifi-autoreconnect-feature