mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #1084] Issue with AutoConnect on failed connection #925
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#925
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 @ArsineMan on GitHub (Jun 23, 2020).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1084
Basic Infos
Hardware
WiFimanager Branch/Release:
Esp8266/Esp32:
Hardware: ESP-12e, esp01, esp25
ESP Core Version: 2.4.0, staging
Description
Problem description
when autoConnect fails to connect to router (because I put a phony SSID/Password to force the connection to fail) I am immediately directed to AP/Configuration mode. How does the code below reach the Serial.println("Failed to connect and hit timout"); line? I am hoping that if my connection isn't established I will enter sleep mode and try again later. My only other thought is to use the configModeCallback to enter sleep mode and try again?
Module: NodeMcu, Wemos D1
Additional libraries:
Sketch
Debug Messages
@tablatronix commented on GitHub (Jun 23, 2020):
If you do not want to start the configportal why are you even using wifimanager?
@ArsineMan commented on GitHub (Jun 23, 2020):
I definitely want to start the ConfigPortal when SSID/Password have yet to be established, I just don't want my battery powered project to remain in configmode (and turned on) if the wifi connection cannot be established. Ie. if my home accesspoint is down my device will remain on and in ConfigPortal mode.
@tablatronix commented on GitHub (Jun 24, 2020):
if it is battery powered, then only use WM when there is no previous saved ssid or use a button for ondemand mode.
@tablatronix commented on GitHub (Jun 24, 2020):
It might be a pain to do this in v0, but v2 you can use
@ArsineMan commented on GitHub (Jun 24, 2020):
Thanks for the response. Yes I went the route of managing the wifi client mode separate from WM and utilized the startConfigPortal method to utilize your portal and manage ssid's. I didn't realize the ESP8266wifi class stored previous connection SSID/psk so I was looking all over the damn place for where you were storing it. Makes my life easier after rtfm. I appreciate your time on this library it will save me hours.
@tablatronix commented on GitHub (Jun 24, 2020):
Yeah you might be able to just check WiFi.SSID() == "" or null, but not sure how reliable that is, in the alpha version I actually check the wifi config from memory.
@tablatronix commented on GitHub (Jun 24, 2020):
https://github.com/tzapu/WiFiManager/blob/development/WiFiManager.cpp#L2873-L2902
@ArsineMan commented on GitHub (Jun 24, 2020):
Looks good. I assume i'm ok with WiFi.SSID given their code:
@tablatronix commented on GitHub (Jun 24, 2020):
Oh yeah I forgot I only did that so I could pick persistent or not. So that should work fine.
I need to add an example for this.
I do remember having to check null or "" I think, so check that.