Random address generation in DA14585

⚠️
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 https://www.dialog-semiconductor.com/support . We’ll be fixing bugs / optimising the searching and tagging over the coming days.
6 posts / 0 new
Last post
blebot
Offline
Last seen: 1 year 3 months ago
Joined: 2017-11-27 16:01
Random address generation in DA14585

Hi Dialog ,
we are using the DA14585 custom board and SDK version 6.0.6 . The address of the device is defined in the SDK . we want to change the static address in to random address .
can you please share the document or the steps to be followed to change the static device address .i tried changing some macros but no use .

Best Regards ,
blebot.

Device: 
PM_Dialog
Offline
Last seen: 7 months 1 week ago
Staff
Joined: 2018-02-08 11:03
Hi blebot,

Hi blebot,

 

In order to generate static random BD address, please change the .addr_type item of user_gapm_conf structure in the user_config.h file to GAPM_CFG_ADDR_PRIVATE.

 

Thanks, PM_Dialog

blebot
Offline
Last seen: 1 year 3 months ago
Joined: 2017-11-27 16:01
Hi Dialog ,

Hi Dialog ,

Thanks for the reply .

I have made the changes as you stated and the device is generating the static random BD address .but , when the device is restarted , the device generates some random address
again .
Is there any way to keep the first generated random address permanently for my device ?

Best Regards,
blebot.

PM_Dialog
Offline
Last seen: 7 months 1 week ago
Staff
Joined: 2018-02-08 11:03
Hi blebot,

Hi blebot,

 

You are not able to keep the first generated random BD address permanently in your device, because according to BLE specifications, the BD address is generated by the stack and it is renewed every time that the board resets. In case you prefer to have your own static address, you can modify the .addr item of user_gapm_conf structure in the user_config.h file. Be aware that the static address should follow a particular format and the two most significant bits of the address shall be equal to 1. For example, if you want to have C0:55:44:33:22:11 static address, you could modify the user_gapm_conf as following:

 

.addr_type = GAPM_CFG_ADDR_PRIVATE,

 

.addr = {0x11, 0x22, 0x33, 0x44, 0x55, 0xC0},   //LSB first

 

Thanks, PM_Dialog

blebot
Offline
Last seen: 1 year 3 months ago
Joined: 2017-11-27 16:01
Hi Dialog ,

Hi Dialog ,

Thanks for the reply ,

so , there is no way to keep the random address permanently .
what is the difference b/w changing the .addr item of user_gapm_conf structure in the user_config.h file and defining CFG_NVDS_TAG_BD_ADDRESS in the da1458x_stack_config.h
either way we are doing the same and what is the difference to have public static address and a private static address .

Best Regards,
blebot.

PM_Dialog
Offline
Last seen: 7 months 1 week ago
Staff
Joined: 2018-02-08 11:03
Hi blebot,

Hi blebot,

 

The define CFG_NVDS_TAG_BD_ADDRESS is for a Public Static address, and you should change to GAPM_CFG_ADDR_PUBLIC the .addr item of user_gapm_conf structure in the user_config.h file.  If you have configured the .addr item as GAPM_CFG_ADDR_PRIVATE, then you will have a Private Static address, and you should change the .addr item as mentioned in the previous post. The difference is that the private static address is a type of random db address and should follow a particular format. You will be able to find more information in the BLE spec in the Bluetooth SIG official support page. Please check the link below:

 

https://www.bluetooth.com/specifications/bluetooth-core-specification

 

Thanks, PM_Dialog