mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 09:05:56 +03:00
[GH-ISSUE #959] autoconnect does not work after power failure or reset #811
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#811
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 @gabi68 on GitHub (Nov 4, 2019).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/959
PLEASE TRY DEVELOPMENT BRANCH before submitting bugs on release or master, in case they were already fixed.
POST SERIAL OUTPUT !
Issues without basic info will be ignored or closed!
Please fill the info fields, it helps to get you faster support ;)
if you have a stack dump decode it:
https://github.com/esp8266/Arduino/blob/master/doc/Troubleshooting/stack_dump.rst
for better debug messages:
https://github.com/esp8266/Arduino/blob/master/doc/Troubleshooting/debugging.rst
----------------------------- Remove above -----------------------------
Basic Infos
Hardware
WiFimanager Branch/Release:
Esp8266/Esp32:
Hardware: ESP-12e, esp01, esp25
ESP Core Version: 2.4.0, staging
Description
All is working as it should be, until board loose power or is reseted. Parameter input (postcode) in the wifi setup screen are not retained after power failure or reset. Please somebody have a look and tell what is wrong and what do I need to write to fix it.
Settings in IDE
Module: NodeMcu, Wemos D1
Additional libraries:
Sketch
20:49:30.453 -> mounting FS...
20:49:30.521 -> mounted file system
20:49:30.623 -> *WM: Adding parameter
20:49:30.623 -> *WM: Postcode
20:49:30.623 -> *WM:
20:49:30.623 -> *WM: AutoConnect
20:49:30.623 -> *WM: Connecting as wifi client...
20:49:30.623 -> *WM: Using last saved values, should be faster
20:49:34.423 -> *WM: Connection result:
20:49:34.423 -> *WM: 3
20:49:34.423 -> *WM: IP Address:
20:49:34.423 -> *WM: 192.168.1.2
20:49:34.490 -> *WM: SET AP STA
20:49:34.490 -> *WM:
20:49:34.490 -> *WM: Configuring access point...
20:49:34.490 -> *WM: YourClockAP
20:49:34.965 -> *WM: AP IP address:
20:49:34.965 -> *WM: 192.168.4.1
20:49:34.999 -> *WM: HTTP server started
20:50:05.617 -> *WM: Request redirected to captive portal
20:50:05.651 -> *WM: Handle root
20:50:05.889 -> *WM: Request redirected to captive portal
20:50:05.889 -> *WM: Handle root
20:50:10.679 -> *WM: Handle root
20:50:15.939 -> *WM: Scan done
20:50:15.939 -> *WM: DIRECT-am[TV]UE46ES6800
20:50:15.939 -> *WM: -40
20:50:15.939 -> *WM: TALKTALK-1C1CA4
20:50:15.939 -> *WM: -53
20:50:15.939 -> *WM: TALKTALK167DDE
20:50:15.939 -> *WM: -62
20:50:15.939 -> *WM: BTHub5-QH8P
20:50:15.939 -> *WM: -91
20:50:15.939 -> *WM: Sent config page
20:50:34.477 -> *WM: WiFi save
20:50:34.477 -> *WM: Parameter
20:50:34.477 -> *WM: Postcode
20:50:34.477 -> *WM: rh106da
20:50:34.477 -> *WM: Sent wifi save page
20:50:36.477 -> *WM: Connecting to new AP
20:50:36.477 -> *WM: Connecting as wifi client...
20:50:36.511 -> *WM: Already connected. Bailing out.
20:50:36.544 -> Should save config
20:50:36.544 -> connected...yeey :)
20:50:36.544 -> saving config
20:50:36.714 -> {
20:50:36.714 -> "Postcode": "rh106da"
20:50:36.714 -> }
20:50:36.714 -> rh106da
@tablatronix commented on GitHub (Nov 5, 2019):
Are you actually saving into spiffs and reading back out?
@gabi68 commented on GitHub (Nov 5, 2019):
That is what I am trying to do. The "Postcode" value must be input by user and will be used in a weather api. In a case of power failure I need that value which is stored in config to be used for autoconnect. How should I do that?
@gabi68 commented on GitHub (Nov 5, 2019):
Is there a way to save the credentials and parameters somewhere?
When wifimanager is set to autoconnect to read that file (with all data necessary for connection).
@tablatronix commented on GitHub (Nov 5, 2019):
wifimanger does not itself store parameters, you have to do it yourself in your code. It only saves the wifi creds ( which is built into esp )
The spiffs example should already do that, and be a good starting point
@tablatronix commented on GitHub (Nov 5, 2019):
Your sketch should work , you are copying postcode out of the json file into
PostCodestrcpy(Postcode, json["Postcode"]);@gabi68 commented on GitHub (Nov 5, 2019):
It's working as it should be, but when esp8266 is in reset or has a power outage everything is going south. The credentials are saved, but the parameter is not. How can I save that parameter and reconnect with (autoconnect) with previous parameter (postcode).
@tablatronix commented on GitHub (Nov 5, 2019):
It should be saved in spiffs, add a debug and see if you can read it, if not do a full erase and try it again