mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #600] setConfigPortalTimeout() does not reattempt connection; causes strange behaviour #501
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#501
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 @cjastone on GitHub (Apr 25, 2018).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/600
Basic Infos
Hardware
WiFimanager Branch/Release: Development
Esp8266/Esp32:
Hardware: ESP-09
Core Version: 2.4.0, staging
Description
When using setConfigPortalTimeout(), following timeout, connection is not reattempted, nor is the device rebooted when the timeout is reached.
The program execution continues, but behaves... strangely. Most of my code runs within a
while (WiFi.status() == WL_CONNECTED)loop with not much else happening outside of this withinvoid loop(). So it will sit there and loop a few times, not doing much. Sometimes, it'll crash after several loops - but other times it suddenly gets a connection to WiFi, but nothing works right - JSON objects are full or gibberish, other variables don't contain correct data, and so on. It's really quite strange.I've got a fair bit of code that would be excessive to post here, but if it'll help I can try trim it down to a proof-of-concept. Let me know if that would help!
@tablatronix commented on GitHub (Apr 25, 2018):
Not sure what you expect to happen here but timeout just returns the function call, its times out the configportal and shuts it down.
What are you expecting to happen, I do not understand.
Sounds like something is wrong with your code or scope.
@cjastone commented on GitHub (Apr 26, 2018):
Okay - understood. I misinterpreted what was meant by "When the time passes, the autoConnect function will return, no matter the outcome. Check for connection and if it's still not established do whatever is needed (on some modules I restart them to retry, on others I enter deep sleep)"
I've since added in code to handle this myself
if (WiFi.status() != WL_CONNECTED) { ESP.restart(); }which deals with it just fine. Thanks for clarifying!@tablatronix commented on GitHub (Apr 26, 2018):
Yeah that is exactly what the example does