0 votes
in ESPaper by (230 points)
I need a way to differentiate between multiple ESPapers.

Is there a source for a unique (or almost unique) identification between several boards? Is there maybe a serial number I can read? If that does not exist at all, is there a way to save a file to the device that stays around until the firmware is reprogrammed?

Further reading: https://arduino.stackexchange.com/questions/279/how-can-i-get-a-unique-id-for-all-my-arduino-boards

1 Answer

0 votes
by (19.9k points)
selected by
Best answer

There's ESP.getChipId() which may be sufficient for your needs.

Serial.printf(" ESP8266 Chip id = %08X\n", ESP.getChipId());

By default, ESP sets its MAC address as a concatenation of 3 fixed bytes and 3 unique bytes burned into chip (which are read by getChipId function).

by (230 points)
Awesome, thank you! Do you happen to know how unique this is? Could there be collisions?
by (3.6k points)
The first 24 bits (3-bytes) of the MAC are the identifier number of the manufacturer (e.g. Espressif) and the second group of 3-bytes (24 bits) is usually a serial number assigned by the manufacturer. So assume they always use the same manufacturers MAC prefix then you have a 1 in 2^24 chance of a part number collision, so that's a 16,777,216 to 1 chance of a collision and I doubt they have sold >16M parts yet, but maybe they have! even so the chance of you purchasing the same 3-byte serial must be so low as to be approaching zero.
by (190 points)
I know this is an older post but the 3-byte manufacturer that is used is not just one. I have many different combinations coming from my MAC addresses. Here are some samples:
by (19.9k points)
That's correct. If you search https://wintelguy.com for 'Espressif' you get a list of (currently) 26 vendor numbers.

Welcome to ThingPulse Q&A, where you can ask questions and receive answers from other members of the community.