[GH-ISSUE #142] how to erase previous credentials? #110

Closed
opened 2026-02-28 01:23:28 +03:00 by kerem · 36 comments
Owner

Originally created by @hixfield on GitHub (Mar 28, 2016).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/142

I have a button on my ESP, that is (via an interrupt service routine) ment to restore factory settings.
How can I clear the existing WIFI credentials, so that after reset WIFIManager "sees" no credentials and starts-up the AP for setting them?

failed
I found a reference to ESP.eraseConfig here https://github.com/esp8266/Arduino/issues/1494 to but that just completely blocks the ESP and I needed to re-flash it! So I guess that is not the way to go...

Originally created by @hixfield on GitHub (Mar 28, 2016). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/142 I have a button on my ESP, that is (via an interrupt service routine) ment to restore factory settings. How can I clear the existing WIFI credentials, so that after reset WIFIManager "sees" no credentials and starts-up the AP for setting them? _failed_ I found a reference to ESP.eraseConfig here https://github.com/esp8266/Arduino/issues/1494 to but that just completely blocks the ESP and I needed to re-flash it! So I guess that is not the way to go...
kerem 2026-02-28 01:23:28 +03:00
  • closed this issue
  • added the
    Question
    label
Author
Owner

@hixfield commented on GitHub (Mar 28, 2016):

I think I figured out a solution.
When the button is pressed I set a flag, and in the loop the flag is checked and then just a simple WiFi.disconnect() seams to push the WIFIManager in AP mode.
By the way, I found both the ESP.reset and ESP.restart to be unreliable, so I connected GPIO16 to the ESP RST pin, and using "software" I do a hardware reset like this. Yes... I am working with a flag, because the ESP seams to crash when I put the WiFi.disconnect() in the ISR itself...

This is part of my code:

void resetToFactoryDefaults() {
  WiFi.disconnect();
  delay(3000);
  hardwareReset();
}

void hardwareReset() {
  pinMode(g_nPinReset, OUTPUT);
  digitalWrite(g_nPinReset, false);
  delay(3000);
}

void isrResetToFactoryDefaults(void) {
  Serial.println("Resetting to factory defaults");
  g_bShouldResetToFactorySettings = true;
}

void setupWifi() {
  //WiFiManager
  //Local intialization. Once its business is done, there is no need to keep it around
  WiFiManager wifiManager;
  //exit after config instead of connecting
  wifiManager.setBreakAfterConfig(true);
  //tries to connect to last known settings if it does not connect it starts an access point with the specified name
  //here  "AutoConnectAP" with password "password" and goes into a blocking loop awaiting configuration
  if (!wifiManager.autoConnect()) {
    Serial.println("failed to connect, we should reset as see if it connects");
    hardwareReset();
  }
...
}

void loop(void) {
  if (g_bShouldResetToFactorySettings) resetToFactoryDefaults();
}
<!-- gh-comment-id:202497082 --> @hixfield commented on GitHub (Mar 28, 2016): I think I figured out a solution. When the button is pressed I set a flag, and in the loop the flag is checked and then just a simple WiFi.disconnect() seams to push the WIFIManager in AP mode. By the way, I found both the ESP.reset and ESP.restart to be unreliable, so I connected GPIO16 to the ESP RST pin, and using "software" I do a hardware reset like this. Yes... I am working with a flag, because the ESP seams to crash when I put the WiFi.disconnect() in the ISR itself... This is part of my code: ``` void resetToFactoryDefaults() { WiFi.disconnect(); delay(3000); hardwareReset(); } void hardwareReset() { pinMode(g_nPinReset, OUTPUT); digitalWrite(g_nPinReset, false); delay(3000); } void isrResetToFactoryDefaults(void) { Serial.println("Resetting to factory defaults"); g_bShouldResetToFactorySettings = true; } void setupWifi() { //WiFiManager //Local intialization. Once its business is done, there is no need to keep it around WiFiManager wifiManager; //exit after config instead of connecting wifiManager.setBreakAfterConfig(true); //tries to connect to last known settings if it does not connect it starts an access point with the specified name //here "AutoConnectAP" with password "password" and goes into a blocking loop awaiting configuration if (!wifiManager.autoConnect()) { Serial.println("failed to connect, we should reset as see if it connects"); hardwareReset(); } ... } void loop(void) { if (g_bShouldResetToFactorySettings) resetToFactoryDefaults(); } ```
Author
Owner

@tzapu commented on GitHub (Mar 28, 2016):

hi,

as a general rule of thumb, don t do anything in interrupt callbacks except setting a flag, and process it in the loop. asking for trouble otherwise

WiFi.disconnect() will erase ssid/password

i use ESP.reset() sucessfully in a lot of projects, the key may be to add a delay(1000) after it. (also, not in a callback)

i hope this helps, cheers

<!-- gh-comment-id:202512817 --> @tzapu commented on GitHub (Mar 28, 2016): hi, as a general rule of thumb, don t do anything in interrupt callbacks except setting a flag, and process it in the loop. asking for trouble otherwise WiFi.disconnect() will erase ssid/password i use ESP.reset() sucessfully in a lot of projects, the key may be to add a delay(1000) after it. (also, not in a callback) i hope this helps, cheers
Author
Owner

@baruch commented on GitHub (Apr 6, 2016):

This ticket can probably be closed, maybe document it somewhere in the readme or provide an example.

<!-- gh-comment-id:206435054 --> @baruch commented on GitHub (Apr 6, 2016): This ticket can probably be closed, maybe document it somewhere in the readme or provide an example.
Author
Owner

@electron1979 commented on GitHub (Jan 2, 2018):

Only WiFi.disconnect(); worked for me!

Worked here too!

<!-- gh-comment-id:354755758 --> @electron1979 commented on GitHub (Jan 2, 2018): Only WiFi.disconnect(); worked for me! Worked [here](http://www.esp8266.com/viewtopic.php?f=32&t=8204&start=4) too!
Author
Owner

@trungkiendt9 commented on GitHub (Mar 16, 2018):

With button reset. It's done.
if (reset_level >500) {
WiFi.disconnect(true);
delay(2000);
ESP.reset();
}

<!-- gh-comment-id:373712381 --> @trungkiendt9 commented on GitHub (Mar 16, 2018): With button reset. It's done. if (reset_level >500) { WiFi.disconnect(true); delay(2000); ESP.reset(); }
Author
Owner

@yo2lts commented on GitHub (Dec 5, 2018):

I have a Heltec esp wifi lora 32 I tried to delete the saved SSID settings but it does not work. I tried all the variants read above. I use the PIO with Atom but also on the Arduino IDE do the same. Can anyone help me how to make factorw reset? Thank you!

<!-- gh-comment-id:444385916 --> @yo2lts commented on GitHub (Dec 5, 2018): I have a Heltec esp wifi lora 32 I tried to delete the saved SSID settings but it does not work. I tried all the variants read above. I use the PIO with Atom but also on the Arduino IDE do the same. Can anyone help me how to make factorw reset? Thank you!
Author
Owner

@electron1979 commented on GitHub (Dec 5, 2018):

@yo2lts, I think something like what follows may work in Arduino IDE:

#include <ESP8266WiFi.h>
#include <WiFiClient.h>
void setup()
{
  WiFi.disconnect();
//  WiFiManager.resetSettings();
//  ESP.eraseConfig();
//  ESP.reset();
//  ESP.restart();
}
void loop()
{
  yield();
}
<!-- gh-comment-id:444450159 --> @electron1979 commented on GitHub (Dec 5, 2018): @yo2lts, I think something like what follows may work in Arduino IDE: ``` #include <ESP8266WiFi.h> #include <WiFiClient.h> void setup() { WiFi.disconnect(); // WiFiManager.resetSettings(); // ESP.eraseConfig(); // ESP.reset(); // ESP.restart(); } void loop() { yield(); } ```
Author
Owner

@tablatronix commented on GitHub (Dec 5, 2018):

For factory reset you need to use esptool to erase flash also the arduino ide now has erase capability

<!-- gh-comment-id:444468942 --> @tablatronix commented on GitHub (Dec 5, 2018): For factory reset you need to use esptool to erase flash also the arduino ide now has erase capability
Author
Owner

@yo2lts commented on GitHub (Dec 5, 2018):

Multumesc, cred ca am reusit.
What is yield() ?
Thank You! Work!

<!-- gh-comment-id:444607371 --> @yo2lts commented on GitHub (Dec 5, 2018): Multumesc, cred ca am reusit. What is yield() ? Thank You! Work!
Author
Owner

@a-c-sreedhar-reddy commented on GitHub (Feb 22, 2019):

WiFi.disconnect(false,true);
This erases existing AP credentials.

<!-- gh-comment-id:466336401 --> @a-c-sreedhar-reddy commented on GitHub (Feb 22, 2019): `WiFi.disconnect(false,true); ` This erases existing AP credentials.
Author
Owner

@angus-grant commented on GitHub (Oct 23, 2019):

None of that stuff worked. I searched for so long across so many resources.

I ended up digging around in the ESP code base and happened upon this little nugget

ESP_ERROR_CHECK(nvs_flash_erase());
nvs_flash_init();

This seems to have cleared my "AUTH_EXPIRE" credentials and got my WiFi working again. One caution is that it clears everything in flash. So if you are using preferences library, etc, it all gets wiped.

<!-- gh-comment-id:545302721 --> @angus-grant commented on GitHub (Oct 23, 2019): None of that stuff worked. I searched for so long across so many resources. I ended up digging around in the ESP code base and happened upon this little nugget ESP_ERROR_CHECK(nvs_flash_erase()); nvs_flash_init(); This seems to have cleared my "AUTH_EXPIRE" credentials and got my WiFi working again. One caution is that it clears everything in flash. So if you are using preferences library, etc, it all gets wiped.
Author
Owner

@tablatronix commented on GitHub (Oct 23, 2019):

You should not have to nvs erase to clear credentials, your memory was probably corrupt or changed from an upgrade.

<!-- gh-comment-id:545423430 --> @tablatronix commented on GitHub (Oct 23, 2019): You should not have to nvs erase to clear credentials, your memory was probably corrupt or changed from an upgrade.
Author
Owner

@angus-grant commented on GitHub (Oct 23, 2019):

Well after a month and delayed shipping of product, I'll take any solution. :-|

The strange thing is that values I was saving with the preferences library would save into flash, and be re-loaded after next reboot. It was the WiFi which would simply not connect always giving AUTH_EXPIRE exception. So I think it was related to a WiFi problem and nor corrupt memory. But maybe the corruption was just with the WiFi details that were saved.

<!-- gh-comment-id:545424791 --> @angus-grant commented on GitHub (Oct 23, 2019): Well after a month and delayed shipping of product, I'll take any solution. :-| The strange thing is that values I was saving with the preferences library would save into flash, and be re-loaded after next reboot. It was the WiFi which would simply not connect always giving AUTH_EXPIRE exception. So I *think* it was related to a WiFi problem and nor corrupt memory. But maybe the corruption was just with the WiFi details that were saved.
Author
Owner

@tablatronix commented on GitHub (Oct 23, 2019):

Yes if your partition is corrupt your wifi gets corrupted as things write into its memory space, so it might seem to work but some part of it is broken and messed up connections, I wish there was some kind of parity check here, also there was no protection for wifi struct schema when it was changed, I think there is now so upgrades wont break it as much. I always do a full erase if moving to a new version of sdk or lib.

<!-- gh-comment-id:545431915 --> @tablatronix commented on GitHub (Oct 23, 2019): Yes if your partition is corrupt your wifi gets corrupted as things write into its memory space, so it might seem to work but some part of it is broken and messed up connections, I wish there was some kind of parity check here, also there was no protection for wifi struct schema when it was changed, I think there is now so upgrades wont break it as much. I always do a full erase if moving to a new version of sdk or lib.
Author
Owner

@angus-grant commented on GitHub (Oct 23, 2019):

Your info is interesting and something I'll remember when doing sdk or library upgrades..

But I changed nothing. One day it was working, the next day it wasn't...
Oh well, problem worked around/solved.

Thanks for your comments!

<!-- gh-comment-id:545436204 --> @angus-grant commented on GitHub (Oct 23, 2019): Your info is interesting and something I'll remember when doing sdk or library upgrades.. But I changed nothing. One day it was working, the next day it wasn't... Oh well, problem worked around/solved. Thanks for your comments!
Author
Owner

@qlalfdu commented on GitHub (Dec 17, 2019):

WiFi.mode(WIFI_STA);
WiFi.disconnect(true,true);

<!-- gh-comment-id:566615051 --> @qlalfdu commented on GitHub (Dec 17, 2019): WiFi.mode(WIFI_STA); WiFi.disconnect(true,true);
Author
Owner

@tablatronix commented on GitHub (Feb 20, 2020):

Lol it says it right there in the code

//reset saved settings
//wifiManager.resetSettings();

<!-- gh-comment-id:589017971 --> @tablatronix commented on GitHub (Feb 20, 2020): Lol it says it right there in the code //reset saved settings //wifiManager.resetSettings();
Author
Owner

@lloydrichards commented on GitHub (Mar 9, 2020):

I'm having a similar problem. wifiManager.resetSettings() does not reset the credentials.. I'm literally running the base example:

#if defined(ESP8266)
#include <ESP8266WiFi.h>          //https://github.com/esp8266/Arduino
#else
#include <WiFi.h>          //https://github.com/esp8266/Arduino
#endif

//needed for library
#include <DNSServer.h>
#if defined(ESP8266)
#include <ESP8266WebServer.h>
#else
#include <WebServer.h>
#endif
#include <WiFiManager.h>         //https://github.com/tzapu/WiFiManager


void setup() {
    // put your setup code here, to run once:
    Serial.begin(115200);

    //WiFiManager
    //Local intialization. Once its business is done, there is no need to keep it around
    WiFiManager wifiManager;
    //reset saved settings
    wifiManager.resetSettings();
    
    //set custom ip for portal
    //wifiManager.setAPStaticIPConfig(IPAddress(10,0,1,1), IPAddress(10,0,1,1), IPAddress(255,255,255,0));

    //fetches ssid and pass from eeprom and tries to connect
    //if it does not connect it starts an access point with the specified name
    //here  "AutoConnectAP"
    //and goes into a blocking loop awaiting configuration
    wifiManager.autoConnect("AutoConnectAP");
    //or use this for auto generated name ESP + ChipID
    //wifiManager.autoConnect();

    
    //if you get here you have connected to the WiFi
    Serial.println("connected...yeey :)");
}

void loop() {
    // put your main code here, to run repeatedly:
    
}

And its still giving me this in console:

*WM: Connection result: *WM: 3 *WM: IP Address: *WM: 192.168.1.178 connected...yeey :)

Either something is wrong with the function or its still storing the creds somewhere else?

<!-- gh-comment-id:596826349 --> @lloydrichards commented on GitHub (Mar 9, 2020): I'm having a similar problem. wifiManager.resetSettings() does not reset the credentials.. I'm literally running the base example: ```C++ #if defined(ESP8266) #include <ESP8266WiFi.h> //https://github.com/esp8266/Arduino #else #include <WiFi.h> //https://github.com/esp8266/Arduino #endif //needed for library #include <DNSServer.h> #if defined(ESP8266) #include <ESP8266WebServer.h> #else #include <WebServer.h> #endif #include <WiFiManager.h> //https://github.com/tzapu/WiFiManager void setup() { // put your setup code here, to run once: Serial.begin(115200); //WiFiManager //Local intialization. Once its business is done, there is no need to keep it around WiFiManager wifiManager; //reset saved settings wifiManager.resetSettings(); //set custom ip for portal //wifiManager.setAPStaticIPConfig(IPAddress(10,0,1,1), IPAddress(10,0,1,1), IPAddress(255,255,255,0)); //fetches ssid and pass from eeprom and tries to connect //if it does not connect it starts an access point with the specified name //here "AutoConnectAP" //and goes into a blocking loop awaiting configuration wifiManager.autoConnect("AutoConnectAP"); //or use this for auto generated name ESP + ChipID //wifiManager.autoConnect(); //if you get here you have connected to the WiFi Serial.println("connected...yeey :)"); } void loop() { // put your main code here, to run repeatedly: } ``` And its still giving me this in console: `*WM: Connection result: *WM: 3 *WM: IP Address: *WM: 192.168.1.178 connected...yeey :) ` Either something is wrong with the function or its still storing the creds somewhere else?
Author
Owner

@tablatronix commented on GitHub (Mar 10, 2020):

esp8266?

Do you have serial logs?

<!-- gh-comment-id:596856615 --> @tablatronix commented on GitHub (Mar 10, 2020): esp8266? Do you have serial logs?
Author
Owner

@lloydrichards commented on GitHub (Mar 10, 2020):

on ESP32 Dev Module. The serial logs are at the bottom there:

*WM: Connection result:
*WM: 3
*WM: IP Address:
*WM: 192.168.1.178
connected...yeey :)

