Hi,
May I ask a simple question about an example how does it generate its own advertising address, such as the "ble_app_hrs" example? I mean where I can find device address assignment source code for the example.
Thank you.
Hi,
May I ask a simple question about an example how does it generate its own advertising address, such as the "ble_app_hrs" example? I mean where I can find device address assignment source code for the example.
Thank you.
The default behavior is to use the address found in the NRF_FICR->DEVICEADDR
registers (with some potential modifications to make it legal per BLE standard). This is not visible in the code as it is done internally in the SoftDevice.
You can however set the address yourself using sd_ble_gap_addr_set
(or sd_ble_gap_address_set
if using old SoftDevice).
The default behavior is to use the address found in the NRF_FICR->DEVICEADDR
registers (with some potential modifications to make it legal per BLE standard). This is not visible in the code as it is done internally in the SoftDevice.
You can however set the address yourself using sd_ble_gap_addr_set
(or sd_ble_gap_address_set
if using old SoftDevice).
Got it. Thanks for your prompt reply.