[GH-ISSUE #731] Disable deleting exiting credentials when starting wifiManager #611

Open
opened 2026-02-28 01:26:13 +03:00 by kerem · 6 comments
Owner

Originally created by @henkep on GitHub (Sep 16, 2018).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/731

I have existing credentials saved on my device, I then push a button on my device to manually start the wifiManager. By default the manger then deletes my existing credentials, I would like it to remember credentials until new credentials are being entered. A real life scenario is, what if someone by misstake pushes the button on the device, I have the timeout set to 3 min. If no credentials are saved after 3 min the wifiManager shuts down but the ESP has lost the exsisting credentials and need to be reconfigured.

Is there anyway for the manager to keep the existing credentials until new credentials are provided?

Originally created by @henkep on GitHub (Sep 16, 2018). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/731 I have existing credentials saved on my device, I then push a button on my device to manually start the wifiManager. By default the manger then deletes my existing credentials, I would like it to remember credentials until new credentials are being entered. A real life scenario is, what if someone by misstake pushes the button on the device, I have the timeout set to 3 min. If no credentials are saved after 3 min the wifiManager shuts down but the ESP has lost the exsisting credentials and need to be reconfigured. Is there anyway for the manager to keep the existing credentials until new credentials are provided?
Author
Owner

@tablatronix commented on GitHub (Sep 16, 2018):

Test development version

<!-- gh-comment-id:421690246 --> @tablatronix commented on GitHub (Sep 16, 2018): Test development version
Author
Owner

@henkep commented on GitHub (Sep 16, 2018):

Hi
Tested develop and it does the same thing.

<!-- gh-comment-id:421797183 --> @henkep commented on GitHub (Sep 16, 2018): Hi Tested develop and it does the same thing.
Author
Owner

@tablatronix commented on GitHub (Sep 16, 2018):

Not a known problem or observed problem.
What do you mean losing credentials ?
If you startconfigportal and reboot it should connect as normal.

<!-- gh-comment-id:421825977 --> @tablatronix commented on GitHub (Sep 16, 2018): Not a known problem or observed problem. What do you mean losing credentials ? If you startconfigportal and reboot it should connect as normal.
Author
Owner

@henkep commented on GitHub (Sep 17, 2018):

OK so this was my bad, I did a WiFi.disconnect() before starting the wifiManager and that messed with the settings. But when I removed that I get another problem. So the scenario is this, the user is connected to SSID 1 and everything is working just fine, then he wants to switch the device over to SSID 2. He presses the button on the device and the ESP starts the configPortal. He selects another network and enters credentials, the ESP then writes "already connected, bailing out" and the ESP stays connected to SSID 1. Is there a way to switch networks when the device already is connected to one via the configPortal?

<!-- gh-comment-id:421869326 --> @henkep commented on GitHub (Sep 17, 2018): OK so this was my bad, I did a WiFi.disconnect() before starting the wifiManager and that messed with the settings. But when I removed that I get another problem. So the scenario is this, the user is connected to SSID 1 and everything is working just fine, then he wants to switch the device over to SSID 2. He presses the button on the device and the ESP starts the configPortal. He selects another network and enters credentials, the ESP then writes "already connected, bailing out" and the ESP stays connected to SSID 1. Is there a way to switch networks when the device already is connected to one via the configPortal?
Author
Owner

@tablatronix commented on GitHub (Sep 17, 2018):

Which branch?

<!-- gh-comment-id:421989326 --> @tablatronix commented on GitHub (Sep 17, 2018): Which branch?
Author
Owner

@henkep commented on GitHub (Sep 17, 2018):

I am on main right now, I found the code that creates problem for me. In wifimanager.cpp on line 285:

//fix for auto connect racing issue if (WiFi.status() == WL_CONNECTED) { DEBUG_WM(F("Already connected. Bailing out.")); return WL_CONNECTED; }

<!-- gh-comment-id:422034586 --> @henkep commented on GitHub (Sep 17, 2018): I am on main right now, I found the code that creates problem for me. In wifimanager.cpp on line 285: `//fix for auto connect racing issue if (WiFi.status() == WL_CONNECTED) { DEBUG_WM(F("Already connected. Bailing out.")); return WL_CONNECTED; }`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#611
No description provided.