My workaround currently is to set up a manual config for the AP and attach to a button, but this means having to connect everytime which is frustrating

<!-- gh-comment-id:596950876 --> @lloydrichards commented on GitHub (Mar 10, 2020): on ESP32 Dev Module. The serial logs are at the bottom there: *WM: Connection result: *WM: 3 *WM: IP Address: *WM: 192.168.1.178 connected...yeey :) My workaround currently is to set up a manual config for the AP and attach to a button, but this means having to connect everytime which is frustrating
Author
Owner

@litamin commented on GitHub (Mar 11, 2020):

Having same issue as lloydrichards here, running on a ESP32 Doit-devkit-v1.
wifiManager.resetSettings() does not do what it is supposed to do (to reset wifi credentials).

Should mention that I'm using https://github.com/zhouhan0126/WIFIMANAGER-ESP32 library, because to my understanding the original Tzapu library cannot run on ESP32?

<!-- gh-comment-id:597867460 --> @litamin commented on GitHub (Mar 11, 2020): Having same issue as lloydrichards here, running on a ESP32 Doit-devkit-v1. _wifiManager.resetSettings()_ does not do what it is supposed to do (to reset wifi credentials). Should mention that I'm using https://github.com/zhouhan0126/WIFIMANAGER-ESP32 library, because to my understanding the original Tzapu library cannot run on ESP32?
Author
Owner

