Serial numbering for Esp products

Good day all.
I have and existing PIC project I am porting to ESP 32 and 8266.
I have a .txt file that has a list of serial numbers that are copied, programmed into the Eeprom of the PIC, deleted from the .txt file, than read back during during program execution.
My Question is has it been done and is there any resource to repeat or do the same using Aduino and ESP products.
Thanks in advance for assistance on this.

Use MAC address of Station interface for that. It is preprogrammed in OTP memory.

Thanks azarubkin
I am hoping to stay with my current setup. mainly because I have a serial numbering system I can control. Also in my current setup if a device needs to be swapped out I need to be able, to clone a second device with the same number.

You can use SPIFFS for that, it’s possible to upload SPIFFS image during programming. Just store a file with serial number there. Be aware it doesn’t provide any protection against desoldering and reading out the contents.
On ESP32, you have one time programmable efuses, and flash contents can be encrypted, not that I’m familiar with the procedure, but it’s possible. On ESP8266, I don’t know of such features.

1 Like