This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Is it possible set public MAC addr. with nRF Connect SDK (Zephyr)?

Hello.

I have a question about setting MAC address.

 

For now, my device uses random static address from FICR.

And I also use "bt_set_id_addr()" function for test purpose.

 

But I couldn't find the way that setting MAC address type to public address.

Is it possible in NCS? (Zephyr?)

 

FYI, I got OUI code from my workplace.

 

And I already knew about this thread.
>> https://lists.zephyrproject.org/g/devel/topic/bluetooth_address_type/16760640?p=,,,20,0,0,0::recentpostdate%2Fsticky,,,20,2,240,16760640

 

I guess vendor specific means "hci_vendor_read_static_addr()" function in "%NCS_ROOT%\zephyr\subsys\bluetooth\controller\hci\nordic\hci_vendor.c" file.

 

But I'm not sure that's all.

When I saw source code in "hci_vendor.c" file, it doesn't looks like for public address.

  

Thanks for read.

Best regards,
Jason.

Parents Reply
  • Hi,

    Note that if you use the SoftDevice controller, sdc_hci_cmd_vs_zephyr_write_bd_addr() is called when you call bt_ctlr_set_public_addr(). Specifically this is because the implementation of bt_ctlr_set_public_addr() when using  the SoftDevice controller is like this (nrf\subsys\bluetooth\controller\hci_driver.c):

    void bt_ctlr_set_public_addr(const uint8_t *addr)
    {
    	const sdc_hci_cmd_vs_zephyr_write_bd_addr_t *bd_addr = (void *)addr;
    
    	(void)sdc_hci_cmd_vs_zephyr_write_bd_addr(bd_addr);
    }

Children
Related