NRF52 DK BLE Mac address is weird, how to reset to normal?

Hello,

bt_le_oob_get_local() and bt_id_get() both get the same mac address as I see on the nRF connect scanner app, which is F7:54:FF:FF:FF:FF. I was wondering if I accidentally erased it somehow, and there's a way to reset this mac address to the original.
Thanks,
Parents
  • I assume you're working on NCS v2.x.x here and one of the Zephyr Bluetooth sample projects, is that correct?

    bt_le_oob_get_local() allows to get local information that are useful for Out of Band pairing or connection creation. If the CONFIG_BT_PRIVACY config is enabled in your project, this function will result in generating a new resolvable private address (RPA) that is valid for CONFIG_BT_RPA_TIMEOUT seconds, and the application will use this address for advertising and connecting. If not, the local ID will usually be BT_ID_DEFAULT.

    bt_id_get() returns an array of the currently configured addresses, so it makes sense that it returns the same Mac address if bt_le_oob_get_local() is called first.

    You can set your own MAC address either by disabling CONFIG_BT_PRIVACY and writing BT_ID_DEFAULT to an ID you'd like, or you can wait until the CONFIG_BT_RPA_TIMEOUT  to trig and change the RPA.

    Best regards,

    Simon

Reply
  • I assume you're working on NCS v2.x.x here and one of the Zephyr Bluetooth sample projects, is that correct?

    bt_le_oob_get_local() allows to get local information that are useful for Out of Band pairing or connection creation. If the CONFIG_BT_PRIVACY config is enabled in your project, this function will result in generating a new resolvable private address (RPA) that is valid for CONFIG_BT_RPA_TIMEOUT seconds, and the application will use this address for advertising and connecting. If not, the local ID will usually be BT_ID_DEFAULT.

    bt_id_get() returns an array of the currently configured addresses, so it makes sense that it returns the same Mac address if bt_le_oob_get_local() is called first.

    You can set your own MAC address either by disabling CONFIG_BT_PRIVACY and writing BT_ID_DEFAULT to an ID you'd like, or you can wait until the CONFIG_BT_RPA_TIMEOUT  to trig and change the RPA.

    Best regards,

    Simon

Children
  • Hi Simonr, thanks for the reply! Yes, I am working with SDK v2.3.0 and I am using Zephyr.

    The goal is to obtain a unique identifier for the device, and I don't need to use privacy and RPA, or randomize at runtime for this project. Is it possible to access the static random addr that the device contains preprogrammed? I ask that because the address I got (see previous post) does not look like a preprogrammed static address; it looks more like one that I flashed on there (and I don't know how I did that). It does not look like I have CONFIG_BT_PRIVACY set up.

    Thanks,

Related