I am currently working on implementing a device unique ID so I am able to identify my Arduino Leonardo chips from the embedded source code.
There are numerous resources in the internet with many different aproaches for getting a unique number.
Most of the time the command/makro
boot_signature_byte_get(number)
is mentioned but I am still confused what this function does and what exactly is read out.
First I was thinking that reading just the first 16 bytes (byte 0 - 15) is the way to go:
0x1E639561 8761FFFF 00FFFFF7 FFFF5830
0x1E779573 8775FFFF 00FFFFF7 FFFF5739
However the numbers seem to be kind of systematic, especially the 0xFF bytes. So it seems to be no adequate data for identification and I have to be totally sure that the data is not changing!
Then I found out (from an other example from the internet) that reading byte 14 to 23 (10 bytes) seems to be more random, which is good.
0x57393131 3037150C 1011
0x58303230 39381507 0319
0x59373932 30311510 081A
0x58303231 3136150B 1807
But still, I don't know what I am reading.
I think it is data that is saved on the flash memory. This brings me to the question if this number may be overwritten when I reprogram the bootloader or directly flash the HW over avrdude?
And I am really curious what I am reading.
Maybe there is a better solution for reading an unique id?
If possible I don't want to define an ID myself since the production procedur would be much more complicated.
Hope one of the experts can help.
Thank you.