toggle quoted messageShow quoted text
So let me get this straight, you program the address into the UICR during production, and then you want the controller to read it from there right?
In that case unfortunately you will need to modify the actual controller code. The only currently supported feature in that regard is for the Host to read the *FICR* address that
comes with every Nordic chip. The other option is to also store the address in your Host IC during production of course.
From: Nathan Miller <nathan.miller@...>
Sent: 11 May 2018 19:52
To: Cufi, Carles <carles.cufi@...>
Subject: Re: [Zephyr-users] Setting a default public MAC address in Zephyr HCI samples
That's correct Carles, we wanted the MCU to set the MAC instead of relying on the host, which cannot read the programmed MAC in the UICR. I was trying to avoid modifying the HCI code directly, hoping for something I could do from main.c,
since the HCI spec makes mention of a non-volatile default value. If that's not possible, I can add the call to ll_addr_set into hci_init.
Sorry I think I might have misread your original email. You want to set the address directly from the controller image, without interaction from the Host? If that is the case then
you can simply add a call to ll_addr_set() in the hci_* sample you need. Not sure if that is what you need.
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?