ESP32 same MAC Address for 500 units

nucleon
Posts: 3
Joined: Wed Oct 28, 2020 7:11 am

ESP32 same MAC Address for 500 units

Postby nucleon » Wed Oct 28, 2020 7:21 am

Hello,

We purchased 400-500 units of (ESP32-WROOM-32D) from the parts distributor Mouser and when reading the efuse containing the MAC it seems that they are all the same. Is this a normal case scenario or should it these fuses be burned unique?

Thank you,

nucleon

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: ESP32 same MAC Address for 500 units

Postby ESP_Angus » Wed Oct 28, 2020 8:47 am

Hi nucleon,

Thanks for letting us know about this. The MAC addresses should be unique.

Could you give an example of how you're reading the MAC and what the value you read is, please?

Angus

nucleon
Posts: 3
Joined: Wed Oct 28, 2020 7:11 am

Re: ESP32 same MAC Address for 500 units

Postby nucleon » Wed Oct 28, 2020 9:10 am

Hello,

I am using <soc/efuse_reg.h>

Code: Select all

uint32_t mac = REG_GET_FIELD(EFUSE_BLK0_RDATA2_REG, EFUSE_RD_WIFI_MAC_CRC_HIGH);

printf("0x%X", mac);

0xBF8CAA
Thank you,

nucleon

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: ESP32 same MAC Address for 500 units

Postby ESP_Angus » Wed Oct 28, 2020 11:26 am

Hi nucleon,

The high bytes (first bytes) of the 6 byte MAC will be the same for devices from the same batch. They will likely all share the same OUI (organizational identifier) at minimum. I think in the case of the MAC you have the OUI will be 8C-AA-B5 (the B5 is one of the lower 4 bytes so not shown in your output, the other byte in your output is the MAC CRC).

If you also read the lower 4 bytes of the MAC (register EFUSE_BLK0_RDATA1_REG, field EFUSE_RD_WIFI_MAC_CRC_LOW) then you should find the total address is unique.

ESP-IDF also has an API to read the MAC as a byte array, esp_read_mac(). (Each interface in the ESP32 has a unique sequential MAC and the eFuse holds the base MAC, the exact algorithm is described here).

esptool also prints the MAC when it connects to the device to flash it or for another purpose, so you can cross-reference this value for an easy check of the MAC.

nucleon
Posts: 3
Joined: Wed Oct 28, 2020 7:11 am

Re: ESP32 same MAC Address for 500 units

Postby nucleon » Wed Oct 28, 2020 2:53 pm

Thank you

myflightdeck
Posts: 1
Joined: Fri Jul 21, 2023 7:44 pm

Re: ESP32 same MAC Address for 500 units

Postby myflightdeck » Fri Jul 21, 2023 7:53 pm

I was hoping someone might clarify this a little more.

I am trying to use the mac address as a unique identifier, but I keep running into an issue where the mac address appears the same from multiple ESP32 chips. From the response above to this question, it appears that there is a hidden or unseen byte or at least that is how it appears in the context? Can someone explain to me in simple terms how I can extract a unique that is 100% different from one ESP32 chip to the next?

HUGE THANK YOU TO THE PERSON THAT CAN HELP ME...
SEND ME YOUR ADDRESS I WILL HAVE PIZZA ON ITS WAY!

ESP_Sprite
Posts: 9766
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 same MAC Address for 500 units

Postby ESP_Sprite » Sun Jul 23, 2023 1:19 am

How are you reading out that MAC address?

Who is online

Users browsing this forum: No registered users and 60 guests