Set BLE-MAC Address


I am using a BMD-340 Module (NRF52840) from Rigado, which will be delivered with a pre-programmed BLE-MAC Address in the UICR registers.
Now I tried to set the BLE-MAC address to the pre-programmed one, but BLE::Instance().setAddress() does actually nothing.
How do I set the BLE-MAC address with Cordio-Stack?


Hi Phillipp,

setAddress() is going to be deprecated soon, we recommend you to wait for Mbed OS 6.0 which provides setRandomStaticAddress() for this kind of usage.

The PR is here.


Hi Desmond,

good to know, but it irritates me a little bit, because deprecated does mean for me “will be replaced and not working in future, but is still supported and works”, but setAddress() does not work at all.

Will setRandomStaticAddress()set the BLE-MAC-Address which I see i.e. on my Smartphone?

Nevertheless, thank you very much for your fast answer!