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

Corrupted flash after update ? #558

Closed
KipK opened this issue Mar 6, 2023 · 9 comments
Closed

Corrupted flash after update ? #558

KipK opened this issue Mar 6, 2023 · 9 comments

Comments

@KipK
Copy link
Collaborator

KipK commented Mar 6, 2023

Seems with current dev branch, the configuration reset itself sometimes after an update. Don't know yet if it's corrupted or not.
Some configuration data stays like Wifi settings but some others don't.

I've implemented the backup/restore on the UI side but that would be great to find what's happening here.

@KipK
Copy link
Collaborator Author

KipK commented Mar 6, 2023

I see in the config after an update failing the conf, that most settings like mqtt has been reseted to default values.
There's also the "factory_write_lock" set to true.
The only recent change touching the config seems to be related to this factory_lock thing.

@jeremypoulter
Copy link
Collaborator

Any chance you can capture the serial output of the update and following reboot?

@KipK
Copy link
Collaborator Author

KipK commented Mar 6, 2023

If I can reproduce with a standalone esp32 probably yes.

@KipK
Copy link
Collaborator Author

KipK commented Mar 9, 2023

Nothing different on the serial console when config fails.
I can reproduce the problem by flashing twice the same fw, first time it keep the config, second time not.

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0030,len:1184 load:0x40078000,len:12784 load:0x40080400,len:3032 entry 0x400805e4 [ 164][E][vfs_api.cpp:105] open(): /littlefs/schedule.json does not exist, no permits for creation $GV^35

the vfs_api log always happend here on my test esp32 not plugued to openevse module, don't know if it's the case on a real situation, but doesn't seems to caus eproblem to schedule anyways

@jeremypoulter
Copy link
Collaborator

I think that is the RAPI serial port, there is one for debug output that should give more info. What board are you using?

@KipK
Copy link
Collaborator Author

KipK commented Mar 10, 2023

ah you're right I was on the usb port on an esp32 dev wroom.
So i need to check pin16

@KipK
Copy link
Collaborator Author

KipK commented Mar 10, 2023

here is the log:

Got 65535 ÿ from EEPROM @ 0x0c00
no json config found

Restarting...
                                                                 
NetManagerTask::wifiStop 1
                                                     
                                                                        
OpenEVSE WiFI 770c
                                                             
Firmware: 4.1.8
                                                                
Build date: Mar 10 2023 12:42:22
                                               
IDF version: v4.4.3
                                                            
Free: 253064
                                                                   
Got 65535 ÿ from EEPROM @ 0x0c00
                                               
No JSON config found
                                                           
Got 139 { from EEPROM @ 0x0000
                                                 
Found stored JSON {"ws":"xxxxxxxxx","wp":"xxxxxxxxxx","lan":"fr","hn":"openev
se2","tz":"Europe/Paris|CET-1CEST,M3.5.0,M10.5.0/3","ldt":"none","f":2097160}
  
ssid changed
                                                                   
pass changed
                                                                   
lang changed
                                                                   
hostname changed
                                                               
time_zone changed
                                                              
limit_default_type changed
                                                     
factory_write_lock changed
                                                     
Saving config
                                                                  

@KipK
Copy link
Collaborator Author

KipK commented Mar 10, 2023

one of the latests commits seems to have solved the problem, I close the issue for now as I can't reproduce anymore.

@KipK KipK closed this as completed Mar 10, 2023
@KipK KipK reopened this Mar 15, 2023
@KipK
Copy link
Collaborator Author

KipK commented Mar 15, 2023

Reopening, it happend again, and worst, nows reset config after 2 reboots.

Reproduce: reset twice, then refresh UI ( note for later: I have to fix this refresh needs on the UI )

KipK added a commit to KipK/ESP32_WiFi_V4.x that referenced this issue Mar 22, 2023
KipK added a commit to KipK/ESP32_WiFi_V4.x that referenced this issue Mar 22, 2023
jeremypoulter added a commit that referenced this issue Mar 23, 2023
fix #558 config erased at reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants