Hi,
I recently migrated a project from NCS v2.x to NCS v3.x and noticed that the method I previously used to generate a device-unique identifier no longer works the same way.
On NCS v2.x, I was using:
fill_bytes_from_int32_le_with_start_index(NRF_FICR->DEVICEADDR[0], c, 0); fill_bytes_from_int32_le_with_start_index(NRF_FICR->DEVICEADDR[1], c, 4);
FICR->DEVICEADDR matched the device’s BLE MAC address, so I could derive a predictable unique ID based on the BLE public address.
However, after moving to NCS v3.x, FICR->DEVICEADDR is no longer available.
Following Nordic’s recommendation, I switched to:
fill_bytes_from_int32_le_with_start_index(NRF_FICR->INFO.DEVICEID[0], c, 0); fill_bytes_from_int32_le_with_start_index(NRF_FICR->INFO.DEVICEID[1], c, 4);
This returns a totally different ID, which does not match the BLE MAC address anymore.
My questions:
-
Why was FICR->DEVICEADDR removed in NCS v3.x?
Previously, it corresponded to the BLE public address burned into FICR. -
Is the BLE controller in NCS v3.x no longer using the FICR DEVICEADDR as the identity address?
-
What is the correct way to obtain the BLE public (identity) address in NCS v3.x?
Should we usebt_id_get()exclusively? -
If I want a stable and predictable device identifier that matches the BLE MAC (as before), is there a supported method to configure the controller to use the FICR address?
-
Is there an official statement or migration note explaining this change?
Additional info:
-
Board: nRF5340dk
-
NCS version: 3.0.2
-
Using Zephyr Bluetooth Controller (not SoftDevice)
I used to put the DEVICEADDR (8 Octets) into BLE characteristic to generate a UUID unique to that device, it should match the 6 Octets in the BLE MAC address.
Thanks in advance for the clarification.