@Daemach commented on GitHub (Mar 11, 2020):

I run it on ESP32

On Wed, Mar 11, 2020 at 1:39 PM shazman-visuals notifications@github.com
wrote:

Having same issue as lloydrichards here, running on a ESP32 Doit-devkit-v1.
wifiManager.resetSettings() does not do what it is supposed to do (to
reset wifi credentials).

Should mention that I'm using
https://github.com/zhouhan0126/WIFIMANAGER-ESP32 library, because to my
understanding the original Tzapu library cannot run on ESP32?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/tzapu/WiFiManager/issues/142#issuecomment-597867460,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AC7Y5YJ3RP7Y4TMQIRNYIPLRG7ZINANCNFSM4B7HYKVQ
.

<!-- gh-comment-id:597911588 --> @Daemach commented on GitHub (Mar 11, 2020): I run it on ESP32 On Wed, Mar 11, 2020 at 1:39 PM shazman-visuals <notifications@github.com> wrote: > Having same issue as lloydrichards here, running on a ESP32 Doit-devkit-v1. > *wifiManager.resetSettings()* does not do what it is supposed to do (to > reset wifi credentials). > > Should mention that I'm using > https://github.com/zhouhan0126/WIFIMANAGER-ESP32 library, because to my > understanding the original Tzapu library cannot run on ESP32? > > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on GitHub > <https://github.com/tzapu/WiFiManager/issues/142#issuecomment-597867460>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AC7Y5YJ3RP7Y4TMQIRNYIPLRG7ZINANCNFSM4B7HYKVQ> > . >
Author
Owner

