mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 09:05:56 +03:00
[GH-ISSUE #1122] Autoconnect problem after network loss - need some help #958
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#958
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 @FilipDem on GitHub (Sep 10, 2020).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1122
Basic Infos
Hardware
WiFimanager Branch/Release:
WifiManager 2.0.3-alpha from the Arduino Library Manager
Esp8266/Esp32: ESP8266
Hardware: ESP-12F
ESP Core Version: 2.7.4
Description
I am using the WifiManager... Now it happens that the network is interrupted. I see then that the AP is activated (from LED behavior and network scan). The network comes up again (because my PC has again a WIFI connection. Afterwards the AP is quit (probably after timeout), however there is no network access. After reboot all comes back OK.
Is it correct that the StartConfigPortal is started if a network disconnection is detected? Don't understand where in the code this happens, seen I don't do sth special in the loop(). Who could help me to the behavior of the WifiManager to detect that the network is interrupted and up again?
Or somebody has some ideas what could be the problem, always welcome.
Concept Sketch
void loop() {
}
@tablatronix commented on GitHub (Sep 10, 2020):
autoconnect autostarts configportal on fail, it should only start on reboot, unless you disable that (its optional)
esp should auto reconnect, so why it is not is the question.
It sounds like your esp is having a problem reconnecting, it could be another bug or unrelated to wm.
You need to enable debugging and see what its doing.
Also make sure you set wifi.mode properly in your code, sta only if you do not want ap running
@ddweber456 commented on GitHub (Oct 28, 2020):
I have had the same issue with a power outages. Router takes 30 - 40 sec to connect to the web, mean time the ESP wifiManager.autoConnect is already in AP mode waiting for SSID/Password.
I fixed the problem with wifiManager.setTimeout and a ESP.restart.
wifiManager.setTimeout(120);
wifiManager.setConfigPortalTimeout(120);
if(!wifiManager.autoConnect("APSetup WIFI", "password")) {
Serial.println("failed to connect 1st time after BOOT and hit timeout");
delay(100);
ESP.restart();
I also added the following in Setup:
@tablatronix commented on GitHub (Oct 29, 2020):
Yeah I would just add a little loop and deal with it in your own code.
@tablatronix commented on GitHub (Oct 29, 2020):
if you wifiManager.setTimeout(120); then it should keep checking before starting the cp, but maybe there is something else going on. There are documented issues of connects failing first time, I would reproduce and get some logs to see why the 120S is not enough
@tarontop commented on GitHub (Mar 16, 2021):
The problem I encountered is the same as you. I used non-blocking. How can I reconnect to Wi-Fi without restarting ESP8266?
@tablatronix commented on GitHub (Mar 16, 2021):
esp8266 is supposed to autoreconnect
@tarontop commented on GitHub (Mar 17, 2021):
When I test, it will reconnect, but this is only when the ESP8266 is not powered off, only the router is powered off, and then the router ESP8266 will reconnect, if the ESP8266 and the router are both powered off, they will not reconnect , Because it takes 2 minutes for my router to start up, ESP8266 automatically enters the AP mode.
@tablatronix commented on GitHub (Mar 17, 2021):
wm.setConfigportalTimeout()
There are about 5 solutions to this discussed all over these issues
@tarontop commented on GitHub (Jul 9, 2021):
For non-blocking,
wm.setConfigportalTimeout()does not seem to work@tablatronix commented on GitHub (Jul 10, 2021):
Hmm have log output?
@tarontop commented on GitHub (Jul 10, 2021):
@tarontop commented on GitHub (Jul 10, 2021):
After 30 seconds it was still in AP mode, it did not close the captive portal (I used non-blocking)
@tarontop commented on GitHub (Aug 20, 2021):
Hello, will the poor signal quality cause the device to restart? I have a device whose signal is not very good, and the device will restart from time to time
@tablatronix commented on GitHub (Aug 21, 2021):
That sounds like bad power, unless you have some code to do a restart no
@tablatronix commented on GitHub (Aug 21, 2021):
@tarontop can you make a new issue for timeout not woking in non blocking, it seems to be a valid bug. If not I will try to sometime soon.