[GH-ISSUE #1602] AP mode if saved network not available #1368

Open
opened 2026-02-28 01:29:47 +03:00 by kerem · 2 comments
Owner

Originally created by @micronthings on GitHub (May 11, 2023).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1602

After device started, AP mode starts, if saved network is not available. Is there any way to turn this feature off?
My problem is: in case of electrical blackout the device can't connect if the router starts later than the device. (WiFi network is not exist at the moment when device starts). For my use case would better if the device tries connect to saved network permanently in this case.

Originally created by @micronthings on GitHub (May 11, 2023). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1602 After device started, AP mode starts, if saved network is not available. Is there any way to turn this feature off? My problem is: in case of electrical blackout the device can't connect if the router starts later than the device. (WiFi network is not exist at the moment when device starts). For my use case would better if the device tries connect to saved network permanently in this case.
Author
Owner

@toome123 commented on GitHub (May 18, 2023):

i think you can just restart the device if no connection established. Here example with ESP
bool isConnected = wifiManager.autoConnect("WIFI", "password"); if(isConnected){ Serial.println("Connected to WIFI"); }else{ Serial.println("Unable to connect to WIFI"); Serial.println("failed to connect and hit timeout"); delay(3000); //reset and try again, or maybe put it to deep sleep ESP.restart(); delay(5000);
}

<!-- gh-comment-id:1552506885 --> @toome123 commented on GitHub (May 18, 2023): i think you can just restart the device if no connection established. Here example with ESP ` bool isConnected = wifiManager.autoConnect("WIFI", "password"); if(isConnected){ Serial.println("Connected to WIFI"); }else{ Serial.println("Unable to connect to WIFI"); Serial.println("failed to connect and hit timeout"); delay(3000); //reset and try again, or maybe put it to deep sleep ESP.restart(); delay(5000);` }
Author
Owner

@tablatronix commented on GitHub (May 18, 2023):

You can use the configportaltimeout or add some checks to see if creds are saved or not or use ondemand only. This is asked many times here in issues

<!-- gh-comment-id:1553407873 --> @tablatronix commented on GitHub (May 18, 2023): You can use the configportaltimeout or add some checks to see if creds are saved or not or use ondemand only. This is asked many times here in issues
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#1368
No description provided.