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
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
Is CONFIG_BT_PRIVACY=y set or CONFIG_BT_SETTINGS=n set?
It wasn't enabled. However, when we tried it, we were not able to get it working due to the Zephyr settings module.
These configs should be set on Bluetooth Host, right? In our case, we are using nRF9160 as a host and nRF52 as a controller. Should it work without problems?
Try setting CONFIG_BT_PRIVACY=n set or CONFIG_BT_SETTINGS=y in the proj.conf file. It should not hurt to set them in the nrf52 controller as well.
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.
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?
Hi Hakon,
I don't want to put pressure on you, but could you please try to briefly answer our questions? I think we don't need the sample and we will figure it out. Only answers would be sufficient. Thanks.
Have you tried to just create a const bt_addr_le_t address and pass that to bt_set_id_addr() before calling bt_enable()?
Have you tried to just create a const bt_addr_le_t address and pass that to bt_set_id_addr() before calling bt_enable()?
Well, we have been able to get it working by commenting out some code in Zephyr. However, as you might feel this is not the best way.
Have you tried to just create a const bt_addr_le_t address and pass that to bt_set_id_addr() before calling bt_enable()?
This is related to our previous question. Seems like it should work this way. But do we really need to create our own address? Wouldn't it make sense to use and store the generated one? Should be more robust.
Hi,
Typically you can use the DEVICEADDR[0..1] in FICR for this:
https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/ficr.html?cp=4_2_0_12_0_13#register.DEVICEADDR-0
It is not possible to change this address, however it is randomly generated in our production with the sole intent to be used for random static address in BLE.
Best regards,
Kenneth