UUID is 128-bit long, used to label information in a computer system. There are five different UUID versions which are version 1 , version 2, version 3, version 4 and version 5.
BLE devices followed a specified hierarchy set by Bluetooth SIG called Generic Attributes Profile (GATT). It is used to defined how connecting BLE devices able to send or receive data.
Ever wonder how IoT devices are unique from the billions of connecting devices? UUID is also used to securely allowed authorized parties to collect or retrieve data from the IoT devices.
It uses date and time for labelling information and is considered as a time-based UUID. It is composed of five sections which are:
It replaced the datetime information in Version 1 UUID with a local domain number. It is not widely used as its loss of uniqueness makes it easier to be identified (security risk) compare to Version 1 UUID.
Version 3 UUID make use of namespace and name data. Instead of time and device MAC address. Namespace itself is a UUID and where the name value will be attached to. Name is used as an identity itself which convey what it is used for. The inputs are then run through MD5 hashing algorithm to generate the UUID.
All the other UUID Versions are considered non-random UUIDs. Only Version 4 UUID are randomly generated values that does not contain any information that are used in other UUIDs (namespace, MAC address, time-based information).
The only way to identiy it is a Version 4 UUID, the character is simply 4 in the first position of the third section of the UUID. Other characters are randomly generated.
Version 5 UUID is similar to Version 3 UUID which make use of namespace and name data. The difference is that the inputs are run through SHA-1 hashing algorithm to generate the UUID.