Example Projects/Generated Code - Bluetooth Mac Address OUI validity
All Examples for the STM32WB have the following code in their app_ble.c:
const uint8_t* BleGetBdAddress( void ) {
...
udn = LL_FLASH_GetUDN();
if(udn != 0xFFFFFFFF) {
company_id = LL_FLASH_GetSTCompanyID();
device_id = LL_FLASH_GetDeviceID();
bd_addr_udn[0] = (uint8_t)(udn & 0x000000FF);
bd_addr_udn[1] = (uint8_t)( (udn & 0x0000FF00) >> 8 );
bd_addr_udn[2] = (uint8_t)( (udn & 0x00FF0000) >> 16 );
bd_addr_udn[3] = (uint8_t)device_id;
bd_addr_udn[4] = (uint8_t)(company_id & 0x000000FF);;
bd_addr_udn[5] = (uint8_t)( (company_id & 0x0000FF00) >> 8 );
...
}Also Application Note AN5289 has the same listing.
Comments and descriptions lets me believe this yields a valid public bluetooth address.
The address created is "80:E1:26:XX:XX:XX". The first part is the OUI which should belong to ST Microelectronics. But in fact 80:E1:26 is not assigned. STMs OUI is 00:80:E1.
So I have to assume that ST does not supply a valid MAC address for the STM32WB devices? In that case this should be mentioned somewhere clearly!