@tablatronix commented on GitHub (Mar 12, 2020):

Development branch does

<!-- gh-comment-id:597957205 --> @tablatronix commented on GitHub (Mar 12, 2020): Development branch does
Author
Owner

@litamin commented on GitHub (Mar 12, 2020):

Cool, so is there a way to reset Wifi credentials or not?
wifiManager.resetSettings() is not doing the job.

<!-- gh-comment-id:598099981 --> @litamin commented on GitHub (Mar 12, 2020): Cool, so is there a way to reset Wifi credentials or not? _wifiManager.resetSettings()_ is not doing the job.
Author
Owner

@tablatronix commented on GitHub (Mar 12, 2020):

I have not had time to look into it, could be a bug, try erase flash also

<!-- gh-comment-id:598234522 --> @tablatronix commented on GitHub (Mar 12, 2020): I have not had time to look into it, could be a bug, try erase flash also
Author
Owner

@lloydrichards commented on GitHub (Mar 12, 2020):

If it helps for debugging, I was finding that even when I flashed a new program and the went back to something including the wifimanager it would still have my credentials saved when using wifiManager.autoConnect(). This doesn't seem to affect wifiManager.startConfigPortal(), but i'm guessing that cause its just overwriting the credentials. Might give some experimenting to calling wifiManager.autoConnect() to start and then wifiManager.startConfigPortal() when i need to override

