mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #612] Keep ESP in WIFI_STA mode #513
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#513
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 @ofthesea-io on GitHub (May 30, 2018).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/612
Disclaimer: This is more of a question to the forum rather than a issue, so I have a feeling I'm doing this in the wrong place. I do apologise ahead of time. Not sure where else to post it.
If the wifiManager disconnects from the WiFi due to WiFi failure, it will try to reconnect within the allocated timeout period :
wifiManager.setTimeout(seconds);From what I understand, when it goes into this phase, the ESP is set to WIFI_AP_STA mode.
github.com/tzapu/WiFiManager@b516085a3d/WiFiManager.cpp (L201)Is there a way to keep it in WIFI_STA mode and only when the timeout has elapsed, does it move it over to WIFI_AP_STA?
I have wired code up to a reset button that clears the config and sets it back into config portal mode, should I wish to get to the config portal sooner.
@DeltaVetal26 commented on GitHub (May 30, 2018):
Hi, maybe this will help you: https://github.com/tzapu/WiFiManager/tree/development#on-demand-configuration-portal Have you looked?
@ofthesea-io commented on GitHub (May 30, 2018):
The problem was in my sketch.
To verify, the timeout functionality only works with autoConnect during "setup". Once it it has connected and you power cycle the router, the ESP will sit for n amount of time, waiting to reconnect to the last know SSID. Once the router is back up it reconnects (as it should). If you power cycle, the router and the ESP, the timeout trigger then gets hit and sends the ESP to the config portal mode.
But, long story short. I believe the problem was my side.
P.S. I would be nice to have a autoconnect timeout as well. So after x hours, if it doesn't find the router it sends it to config portal mode.
@tablatronix commented on GitHub (May 30, 2018):
Wifimanager does not reconnect the esp does that itself.