⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
3 posts / 0 new
Last post
uniben
Offline
Last seen:2 years 2 weeks ago
Joined:2016-08-23 09:46
persistent user data

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:
MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
Joined:2015-06-08 11:34
Hi uniben,

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

uniben
Offline
Last seen:2 years 2 weeks ago
Joined:2016-08-23 09:46
Thanks.

Thanks.