<!-- gh-comment-id:598278534 --> @lloydrichards commented on GitHub (Mar 12, 2020): If it helps for debugging, I was finding that even when I flashed a new program and the went back to something including the wifimanager it would still have my credentials saved when using wifiManager.autoConnect(). This doesn't seem to affect wifiManager.startConfigPortal(), but i'm guessing that cause its just overwriting the credentials. Might give some experimenting to calling wifiManager.autoConnect() to start and then wifiManager.startConfigPortal() when i need to override
Author
Owner

@tablatronix commented on GitHub (Mar 12, 2020):

the ESP saves your credentials not WM

<!-- gh-comment-id:598337825 --> @tablatronix commented on GitHub (Mar 12, 2020): the ESP saves your credentials not WM
Author
Owner

@tablatronix commented on GitHub (Mar 13, 2020):

Works for me

*WM: [1] SETTINGS ERASED 
*WM: [3] WiFi station enable 
*WM: [3] enableSTA PERSISTENT ON 

 ets Jan  8 2013,rst cause:4, boot mode:(3,6)

wdt reset
load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d
v8b899c12
~ld

 Starting
*WM: [1] getCoreVersion():          2_5_2
*WM: [1] system_get_sdk_version():  2.2.1(cfd48f3)
*WM: [1] system_get_boot_version(): 31
*WM: [1] getFreeHeap():             49088
Mode: STA
PHY mode: N
Channel: 1
AP id: 0
Status: 0
Auto connect: 1
SSID (0): 
Passphrase (0): 
BSSID set: 0
YES
SSID: 
PASS: 
<!-- gh-comment-id:598803516 --> @tablatronix commented on GitHub (Mar 13, 2020): Works for me ```PHP *WM: [1] SETTINGS ERASED *WM: [3] WiFi station enable *WM: [3] enableSTA PERSISTENT ON ets Jan 8 2013,rst cause:4, boot mode:(3,6) wdt reset load 0x4010f000, len 1384, room 16 tail 8 chksum 0x2d csum 0x2d v8b899c12 ~ld Starting *WM: [1] getCoreVersion(): 2_5_2 *WM: [1] system_get_sdk_version(): 2.2.1(cfd48f3) *WM: [1] system_get_boot_version(): 31 *WM: [1] getFreeHeap(): 49088 Mode: STA PHY mode: N Channel: 1 AP id: 0 Status: 0 Auto connect: 1 SSID (0): Passphrase (0): BSSID set: 0 YES SSID: PASS: ```
Author
Owner

