mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 17:15:53 +03:00
[GH-ISSUE #669] Failure behavior on accessing wifi network #557
Labels
No labels
📶 WiFi
🕸️ HTTP
Branch
DEV Help Wanted
Discussion
Documentation
ESP32
Example
Good First Issue
Hotfix
In Progress
Incomplete
Needs Feeback
Priority
QA
Question
Task
Upstream/Dependancy
bug
duplicate
enhancement
invalid
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/WiFiManager#557
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @vaz83 on GitHub (Jul 20, 2018).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/669
Hi,
I want that my ESP8266 when it fails to connect to the local wifi network, it can restart so it can try a couple of times. My question is how I make that possible?
I have the parameter setConfigPortalBlocking set to true. on the setup i made this:
if(wm.autoConnect(ssid.c_str())) { //if you get here you have connected to the WiFi Serial.println("Connected to wifi network!"); WiFi.mode(WIFI_STA); wm.startWebPortal(); } else { Serial.println("failed to connect and hit timeout"); delay(3000); // if we still have not connected restart and try all over again ESP.restart(); delay(5000); //Serial.println("Non blocking config portal running!"); }however, it's not working, because it doesn't enter in the else sentence.
My idea is for example, power failure, the esp will start before my wifi router, so it will keep restarting until it successfully connects. Can you help me out?
@vaz83 commented on GitHub (Jul 21, 2018):
tablatronix, need your help man :)
@vaz83 commented on GitHub (Jul 22, 2018):
problem solved.
wm.setEnableConfigPortal(!wm.getWiFiIsSaved());