That is a 50-50 question as the specific MAC is computed in software except the Wifi station mode which is equal to the base MAC from the EFUSE. The EFUSE MAC is ideally unique. I did some digging and the ethernet MAC, wifi soft access point mode MAC and bluetooth MAC(Classic/BLE) are all derived from the base MAC address which is 6 bytes long.
I wrote this down so I will just copy paste from my notes:
Code: Select all
The following MAC addresses are derived from the BASE MAC in the EFUSE BLK0.
#ESP_MAC_WIFI_STA
#ESP_MAC_WIFI_SOFTAP
#ESP_MAC_BT
#ESP_MAC_ETH
For 2 universal MAC addresses, the BT and Wifi are both enabled. Ethernet is disabled. Here:
#ESP_MAC_WIFI_STA=ESP_MAC_WIFI_SOFTAP=BASE MAC.
#ESP_MAC_BT=BASE MAC+1
For 4 Universal MAC addresses, the BT, Wifi and ethernet are all enabled. Here:
#ESP_MAC_WIFI_STA=BASE MAC.
#ESP_MAC_WIFI_SOFTAP=BASE MAC+1
#ESP_MAC_BT=BASE MAC+2
#ESP_MAC_ETH=BASE MAC+3
You can refer more from the components/esp32/system_api.c file within esp idf. Look for the function esp_read_mac. The number of universal mac addresses can be set within menuconfig.
Also as an addition: The 4 MAC addresses above are computed in software at runtime. The first 24 bits of the address of any of the MACs above identify the OUI (organisationally unique identifier) which when I check on the OUI lookup tool from wireshark
https://www.wireshark.org/tools/oui-lookup.html :
24:0A:C4
Which gives:
24:0A:C4 Espressif Espressif Inc.
So my geuss is every Espressif Base MAC's should be mutually spaced by 4 bits from the next for true uniqueness. only an espressif representative I believe can answer this but but since they can only assign (2^24 )/(1 billion device) MACs, my thinking is that each devices base MAC is spaced from the next by 1. They separated the MACs by usage. A devices BT MAC will always be spaced 4 bits from the next and the bluetooth usage niche is different from wifi/ethernet. Where it gets tricky is the ethernet.
In theory one device's Wifi MAC may collide with another device's ethernet MAC, but since not much of espressif's market may use the ethernet peripheral, there may be hardly any collisions in practice.