mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 09:05:56 +03:00
[GH-ISSUE #704] Try to reset memory when button is pressed #591
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#591
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 @tomasbond on GitHub (Aug 21, 2018).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/704
Basic Infos
Hardware
WiFimanager Branch/Release: Development
Esp8266: Nodemcu v3
Hardware: ESP-12e
Core Version: 2.4.0, staging
Description
Trying to make the onboard flash run a reset on the wifi memory, running the wifiManager.resetSettings() function.
Settings in IDE
Module: NodeMcu, Wemos D1
Additional libraries:
Sketch
Debug Messages
Where should i put that code so when i press the flash button in the board it runs a memory reset and forget the ssid and password? tryied to put it here and doesnt work. On terminal i can see a New Client but nothing happens when the button is pressed
@tablatronix commented on GitHub (Aug 21, 2018):
I think you have to reboot after erasing settings.
I mean what do you expect to happen?
What do the serial debug say?
Do a printdiag and see that its empty
@tomasbond commented on GitHub (Aug 21, 2018):
Hi! Thanks for your reply! I used a Serial.print("DEBUG"); to see the loop action and the ESP serial stays in, New Client. As there is something avoiding the ESP enter again the loop. Right now im not at home but as soon as i get there ill update on this. My expectation was to add the resetSettings to a button and that should be run if the button is triggered. Of course module should restart to forget actual wifi connections (i think) and give a fresh new start. But the problem is that the code wont read the button and trigger the resetSettings function.
@tablatronix commented on GitHub (Aug 21, 2018):
did you set the pinmode in setup ?
@tablatronix commented on GitHub (Aug 21, 2018):
you have a while loop
while (client.connected()) {
so yeah its gonna stay in there
@tablatronix commented on GitHub (Aug 29, 2018):
please close if solved
@emry78 commented on GitHub (Apr 14, 2019):
HI All
I'm emry beginner. i read all the conversation about reset button. But i cannot emigine the reset connect to. i m using huzzah esp8266. i run autoconnect on wifimanager library. Need help to show the connection reset button and code in arduino ide. Thanks.
@zshift commented on GitHub (Apr 3, 2020):
I implemented this in conjunction with EasyButton.
@zshift commented on GitHub (Apr 3, 2020):
But on that note, this shouldn't be an issue for the WiFiManager. Restarting the ESP is independent of clearing settings. I recommend closing this issue.
@andysc commented on GitHub (Nov 24, 2021):
I'm trying to make the ESP8266 forget its wifi credentials - I've tried
wifiManager.resetSettings();and
Wifi.disconnect(true);with
delay(2000);ESP.reset();thrown in for good measure, but every time it comes back with the last successful connection details, saying:
*WM: Using last saved values, should be fasterI've even tried setting them to nonsense values (using
Wifi.begin("xxx", "xxx");but it still goes back to the old ones on next reboot.Is there a reliable way to nuke the credentials?
@tablatronix commented on GitHub (Nov 24, 2021):
That is supposed to work...
@andysc commented on GitHub (Nov 25, 2021):
oh, it looks like I'm hideously back-level!
0.15.0-beta!!!Sorry... I'll upgrade and report back
@andysc commented on GitHub (Nov 25, 2021):
should I be trying 2.00 or 0.16 ?? Are there breaking changes in 2.0 ?
@andysc commented on GitHub (Nov 25, 2021):
OK, here's my little test case:
When I run that I get...
so it the
resetSettings()doesn't seem to have any effect .This is on
v0.16.0@andysc commented on GitHub (Nov 25, 2021):
On
v2.0.5-beta... it works great!
OK - you can close this now :)
@andysc commented on GitHub (Nov 25, 2021):
aha - I see there's some additional magic in this version...
Thanks :)
@andysc commented on GitHub (Nov 25, 2021):
looks like there's more to it than that, as just adding those lines into my sketch doesn't erase the credentials.
Anyway... latest library seems to be the answer :)
@andysc commented on GitHub (Nov 25, 2021):
Cracked it :)
THAT resets the wifi credentials.
(you do not need to restart the ESP afterwards for it to take effect)
@tablatronix commented on GitHub (Nov 25, 2021):
Not sure what you mean , are you trying to fix this in v0?
@andysc commented on GitHub (Nov 25, 2021):
yes, I was trying to work out what you did in v2 that makes it work, that didn't work in v0.
@tablatronix commented on GitHub (Nov 26, 2021):
The whole thing was reworked, so no idea. Did not know it was not working. Ill look and maybe patch it maybe. But its totally worth switching to v2 at this time if you have the flash