Homepage GitHub

UniqueID How is it determined?


(William Yang) #1

Stm32 UniqueID is 96 bits, but I see that you define it as 16 bytes.


#2

Perhaps st does not follow a standard?


#3

there are uuid generators online.


(Nuno Lucas) #4

If you assume STM32 unique IDs have enough entropy, 96 bits will be more than enough to ensure a very low probability of collision between devices (ethernet had no problems with just 48 bits).

There is no requirement that unique IDs are random. If you can assure they are different they can be just a simple counter incremented per device.

Random numbers are used to make it unnecessary to have that synchronisation element. You depend on statistic properties of big enough random numbers to avoid collisions, instead of a global serial ID.

A simple solution for the hobbyist is to use a build timestamp in your firmware. By rebuilding your firmware you ensure another unique id.