cancel
Showing results for 
Search instead for 
Did you mean: 

Where and How to find MAC / 802.15.4 EUI64 address in STM32WB55 MCU?

PS.2
Associate II

I'm building a thread application on STM32WB55, and to address individual device I require a static address that should not change after every power reset sequence, and in my opinion that could factory programmed MAC or 802.15.4 EUI64.

For the moment I'm running

Thread_CLI example code from ST and whenever I try to fetch MAC I get a random

number. Also I don't see any address/Serial number mentioned on

development board as it does by various other 2.4GHz RF device vendors. @Remi QUINTIN​ 

4 REPLIES 4
Remi QUINTIN
ST Employee

OpenThread provides a function to retrieve EUI-64

/**

* Get the factory-assigned IEEE EUI-64.

*

* @param[in]  aInstance A pointer to the OpenThread instance.

* @param[out] aEui64    A pointer to where the factory-assigned IEEE EUI-64 is placed.

*

*/

OTAPI void OTCALL otLinkGetFactoryAssignedIeeeEui64(otInstance *aInstance, otExtAddress *aEui64);

On Dory 1M (STM32WB55) it returns a unique number.

Please use the most recent FW package release (at least 1.5) as random numbers were returned  in the past .

PS.2
Associate II

Hi Remi,

Tried a lot of different setups, but result persist same. Still I get a random no. instead.

I'm using the latest release V1.7 .

PS.2
Associate II

Hi Remi,

My concern is to to have a unique identifier to address the individual device/node in network with predefined name/identifier. This should be independent of network, and best suited for the case is MAC address that can be mapped to IID of IPV6. So either there should be easy way to get the MAC or it should be printed/Marked on device.

Hope you got, what I mean to say, in case of any query please let me know.

Thanks,

Remi QUINTIN
ST Employee

Using the latest release (v1.6.0/v1.7.0) with an update of the FW stack running on the M0+ core, it works.

On the M4 side, you should do :

 otExtAddress MyEui64 = {0};

 otLinkGetFactoryAssignedIeeeEui64(NULL,&MyEui64);

 APP_DBG("Get Factory assigned EUI64[0] = 0x%02X",MyEui64.m8[0]);

 APP_DBG("Get Factory assigned EUI64[1] = 0x%02X",MyEui64.m8[1]);

 APP_DBG("Get Factory assigned EUI64[2] = 0x%02X",MyEui64.m8[2]);

 APP_DBG("Get Factory assigned EUI64[3] = 0x%02X",MyEui64.m8[3]);

 APP_DBG("Get Factory assigned EUI64[4] = 0x%02X",MyEui64.m8[4]);

 APP_DBG("Get Factory assigned EUI64[5] = 0x%02X",MyEui64.m8[5]);

 APP_DBG("Get Factory assigned EUI64[6] = 0x%02X",MyEui64.m8[6]);

 APP_DBG("Get Factory assigned EUI64[7] = 0x%02X",MyEui64.m8[7]);

Be sure to update your FW stack with the latest M0+ binary.

The UID64 is the same after each reset..