mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #887] Autoconnect only if credentials are saved #749
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#749
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 @malaki86 on GitHub (May 15, 2019).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/887
I have a project that can use WiFi, but it's not required. What I'm looking for is a way to only attempt to autoconnect if there is already a WiFi connection saved. If not, skip it and the user can hit a button later on to start the AP config page.
I know that I can use the config page timeout, but I don't want the system to 'hang'.
@tablatronix commented on GitHub (May 15, 2019):
You should be able to just getssid and check but its a little different in esp32
@SomeGuyNamedJay commented on GitHub (May 15, 2019):
Does this work for you?
@malaki86 commented on GitHub (May 15, 2019):
I saw the getssid in the keywords file, but when I try to use it, I get a 'function not defined' error
WiFi.SSID returns the SSID for the current, active WiFi connection. I need to read the saved one, if it exists. It will always return a blank response before connecting.
@tablatronix commented on GitHub (May 15, 2019):
Yeah that is the behavior on esp32 also, if you want to read the saved ssid you might have to read directly from the config struct.
@tablatronix commented on GitHub (May 15, 2019):
on esp32 it is
@tablatronix commented on GitHub (May 15, 2019):
Might be nice to make a getter for this
I think I made one once and removed it, sorry about that, no getssid exists
@malaki86 commented on GitHub (May 21, 2019):
It wouldn't even have to return the actual SSID or password that WiFiManager has saved. It could be a simple boolean return value.
Example:
if WiFiManager.Saved == TRUE {
WiFiManager.autoconnect;
}