This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to set static nRF52 MAC address in using nRF Connect SDK?

Hi,

could you please advise us on how to set a static MAC address for the nRF52 series? We haven't been able to find it in the documentation. And it seems that default is that it changes randomly after each startup. 

Thanks,

Lukas

Parents Reply
  • Ok, we got the CONFIG_BT_SETTINGS=y in the host. However, we are still not able to figure out the workflow of how to set a random static address.

    In the Zephyr API, we found function bt_set_id_addr() that we perhaps should use. However, usage is not clear to me. 

    • Seems like we need to define our own MAC address while calling bt_set_id_addr(). Is there an option on how to store the generated one?
    • Where should we call settings_save()?
    • settings_load() could be called only after bt_enable() or it throws an error. 
    • Do we need to use BT_LE_ADV_OPT_USE_IDENTITY?

    Would you be please so kind and provide us an example code on how to get it working with the nRF91 host and nRF52 controller?

Children
Related