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

Reset firmware to default page does not keep WIFI #2746

Closed
fmuntean opened this issue Nov 16, 2019 · 4 comments
Closed

Reset firmware to default page does not keep WIFI #2746

fmuntean opened this issue Nov 16, 2019 · 4 comments
Labels
Category: Settings Related to settings/configuration Type: Bug Considered a bug

Comments

@fmuntean
Copy link
Contributor

Using the latest Firmware build from mega branch
Had to reset the firmware defaults on my dev board ESP8266 4MB when not at home and selected to keep the WiFi settings however after reset the board did not keep those settings and asked me to select the WIFI network thus can't continue to the home page.

These are the logs I captured so far from the time I updated the WF:
Update: mfd_ESP8266_4096_80MHz_QIO_VCC_2019_11_16.bin
sleep disable
................................................................................................................................................................................................................................................................................................................................Update Success: 653392
Rebooting...

ets Jan 8 2013,rst cause:2, boot mode:(3,7)

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v8b899c12
@cp:0
ld
�U9231 : Info :

INIT : Booting version: MFD-mega-20191116 (ESP82xx Core 2_5_2, NONOS SDK 2.2.1(cfd48f3), LWIP: 2.1.2 PUYA support)
9232 : Info : INIT : Free RAM:36104
9233 : Info : INIT : Cold Boot - Restart Reason: Software/System restart
9235 : Info : FS : Mounting...
9256 : Info : FS : Mount successful, used 75802 bytes of 957314
9489 : Info : CRC : program checksum ...OK
9520 : Info : CRC : SecuritySettings CRC ...OK
9522 : Info : CRC : binary has changed since last save of Settings
9615 : Info : INIT : Free RAM:33352
9616 : Info : INIT : I2C
9616 : Info : INIT : SPI not enabled
9624 : Info : INFO : Plugins: 10 [Normal] (ESP82xx Core 2_5_2, NONOS SDK 2.2.1(cfd48f3), LWIP: 2.1.2 PUYA support)
9625 : Info : EVENT: System#Wake
9732 : Info : WIFI : Set WiFi to STA
9764 : Info : WIFI : Connecting Howard attempt #0
9778 : Info : EVENT: System#Boot
11412 : Info : WD : Uptime 0 ConnectFailures 0 FreeMem 30088 WiFiStatus 6
12770 : Info : EVENT: WiFi#Disconnected
12775 : Info : WIFI : Disconnected! Reason: '(201) No AP found' Connected for 2848 ms
12890 : Info : WIFI : Connecting Howard attempt #1
15885 : Info : EVENT: WiFi#Disconnected
15890 : Info : WIFI : Disconnected! Reason: '(201) No AP found' Connected for 2848 ms
16016 : Info : WIFI : Connecting Howard attempt #2
19013 : Info : EVENT: WiFi#Disconnected
19017 : Info : WIFI : Disconnected! Reason: '(201) No AP found' Connected for 2848 ms
19144 : Info : WIFI : Connecting Howard attempt #3
22140 : Info : EVENT: WiFi#Disconnected
22145 : Info : WIFI : Disconnected! Reason: '(201) No AP found' Connected for 2848 ms
22260 : Info : WIFI : Connecting Howard attempt #4
25256 : Info : EVENT: WiFi#Disconnected
25261 : Info : WIFI : Disconnected! Reason: '(201) No AP found' Connected for 2848 ms
25376 : Info : WIFI : Connecting Howard attempt #5
28384 : Info : EVENT: WiFi#Disconnected
28388 : Info : WIFI : Disconnected! Reason: '(201) No AP found' Connected for 2849 ms
28504 : Info : WIFI : Connecting Howard attempt #6
29771 : Info : WIFI : Set WiFi to AP+STA
29807 : Info : EVENT: WiFi#APmodeEnabled
29811 : Info : WIFI : AP Mode ssid will be ESP12-TEST with address 192.168.4.1
30135 : Info : AP Mode: Client connected: 7C:5C:F8:50:10:CC Connected devices: 1
30138 : Info : Webserver: start
41127 : Info : WD : Uptime 1 ConnectFailures 0 FreeMem 24848 WiFiStatus 0
60578 : Info : EVENT: Clock#Time=Thu,00:01
61381 : Info : SaveToFile: free stack: 3392
61405 : Info : FILE : Saved config.dat
61406 : Info : SaveToFile: free stack after: 3392
61411 : Info : SaveToFile: free stack: 3312
61450 : Info : FILE : Saved config.dat
61451 : Info : SaveToFile: free stack after: 3312
61453 : Info : SaveToFile: free stack: 3312
61474 : Info : FILE : Saved security.dat
61475 : Info : SaveToFile: free stack after: 3312
61596 : Info : WIFI : Connecting Howard attempt #0
64608 : Info : EVENT: WiFi#Disconnected
64634 : Info : WIFI : Disconnected! Reason: '(201) No AP found' Connected for 2850 ms
66728 : Info : AP Mode: Client disconnected: 7C:5C:F8:50:10:CC Connected devices: 1
66729 : Info : AP Mode: Client connected: 7C:5C:F8:50:10:CC Connected devices: 1
71430 : Info : WD : Uptime 1 ConnectFailures 0 FreeMem 24496 WiFiStatus 6
86295 : Info : SaveToFile: free stack: 3344
86333 : Info : FILE : Saved config.dat
86334 : Info : SaveToFile: free stack after: 3344
86341 : Info : SaveToFile: free stack: 3264
86379 : Info : FILE : Saved config.dat
86380 : Info : SaveToFile: free stack after: 3264
94232 : Info : SaveToFile: free stack: 3312
94250 : Info : FILE : Saved config.dat
94251 : Info : SaveToFile: free stack after: 3312
94256 : Info : SaveToFile: free stack: 3248
94294 : Info : FILE : Saved config.dat
94295 : Info : SaveToFile: free stack after: 3248
99302 : Info : SaveToFile: free stack: 3168
99320 : Info : FILE : Saved config.dat
99321 : Info : SaveToFile: free stack after: 3168
99323 : Info : SaveToFile: free stack: 3104
99360 : Info : FILE : Saved config.dat
99361 : Info : SaveToFile: free stack after: 3104
101494 : Info : WD : Uptime 2 ConnectFailures 0 FreeMem 24408 WiFiStatus 6
102249 : Info : SaveToFile: free stack: 3312
102267 : Info : FILE : Saved config.dat
102268 : Info : SaveToFile: free stack after: 3312
102273 : Info : SaveToFile: free stack: 3248
102310 : Info : FILE : Saved config.dat
102311 : Info : SaveToFile: free stack after: 3248
120888 : Info : EVENT: Clock#Time=Thu,00:02
131327 : Info : WD : Uptime 2 ConnectFailures 0 FreeMem 24904 WiFiStatus 6
143241 : Info : SaveToFile: free stack: 3120
143260 : Info : FILE : Saved config.dat
143261 : Info : SaveToFile: free stack after: 3120
143267 : Info : SaveToFile: free stack: 3392
143285 : Info : FILE : Saved config.dat
143286 : Info : SaveToFile: free stack after: 3392
143292 : Info : SaveToFile: free stack: 3328
143330 : Info : FILE : Saved config.dat
143331 : Info : SaveToFile: free stack after: 3328
143910 : Info : SYS : 2.00,24048.00,3.37,31.00
143912 : Info : EVENT: SYSTEM#Uptime=2.00
143937 : Info : EVENT: SYSTEM#FreeRAM=24048.00
143941 : Info : EVENT: SYSTEM#VCC=3.37
143945 : Info : EVENT: SYSTEM#WiFi=31.00
161688 : Info : WD : Uptime 3 ConnectFailures 0 FreeMem 24488 WiFiStatus 6
180698 : Info : SaveToFile: free stack: 3200
180736 : Info : FILE : Saved config.dat
180737 : Info : SaveToFile: free stack after: 3200
181257 : Info : EVENT: Clock#Time=Thu,00:03
191517 : Info : WD : Uptime 3 ConnectFailures 0 FreeMem 22904 WiFiStatus 6
203770 : Info : SYS : 3.00,24560.00,3.37,31.00
203772 : Info : EVENT: SYSTEM#Uptime=3.00
203797 : Info : EVENT: SYSTEM#FreeRAM=24560.00
203801 : Info : EVENT: SYSTEM#VCC=3.37
203805 : Info : EVENT: SYSTEM#WiFi=31.00
221425 : Info : WD : Uptime 4 ConnectFailures 0 FreeMem 24456 WiFiStatus 6
240969 : Info : EVENT: Clock#Time=Thu,00:04
251498 : Info : WD : Uptime 4 ConnectFailures 0 FreeMem 24456 WiFiStatus 6
263823 : Info : SYS : 4.00,24560.00,3.37,31.00
263826 : Info : EVENT: SYSTEM#Uptime=4.00
263830 : Info : EVENT: SYSTEM#FreeRAM=24560.00
263834 : Info : EVENT: SYSTEM#VCC=3.37
263839 : Info : EVENT: SYSTEM#WiFi=31.00
277888 : Info : SaveToFile: free stack: 3248
277927 : Info : FILE : Saved config.dat
277929 : Info : SaveToFile: free stack after: 3248
281700 : Info : WD : Uptime 5 ConnectFailures 0 FreeMem 24456 WiFiStatus 6
300939 : Info : EVENT: Clock#Time=Thu,00:05
311417 : Info : WD : Uptime 5 ConnectFailures 0 FreeMem 24176 WiFiStatus 6
323837 : Info : SYS : 5.00,24560.00,3.37,31.00
323841 : Info : EVENT: SYSTEM#Uptime=5.00
323866 : Info : EVENT: SYSTEM#FreeRAM=24560.00
323872 : Info : EVENT: SYSTEM#VCC=3.37
323877 : Info : EVENT: SYSTEM#WiFi=31.00
RESET: Resetting factory defaults... using default settings
RESET: Warm boot, reset count: 0
RESET: formatting...
RESET: formatting done...
348007 : Info : SaveToFile: free stack: 3280
348045 : Info : FILE : Saved config.dat
348047 : Info : SaveToFile: free stack after: 3280
RESET: Succesful, rebooting. (you might need to press the reset button if you've justed flashed the firmware)

ets Jan 8 2013,rst cause:2, boot mode:(3,7)

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v8b899c12
~ld
�U43 : Info :

INIT : Booting version: MFD-mega-20191116 (ESP82xx Core 2_5_2, NONOS SDK 2.2.1(cfd48f3), LWIP: 2.1.2 PUYA support)
44 : Info : INIT : Free RAM:35968
45 : Info : INIT : Warm boot #1 Last Task: Const Interval timer, id: 3 - Restart Reason: Software/System restart
48 : Info : FS : Mounting...
69 : Info : FS : Mount successful, used 75802 bytes of 957314
301 : Info : CRC : program checksum ...OK
333 : Error : CRC : SecuritySettings CRC ...FAIL
405 : Info : INIT : Free RAM:32792
408 : Info : INIT : I2C
409 : Info : INIT : SPI not enabled
418 : Info : INFO : Plugins: 10 [Normal] (ESP82xx Core 2_5_2, NONOS SDK 2.2.1(cfd48f3), LWIP: 2.1.2 PUYA support)
421 : Info : EVENT: System#Wake
428 : Error : WIFI : No valid wifi settings
532 : Info : WIFI : Set WiFi to AP
568 : Info : EVENT: WiFi#APmodeEnabled
574 : Info : WIFI : AP Mode ssid will be ESP12-TEST_0 with address 192.168.4.1
577 : Error : WIFI : Could not prepare WiFi!
593 : Info : EVENT: System#Boot
2227 : Info : WD : Uptime 0 ConnectFailures 0 FreeMem 28544 WiFiStatus 6
7102 : Info : AP Mode: Client connected: 7C:5C:F8:50:10:CC Connected devices: 1
7106 : Info : Webserver: start
8774 : Info : Start scan for WiFi APs
11065 : Info : WIFI : Set WiFi to AP
15000 : Info : AP Mode: Client disconnected: 7C:5C:F8:50:10:CC Connected devices: 1
15003 : Info : AP Mode: Client connected: 7C:5C:F8:50:10:CC Connected devices: 1
32178 : Info : WD : Uptime 1 ConnectFailures 0 FreeMem 22520 WiFiStatus 6
60710 : Info : EVENT: Clock#Time=Thu,00:01
62219 : Info : WD : Uptime 1 ConnectFailures 0 FreeMem 23712 WiFiStatus 6
63731 : Info : AP Mode: Client disconnected: 7C:5C:F8:50:10:CC Connected devices: 0
75077 : Info : WIFI : Set WiFi to OFF
76081 : Info : EVENT: WiFi#APmodeDisabled
80592 : Info : WIFI : Set WiFi to AP
80693 : Info : WIFI : Set WiFi to AP
80794 : Info : WIFI : Set WiFi to AP
80895 : Info : WIFI : Set WiFi to AP
80996 : Info : WIFI : Set WiFi to AP
81097 : Info : WIFI : Set WiFi to AP
81198 : Info : WIFI : Set WiFi to AP
81299 : Info : WIFI : Set WiFi to AP
ets Jan 8 2013,rst cause:4, boot mode:(3,7)

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

INIT : Booting version: MFD-mega-20191116 (ESP82xx Core 2_5_2, NONOS SDK 2.2.1(cfd48f3), LWIP: 2.1.2 PUYA support)
45 : Info : INIT : Free RAM:35968
46 : Info : INIT : Warm boot #2 Last Task: Const Interval timer, id: 2 - Restart Reason: Hardware Watchdog
49 : Info : FS : Mounting...
70 : Info : FS : Mount successful, used 75802 bytes of 957314
302 : Info : CRC : program checksum ...OK
334 : Error : CRC : SecuritySettings CRC ...FAIL
406 : Info : INIT : Free RAM:32808
409 : Info : INIT : I2C
410 : Info : INIT : SPI not enabled
419 : Info : INFO : Plugins: 10 [Normal] (ESP82xx Core 2_5_2, NONOS SDK 2.2.1(cfd48f3), LWIP: 2.1.2 PUYA support)
422 : Info : EVENT: System#Wake
430 : Error : WIFI : No valid wifi settings
533 : Info : WIFI : Set WiFi to AP
569 : Info : EVENT: WiFi#APmodeEnabled
575 : Info : WIFI : AP Mode ssid will be ESP12-TEST_0 with address 192.168.4.1
578 : Error : WIFI : Could not prepare WiFi!
594 : Info : EVENT: System#Boot
2228 : Info : WD : Uptime 0 ConnectFailures 0 FreeMem 28560 WiFiStatus 6
32208 : Info : WD : Uptime 1 ConnectFailures 0 FreeMem 28528 WiFiStatus 6
60690 : Info : EVENT: Clock#Time=Thu,00:01
62306 : Info : WD : Uptime 1 ConnectFailures 0 FreeMem 28512 WiFiStatus 6
92273 : Info : WD : Uptime 2 ConnectFailures 0 FreeMem 28512 WiFiStatus 6
120741 : Info : EVENT: Clock#Time=Thu,00:02

@uzi18
Copy link
Contributor

uzi18 commented Nov 16, 2019

confirmed, it wasn't work for me from the beginning

@TD-er TD-er added Category: Settings Related to settings/configuration Type: Bug Considered a bug labels Nov 16, 2019
@fmuntean
Copy link
Contributor Author

When I reset firmware I selected all the checkboxes to keep the settings.

From what I can see the culprit is:
333 : Error : CRC : SecuritySettings CRC ...FAIL

I also see other issues like:

  • watchdog resetting the board once the client disconnected.
  • WIFI appending the unit number to the name even if before that was unselected. (I expect that option to be kept with the unit name)

@TD-er
Copy link
Member

TD-er commented Nov 16, 2019

The CRC is not the issue.
Watchdog is a very likely cause.

Also the reset may be taken place before the caches for SPIFFS are flushed.

@Sprinterfreak
Copy link
Contributor

I also struggle with an unexpected factory reset bahavior.
If i reset my device once, it always drops into APMode instead of using WiFi settings from compile time (Custom.h). This causes the device to be completly loose its connectivity.

Reseting it again, of course only possible via UART, brings back settings from compile time (Custom.h).
Even more unsatisfying is that my devices are, because of a flash hardware-upgrade, not recognized by the DeviceModel. So no reset button works. (See PR #3018 )

Maybe related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Settings Related to settings/configuration Type: Bug Considered a bug
Projects
None yet
Development

No branches or pull requests

4 participants