Page 1 of 1

NVS data corrupted after updating code

Posted: Thu Mar 29, 2018 12:17 am
by rwel59
I am saving wifi configuration data in nvs.

After I updated the code and re-flashed, the program retrieves stored ssid/password. The parameters are stored in std::string. There are no errors on retrieval, the strings retrieved are the proper lengths but they contain all null characters.

I've done this process hundreds of times (lots of code changes) and 99% of the time I have no issues retrieving saved parameters but I have seen the same issue a few times. Am I overwriting nvs data? Is there something I should be doing so that I won't overwrite?