Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Erase saved WiFi access points #3066

Closed
hieuv opened this issue Mar 21, 2017 · 8 comments
Closed

Erase saved WiFi access points #3066

hieuv opened this issue Mar 21, 2017 · 8 comments
Labels
waiting for feedback Waiting on additional info. If it's not received, the issue may be closed.

Comments

@hieuv
Copy link

hieuv commented Mar 21, 2017

I used WiFiMulti in the past to connect to different WiFi networks. Now I want to forget all of those WiFi configurations (the module keep trying to connect to a (now turned) bad AP).
I tried to follow #1494 and investigate these solutions:

ESP.eraseConfig(); *((int*)0) = 0;

ESP.eraseConfig(); ESP.reset();

Neither worked.

Do anyone know any better way to do this?

@tablatronix
Copy link
Contributor

in code or permanently ?
You can use the esptool to erase_flash entirely.

@hieuv
Copy link
Author

hieuv commented Mar 27, 2017

Ah, yes. after a while I decided to erase flash and it turned out to be the solution.

But now I have two questions.

  1. I read some GitHub issues and learned that WiFiMulti is not actually using the flash space reserved for storing WiFi credentials. If so, how is it storing WiFi credentials in a non-volatile way?

  2. If I want to erase WiFiMulti's stored credentials during run time, what are my options?

@tablatronix
Copy link
Contributor

It stores the last successful ap but not all.
You can disable persistent to disaae autonsaving

@devyte
Copy link
Collaborator

devyte commented Sep 8, 2017

@hieuv did calling persistent(false) address your issue?

@devyte devyte added the waiting for feedback Waiting on additional info. If it's not received, the issue may be closed. label Sep 8, 2017
@hieuv
Copy link
Author

hieuv commented Sep 9, 2017

To be honest with you, this was so long ago that I do not remember any details anymore. I will see if I can reproduce the issue and see if the solution above fixes it.

@devyte
Copy link
Collaborator

devyte commented Oct 10, 2017

@hieuv were you able to reproduce the issue?

@electron1979
Copy link

electron1979 commented Jan 2, 2018

WiFi.disconect() worked for me first go.

ESP.eraseConfig then ESP.reset() OR ESP.eraseConfig() then ESP.restart() did not work for me.
I did not try the *((int*) 0) = 0; thing.

The answer to this question was covered here and here.

@devyte
Copy link
Collaborator

devyte commented Feb 28, 2018

Closing due to age and previous comment.

@devyte devyte closed this as completed Feb 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for feedback Waiting on additional info. If it's not received, the issue may be closed.
Projects
None yet
Development

No branches or pull requests

4 participants