This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Adverting address (id) changes after rebooting

Hi

I am using Zephyr samples (common with the samples found in NCS) to evaluate the advertisement function of nRF52833DK.

I have run these examples:

In both cases, the device's id changes after the reboot (checked by nRF Connect):

Also I tried to change the id before enabling the BLE as described in this devzone ticket, but it didn't work.

Now my questions are:

1- Why after reboot a random address is assigned to the device and it doesn't use the address was assigned to the device at manufacturing time?

2- How can I change the address that is used for advertising?

Regards,

Saleh

  • Hi,

    Actually, changing a static device address is not allowed by the Bluetooth specification, without a power cycle of the device:

    Bluetooth core specification v5.2, Volume 6, Part B, section 1.3.2.1 Static device address:

    "A device may choose to initialize its static address to a new value after each
    power cycle. A device shall not change its static address value once initialized
    until the device is power cycled."

    So the way to change static device addresses, is to do a reset. You then can initialize with a new address before enabling BLE. By using a random source for setting this address, you should be able to achieve what you want by letting the "reset address functionality" reset the device.

    Finally, to allow resets both to change and not to change the current address, you could write the address to flash (for reuse), and use either GPREGRET registers or write to flash to signal that the address should get updated on next boot.

    Regards,
    Terje

Related