mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #1101] setConfigPortalTimeout but autoconnect still exits back to program even though not connected to any wifi #940
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#940
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 @davidkjackson54 on GitHub (Jul 27, 2020).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1101
I have setConfigPortalTimeout(180) set as follows:
wifiManager.setAPStaticIPConfig(IPAddress(172, 217, 28, 1), IPAddress(172, 217, 28, 1), IPAddress(255,255,255,0));
wifiManager.setConfigPortalTimeout(180); // give the configuration portal 3 minutes to complete
wifiManager.autoConnect();
Serial.println("Connected...");
I am testing with a wifi hotspot to see what happens when wifi goes offline.
WiFiManager is correctly waiting for 180 seconds, then goes into AP mode
I see the AP SSID appear on my phone but I do not want to reconfigure - so I leave it and wait.
Then WifiManager exits from wifiManager.autoConnect and continues - without having connected to any wifi.
How do I fix this? I don't want it to continue if it hasn't connected to any wifi. This scenario is just to test what happens if the wifi is unavailable for any reason. so under normal circumstances, I would not wish to configure a new SSID etc.
*WM: AutoConnect
*WM: Connecting as wifi client...
*WM: Status:
*WM: 0
*WM: Using last saved values, should be faster
*WM: Connection result:
*WM: 1
*WM:
*WM: Configuring access point...
*WM: ESP13649403
*WM: Custom AP IP/GW/Subnet
*WM: AP IP address:
*WM: 172.217.28.1
*WM: HTTP server started
Connected... <This Serial.print is from my progam after returning from wifiManager.autoConnect
*WM: freeing allocated params!
WiFi connected - ESP IP address: (IP unset)
Basic Info
Hardware
WiFimanager Branch/Release:
Esp8266/Esp32:
Hardware: ESP-12e, esp01, esp25
ESP Core Version: 2.4.0, staging
Description
Problem description
Settings in IDE
Module: NodeMcu, Wemos D1
Additional libraries:
mdsn
@davidkjackson54 commented on GitHub (Jul 27, 2020):
I have resolved this.
@tablatronix commented on GitHub (Jul 27, 2020):
Thats is exactly what that setting is for