mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-05-01 11:05:58 +03:00
[GH-ISSUE #402] resetsettings unreliable #339
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#339
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 @tablatronix on GitHub (Aug 29, 2017).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/402
@tzapu I need to fix resetsettings not compatible with persistent false.
And there is no api to remove wifi credentials.
Do you know if there is a reason to avoid using ESP.erase_config ?
erase config seems to erase a chunk of memory, disconnect seems to erase config only station_config
which is ssid password bssid only
I guess erase will remove static ip, phy mode, etc
Thoughts ? I would rather use a proper SDK function or write one to do as intended of this function.
@tzapu commented on GitHub (Aug 29, 2017):
hi,
off the top of my head, erase config should not be all that bad.
the static ip is not saved anyway and calibration params being removed from cache might actually be beneficial.
one thing to not is that erase config as far as i remember needs the esp to reset immediately after, otherwise it doesn't appear to do anything until the next restart, or if there is a begin(ssid, psk) it writes to them => no effect at all from a user's pov
my line of thought, is that the workaround for persistent will end up biting us in the arse a lot worse than forcing credentials, maybe there s a nother way to work with the sdk rather than force bending it to our will
will give it a some thought and get back to you, i hope in a couple of days max
thanks again for everything
@tablatronix commented on GitHub (Aug 29, 2017):
I have implemented some workarounds for now.
Although almost every device i have used requires a reboot after saving
@tablatronix commented on GitHub (Aug 29, 2017):
Not that i want to force a restart just leveraging the esp lib if possible
@tarzan115 commented on GitHub (Aug 30, 2017):
try this maybe can help.
@tablatronix commented on GitHub (Aug 30, 2017):
my pr it is already using that
But I added
So user can control where we leave persistent , since there is no way to read its state.
User could always explicitly set it after , but this provided a wrapper in wifimanager to handle anytime we modify it or teardown.
@jwktje commented on GitHub (Jan 28, 2018):
I'm confused about this too! After resetting the settings, it still autoconnects to the last network. Does setRestorePersistent(false) force this to not happen?
@tablatronix commented on GitHub (Jan 28, 2018):
I will have to test this, it should work in the development branch, let me know if you find otherwise and post logs
setRestorePersistent(bool) is just what to set it back to when and if wifimanager unloads
@jwktje commented on GitHub (Jan 28, 2018):
Logs show the settings being reset but it still connects. Would you like full logs?
@tablatronix commented on GitHub (Jan 28, 2018):
yes please
@jwktje commented on GitHub (Jan 28, 2018):
@tablatronix commented on GitHub (Jan 28, 2018):
is this an example ?
@jwktje commented on GitHub (Jan 28, 2018):
This is what the Logs show me after calling the WifiManager with this in setup:
@tablatronix commented on GitHub (Jan 28, 2018):
try reseting after resetsettings please
@jwktje commented on GitHub (Jan 28, 2018):
But that would cause a loop if I called ESP.restart() in the Setup function. I basically just want a hardware reset to cause it to forget the SSID and password.
@tablatronix commented on GitHub (Jan 28, 2018):
Do it once to see if it fixes it
@jwktje commented on GitHub (Jan 28, 2018):
Tried it once by adding ESP.restart(); after the resetSettings();.
As expected it started looping. And didn't fix the problem.
Is there another way to force the ESP to forget it's last credentials in Setup?
@tablatronix commented on GitHub (Jan 28, 2018):
So after removing the reset it still autoconnects? Hmm
@jwktje commented on GitHub (Jan 28, 2018):
Yep exactly. Weird. Because I remember the resetSettings() working fine before I updated the library to the current ESP32 branch. Everything else is very stable now but this suddenly stopped working as expected. Any idea what could be the problem?
@tablatronix commented on GitHub (Jan 28, 2018):
Esp32 branch has not been tested against esp8266 fully either.
@tablatronix commented on GitHub (Jan 28, 2018):
Oh which esp library version?
@jwktje commented on GitHub (Jan 28, 2018):
Wemos Lolin32 which has the ESP-WROOM-32.
Running with this Library
@tablatronix commented on GitHub (Jan 28, 2018):
Esp 2.4.0? Or staging?
@tablatronix commented on GitHub (Jan 28, 2018):
Oh and keep esp32 issues in the esp32 issue for now, this is specific to esp8266
@tablatronix commented on GitHub (Jan 29, 2018):
@jwktje try now
@jwktje commented on GitHub (Jan 29, 2018):
Works perfectly now! Great job, thanks! :D