Re: Setting a default public MAC address in Zephyr HCI samples


Carles Cufi
 

Hi Nathan,

 

You need to use the Zephyr Vendor-Specific extension for this:

https://github.com/zephyrproject-rtos/zephyr/blob/master/doc/subsystems/bluetooth/hci.txt#L408

 

This is currently implemented for the native Link Layer:

https://github.com/zephyrproject-rtos/zephyr/blob/master/subsys/bluetooth/controller/hci/hci.c#L1798

 

It is not stored non-volatile memory though. See the hci.txt spec for details.

 

Carles

 

From: <users@...> on behalf of Nathan Miller <nathan.miller@...>
Date: Friday, 11 May 2018 at 17:24
To: "users@..." <users@...>
Subject: [Zephyr-users] Setting a default public MAC address in Zephyr HCI samples

 

Is it possible, using the HCI samples (hci_uart, hci_spi, etc) to set a default public MAC address from within zephyr? We have a MAC we'd like to use, and in my exploration of documentation I found the HCI vendor specific command Write BD_ADDR. This seems similar to what I need but the host has no way to read the MAC address to be used from the UICR on the chip, so it's not actually a viable solution. In the documentation for that command, however, it states:

The vendor specific Reset command will reset the BD_ADDR to its non-volatile default if available. Otherwise the BD_ADDR shall be reset to the invalid / non-existent 00:00:00:00:00:00 address value.

This implies there is a way to set a non-volatile public MAC address, but doesn't give any hints on how to do that. I looked through the Bluetooth documentation (http://docs.zephyrproject.org/subsystems/bluetooth/bluetooth.html) as much as I can but I'm not having much luck finding anything. Is there a standard way to set a non-volatile, default public MAC address?

Join users@lists.zephyrproject.org to automatically receive all group messages.