Bonded information location

⚠️
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.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
2 posts / 0 new
Last post
Jitendraprasad
Offline
Last seen:2 years 1 month ago
加入:2017-10-02 10:38
Bonded information location

Hello Dialog team

I am working on DA14681 MCU. My application is to store one bonded information (Peer device MAC address). And also store sensors data using using "ad_nvms_write" API. I used ad_nvms_open( NVMS_GENERIC_PART ). "NVMS_GENERIC_PART " partition for data storage.
Now problem is, device can bond the peer device successfully and store the information and I can get the bonded information after each power cycle. But if I write the sensors data samples bonded information erased/overwrite (?).

Followings are my questions:
1.我们如何知道保税存储吗information memory location?
2. Does my application use same memory location to store bonded information and sensors data?
3. If so, how can I separate both one?

Any help or suggestion will be appreciated.

Thanks
Jit

Keywords:
Device:
PM_Dialog
Offline
Last seen:21 hours 3 min ago
工作人员
加入:2018-02-08 11:03
Hi Jitendraprasad,

Hi Jitendraprasad,

Could you please let me know if you are using the default partitions tables that we recommend in our ble examples of the SDK? If you made a custom partition table, please provide the configurations. Be aware that the you should define the dg_configNVMS_VES and in the NVMS_GENERIC_PART partition you should use the PARTITION_FLAG_VES. In case you are using the generic partition, there are specific areas to store the bonding data and the data from you application (for example the data from your sensor). Please check the deadme.md file which is under /sdk/ble path and you will find all the available information about this. The default configuration in the application configuration file are the following:

// set pairing data storage at offset 0x1000 on generic partition

#define CONFIG_BLE_STORAGE_KEY_PART_OFFSET (0x1000)

// set application data storage at offset 0x1000 on generic partition

#define CONFIG_BLE_STORAGE_APV_PART_OFFSET (0x1500)

// set maximum length of application data storage to 512

#define CONFIG_BLE_STORAGE_APV_PART_LENGTH (512)

This means that you are not able to store the sensor’s data in the addresses 0x1000 - 0x1500. You can store them after the CONFIG_BLE_STORAGE_APV_PART_OFFSET. You should change the offsets according to your application and your partition table. Also, you could use the NVMS_LOG_PART to store sensor data. I would suggest you to use the SmartSnippets toolbox and check addresses of the partition table the bonding and sensor data are written.

Thanks, PM_Dialog