nvs_open and nvs_get work from namespaces that do not exist.
Posted: Tue Feb 07, 2023 5:20 pm
I have a few devices that have different namespaces and partitions within their nvs storage to store different values, but share the same code. In my code, I have made exceptions for when a specific namespace does not exist:
However the devices that I know for sure that do not have this specific namespace within their partition return no error, and reads garbage values whenever I try to read the data inside the keys from within this namespace. What is happening here? Will the device always open namespaces that do not exist within the device? I made the NVS partition namespaces using nvs_partition_gen.py and parttool.py
- esp_err_t ret = nvs_open("myNamespace", NVS_READWRITE, &handle);
- if(ret != 0){
- ESP_LOGE(TAG, "Failed to open myNamespace namespace.");
- goto other_task;
- }