random BLE device address

⚠️
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.
4 posts / 0 new
Last post
RatheeshT
Offline
Last seen:1 year 10 months ago
Joined:2017-01-02 11:08
random BLE device address

Hi DIALOG,
I am running DSPS example with 5 DEVICE-BLE & 1 HOST-BLE with DA14580 PRO development board.
I want to maintain separate BD address for every DEVICE-BLE but DSPS DEVICE-BLE program should be one .ie. for all DEVICE-BLE's hex file should be same and each device should have different BD address.

How it is possible ?
can i go with random number generation? if i proceed with random number generation, there is also chances that to be same.
have any other ways ?
please suggest your thoughts?

Device:
MT_dialog
Offline
Last seen:1 month 3 weeks ago
Staff
Joined:2015-06-08 11:34
Hi RatheeshT,

Hi RatheeshT,

bd地址可以通过OTP被填充header field, which is the first bd address source that the SDK is going to check (Device unique ID) and if its non-zero the SDK is going to take that address as an address of the device. If the field is zero then the SDK will take the bd address from the NVDS which is written either by your sw or from the OTP NVDS section. So if you dont want to burn the OTP you can compile a different .hex file which will initialize the NVDS structure in a different bd address and each device should have a seperate NVDS. Regarding the random generation, you will have to consider what kind of address you would like to use in your application (random or public addresses, please check the specification for extra info on the addresses that are supported by the BLE spec), but yes random addresses are also an option and running on the same addresses during using random addresses is highly unlikely.

Thanks MT_dialog

RatheeshT
Offline
Last seen:1 year 10 months ago
Joined:2017-01-02 11:08
Hi MT_dialog,

Hi MT_dialog,

how can i change the BD address at run time?
I am planning to send the BD address from UART and then it will start advertise with the address received from UART.
I am able to receive the data in one buffer from UART but i dont know where i have to replace this with the default address.?

Please suggest me your idea ?

MT_dialog
Offline
Last seen:1 month 3 weeks ago
Staff
Joined:2015-06-08 11:34
Hi Ratheesh,

Hi Ratheesh,

The device reads its bd address during start up in the system_init() function with the nvds_bdaddr() function, the array that holds the device's address is the dev_bdaddr structure, so during start up you can read the db address via UART and populate the structure with that value.

Thanks MT_dialog