ESP-Library icon indicating copy to clipboard operation
ESP-Library copied to clipboard

ESP.getEfuseMac() doesn't return a useable value for ChipId on ESP32

Open arcticlinux opened this issue 2 years ago • 0 comments

from config.h

#define ESP_GETCHIPID (uint32_t)ESP.getEfuseMac()

Due to the way the value is returned on ESP32, you basically end up getting the first three digits of the Mac address the way it's used in the examples chipId.substring(chipId.length()-3), and for me that meant that I was getting the exact same value on two different boards.

Here is some updated example code: https://github.com/cweinhofer/arduino-esp32/blob/master/libraries/ESP32/examples/ChipID/GetChipID/GetChipID.ino

Issues that mentioned the problem, and provided the example code. https://github.com/espressif/arduino-esp32/issues/3859 https://github.com/espressif/arduino-esp32/pull/4070

I can provide a pull request in the near future.

arcticlinux avatar Jul 10 '22 18:07 arcticlinux