Device = DA14681
SDK = 1.0.10-1072
Hello,
I enabled BLE persistent storage (flash) for bonded devices, as described in sdk/interfaces/ble/readme.md and added my user data in platform_nvparam.h:
NVPARAM_AREA(ble_app, NVMS_PARAM_PART, 0x0100)
NVPARAM_VARPARAM(TAG_BLE_APP_NAME, 0x0000, 33) // uint8[29]
NVPARAM_PARAM (TAG_BLE_APP_MY_DEVICE 0 x0021 8) // uint8[6]
NVPARAM_PARAM (TAG_BLE_APP_ENABLE, 0x0029, 3) // bool
NVPARAM_AREA_END()
Reading and writing is working fine using ad_nvparam_read() and ad_nvparam_write().
Everything is working fine, even resetting the device. But after repowering the device the bonded device storage is empty.
How can I fix this issue?
Many thanks for your help in advance,
Rolf
Device:
Hi uniben,
This is not how the BLE persistant storage operates, the bonding data are stored in the Generic part of the NVMS (NVMS_GENERIC_PART) and not in the parameters part (NVMS_PARAM_PART). You dont have to create new parameters in the NVMS_PARAM_PART, you can use the existing implementation, how the bonding data are stored in the NVMS is also explained in the readme file in the sdk/ble/ directory, check the ##Storage format headline. You can check the bms example where the bonding data are stored using the CONFIG_BLE_STORAGE definition, and check the persistent data in the NVMS_GENERIC_PART.
Regarding the issue that you are experiencing, since the data are written in the flash that means that the data persist, so, how do you verify that what you 've just written is not there, have you checked with the Smart Snippets tool with the QSPI partition table tool at that particular offset in the NVMS_PARAM_PART that the bonding data that you 've set are not there ?
Thanks MT_dialog
Thanks.