[GH-ISSUE #1393] Q: Can I get wifi status from WifiManager? #1192

Closed
opened 2026-02-28 01:28:56 +03:00 by kerem · 1 comment
Owner

Originally created by @Sulomus on GitHub (Apr 14, 2022).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1393

Hello,
firstly I would like to thank you for this awesome library! it truly saved my life.

My question is simple:
After I successfully connect to WiFi AP - I want to periodically check if the connection is OK, if it's not - then simply restart the ESP32.

With normal WiFi.h library you could do that with this code:

unsigned long currentMillis = millis();
// if WiFi is down, try reconnecting
if ((WiFi.status() != WL_CONNECTED) && (currentMillis - previousMillis >=interval)) {
  Serial.print(millis());
  Serial.println("Reconnecting to WiFi...");
  WiFi.disconnect();
  WiFi.reconnect();

  //ESP.restart(); //Or completly restart the ESP32
  previousMillis = currentMillis;
}

Is there any equivalent in WifiManager library?

What am I using:

  • ESP32
  • Newest version of WifiManager v0.16
Originally created by @Sulomus on GitHub (Apr 14, 2022). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1393 Hello, firstly I would like to thank you for this awesome library! it truly saved my life. **My question is simple:** After I successfully connect to WiFi AP - I want to periodically check if the connection is OK, if it's not - then simply restart the ESP32. **With normal `WiFi.h` library you could do that with this code:** ``` unsigned long currentMillis = millis(); // if WiFi is down, try reconnecting if ((WiFi.status() != WL_CONNECTED) && (currentMillis - previousMillis >=interval)) { Serial.print(millis()); Serial.println("Reconnecting to WiFi..."); WiFi.disconnect(); WiFi.reconnect(); //ESP.restart(); //Or completly restart the ESP32 previousMillis = currentMillis; } ``` Is there any equivalent in `WifiManager `library? What am I using: - ESP32 - Newest version of WifiManager v0.16
kerem 2026-02-28 01:28:56 +03:00
  • closed this issue
  • added the
    Question
    label
Author
Owner

@tablatronix commented on GitHub (Apr 14, 2022):

you can do the same still, there is nothing to replace that

<!-- gh-comment-id:1099416887 --> @tablatronix commented on GitHub (Apr 14, 2022): you can do the same still, there is nothing to replace that
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#1192
No description provided.