@tablatronix commented on GitHub (Mar 13, 2020):

Let me try esp32

<!-- gh-comment-id:598803896 --> @tablatronix commented on GitHub (Mar 13, 2020): Let me try esp32
Author
Owner

@tablatronix commented on GitHub (Mar 13, 2020):

Also works


*WM: [1] resetSettings 
*WM: [3] WiFi station enable 
*WM: [1] SETTINGS ERASED 
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:928
ho 0 tail 12 room 4
load:0x40078000,len:8740
load:0x40080400,len:5800
entry 0x4008069c

 Starting
*WM: [1] Free heap:        210252
*WM: [1] ESP-IDF version:  v3.2.2-132-g7dd492319-dirty
Mode: STA
Channel: 1
SSID (0): 
Passphrase (0): 
BSSID set: 0
YES
SSID: 
PASS: 
<!-- gh-comment-id:598807329 --> @tablatronix commented on GitHub (Mar 13, 2020): Also works ```PHP *WM: [1] resetSettings *WM: [3] WiFi station enable *WM: [1] SETTINGS ERASED ets Jun 8 2016 00:22:57 rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0018,len:4 load:0x3fff001c,len:928 ho 0 tail 12 room 4 load:0x40078000,len:8740 load:0x40080400,len:5800 entry 0x4008069c Starting *WM: [1] Free heap: 210252 *WM: [1] ESP-IDF version: v3.2.2-132-g7dd492319-dirty Mode: STA Channel: 1 SSID (0): Passphrase (0): BSSID set: 0 YES SSID: PASS: ```
Author
Owner

