STM32WB55 BLE address
I am evaluating STM32WB55 board HCI driver.
During my test I found that BLE public address is 02:80:e1:00:00:00
But this microcontroller has an internal flash register to store BLE address and device id.
I would like to know the best way to change the address BLE in this case.
BLE Stack initialization:
[00:00:00.015,000] <dbg> bt_settings.bt_settings_init:
Configuration mode: waiting connections...
[00:00:00.187,000] <inf> bt_hci_core: Identity: 02:80:e1:00:00:00 (public)
[00:00:00.187,000] <inf> bt_hci_core: HCI: version 5.0 (0x09) revision 0x0026, manufacturer 0x0030
[00:00:00.187,000] <inf> bt_hci_core: LMP: version 5.0 (0x09) subver 0x2126
Get correct BLE address:
udn = LL_FLASH_GetUDN();
if(udn != 0xFFFFFFFF)
company_id = LL_FLASH_GetSTCompanyID();
device_id = LL_FLASH_GetDeviceID();
bd_addr_udn = (uint8_t)(udn & 0x000000FF);
bd_addr_udn = (uint8_t)( (udn & 0x0000FF00) >> 8 );
bd_addr_udn = (uint8_t)( (udn & 0x00FF0000) >> 16 );
bd_addr_udn = (uint8_t)device_id;
bd_addr_udn = (uint8_t)(company_id & 0x000000FF);;
bd_addr_udn = (uint8_t)( (company_id & 0x0000FF00) >> 8 );
bd_addr = (const uint8_t *)bd_addr_udn;