I just saw that 3.1.1 introduced a new feature called "multi-page BLOBs" (CONFIG_MP_BLOB_SUPPORT). I need such a feature (at the moment, I split a certificate file into multiple BLOBs at application level to get around the 1984 bytes limit), so I enabled the option.
Unfortunately, a simple test program that would just write 2k bytes to a BLOB, commit and then try to read it back fails with ESP_ERR_NVS_VALUE_TOO_LONG during nvs_set_blob(). Saving and reading 1900 bytes works just fine. The constant CONFIG_MP_BLOB_SUPPORT is defined with value "1", so it would seem that the option is enabled.
Is there some secret ingredient that needs to be changed to make multi-page BLOBs work? Is there an example snippet outlining its use?
Thanks a lot in advance!
Using the new NVS multi-page BLOBs
Re: Using the new NVS multi-page BLOBs
@Oromis,
Thank you for trying this feature! However, I am unable to reproduce the issue on 3.1.1. Can you check-
1) It is a clean build after enabling the macro (CONFIG_MP_BLOB_SUPPORT).
2) There is enough space on NVS partition (There should be 1 sector empty even after accounting for all the data to be stored).
If you still see the problem, please share your example, partition table and sdkconfig with us.
Thank you for trying this feature! However, I am unable to reproduce the issue on 3.1.1. Can you check-
1) It is a clean build after enabling the macro (CONFIG_MP_BLOB_SUPPORT).
2) There is enough space on NVS partition (There should be 1 sector empty even after accounting for all the data to be stored).
If you still see the problem, please share your example, partition table and sdkconfig with us.
Re: Using the new NVS multi-page BLOBs
Hi,
thank you for your response. I just figured out what the problem was and it's not ESP-IDF's fault at all. I'm very sorry for bothering you.
The problem was that we copied the 'nvs_flash' component from ESP-IDF v3.0.x into our project since we needed to apply a bugfix that arrived in the stable branch later. Since NVS was working fine from there on, I forgot about that. Now that we updated to 3.1.x and wanted to use the new multi-page BLOBs, we didn't update or delete our custom "fork" of nvs_flash, effectively overriding your updated version. Therefore, the config variable was set correctly but since the compiled NVS codebase was at 3.0.x, it was ignored entirely and multi-page BLOBs were not functional.
The solution: I just deleted our fork of nvs_flash since the bugfix we needed is now present in 3.1.x.
Now, multi-page BLOBs are working fine. Thank you for your time anyway!
David
thank you for your response. I just figured out what the problem was and it's not ESP-IDF's fault at all. I'm very sorry for bothering you.
The problem was that we copied the 'nvs_flash' component from ESP-IDF v3.0.x into our project since we needed to apply a bugfix that arrived in the stable branch later. Since NVS was working fine from there on, I forgot about that. Now that we updated to 3.1.x and wanted to use the new multi-page BLOBs, we didn't update or delete our custom "fork" of nvs_flash, effectively overriding your updated version. Therefore, the config variable was set correctly but since the compiled NVS codebase was at 3.0.x, it was ignored entirely and multi-page BLOBs were not functional.
The solution: I just deleted our fork of nvs_flash since the bugfix we needed is now present in 3.1.x.
Now, multi-page BLOBs are working fine. Thank you for your time anyway!
David
Re: Using the new NVS multi-page BLOBs
Glad that it is working for you! Feel free to provide any feedback.
Who is online
Users browsing this forum: No registered users and 249 guests