@tablatronix commented on GitHub (Mar 13, 2020):

I cannot reproduce, I need you to erase flash, and try again and I will need more information

<!-- gh-comment-id:598815718 --> @tablatronix commented on GitHub (Mar 13, 2020): I cannot reproduce, I need you to erase flash, and try again and I will need more information
Author
Owner

@rodrigok1 commented on GitHub (Jun 3, 2020):

How to get the saved SSID and password?

<!-- gh-comment-id:638432871 --> @rodrigok1 commented on GitHub (Jun 3, 2020): How to get the saved SSID and password?
Author
Owner

@peperoca116 commented on GitHub (Nov 20, 2020):

To get the credentials you need the following:

WiFi.begin(); // Mandatory
delay(1000);
String TEMP_Ssid = WiFi.SSID();
String TEMP_Pass = WiFi.psk();

Done! You get credentials without the need to store them neither in spiffs nor in EEPROM

<!-- gh-comment-id:730854766 --> @peperoca116 commented on GitHub (Nov 20, 2020): To get the credentials you need the following: WiFi.begin(); // Mandatory delay(1000); String TEMP_Ssid = WiFi.SSID(); String TEMP_Pass = WiFi.psk(); Done! You get credentials without the need to store them neither in spiffs nor in EEPROM
Author
Owner

@neklauss commented on GitHub (Mar 26, 2021):

The libraries built in WifiManager::erase() method did the trick for me.

<!-- gh-comment-id:808158578 --> @neklauss commented on GitHub (Mar 26, 2021): The libraries built in WifiManager::erase() method did the trick for me.
Author
Owner

@CplSyx commented on GitHub (Feb 9, 2023):

For factory reset you need to use esptool to erase flash also the arduino ide now has erase capability

wifiManager.resetSettings() was not working for me (ESP8266) as autoConnect would recover the credentials - however erasing the flash via the IDE has solved the issue.

<!-- gh-comment-id:1424355951 --> @CplSyx commented on GitHub (Feb 9, 2023): > [For factory reset you need to use esptool to erase flash also the arduino ide now has erase capability](https://github.com/tzapu/WiFiManager/issues/142#issuecomment-444468942) wifiManager.resetSettings() was not working for me (ESP8266) as autoConnect would recover the credentials - however erasing the flash via the IDE has solved the issue.
Author
Owner

@tablatronix commented on GitHub (Feb 9, 2023):

Interesting, it should erase them, but maybe there was an esp bug in some version you were using

<!-- gh-comment-id:1424750413 --> @tablatronix commented on GitHub (Feb 9, 2023): Interesting, it should erase them, but maybe there was an esp bug in some version you were using
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#110
No description provided.