[Zephyr-devel] How to make Zephyr Based BLE device'd MAC address static ?


Johan Hedberg
 

Hi Vikrant,

On Tue, Feb 13, 2018, Vikrant More wrote:
Using available Zephyr Bluetooth APIs, I've develop BLE Device which is
compatible with Nordic Blinky App. I'm doing testing on nrf52840-PDK board.

But after every reset, it's MAC address gets changed with random one. How
to make it static, so that no need of pairing with smartphone again & again
?

How to take control of pairing key, instead of generating random one ?
All nRF boards *should* be using a static random identity address that's
read out from the FICR, i.e. you should then see the same address
printed out to the console every time Bluetooth initializes (assuming
you have a console, and CONFIG_BT_DEBUG_LOG=y). That said, if you have
CONFIG_BT_PRIVACY=y, then a Resolvable Private Address will be used, and
remote devices can only resolve this to the identity address after
pairing.

Johan


Vikrant More <vikrant8051@...>
 

Hi Johan,

Thanks for clarification.

But what to add or modify so that, we can avoid pairing of Device after every reset ?

How to take control of (6 digits ) pairing key, instead of generating random one ?

Regards,
vikrant8051


On Tue, Feb 13, 2018 at 10:43 PM, Johan Hedberg <johan.hedberg@...> wrote:
Hi Vikrant,

On Tue, Feb 13, 2018, Vikrant More wrote:
> Using available Zephyr Bluetooth APIs, I've develop BLE Device which is
> compatible with Nordic Blinky App. I'm doing testing on nrf52840-PDK board.
>
> But after every reset, it's MAC address gets changed with random one. How
> to make it static, so that no need of pairing with smartphone again & again
> ?
>
> How to take control of pairing key, instead of generating random one ?

All nRF boards *should* be using a static random identity address that's
read out from the FICR, i.e. you should then see the same address
printed out to the console every time Bluetooth initializes (assuming
you have a console, and CONFIG_BT_DEBUG_LOG=y). That said, if you have
CONFIG_BT_PRIVACY=y, then a Resolvable Private Address will be used, and
remote devices can only resolve this to the identity address after
pairing.

Johan