A 16-bit or 128-bit UUID. Can be used for services, characteristics, descriptors and more.
Create a new UUID or UUID object encapsulating the uuid value. The value can be one of:
intvalue in range 0 to 0xFFFF (Bluetooth SIG 16-bit UUID)
- a buffer object (bytearray, bytes) of 16 bytes in little-endian order (128-bit UUID)
- a string of hex digits of the form ‘xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx’
Creating a 128-bit UUID registers the UUID with the onboard BLE software, and provides a temporary 16-bit UUID that can be used in place of the full 128-bit UUID.
Parameters: value (int or typing.ByteString) – The uuid value to encapsulate
The 128-bit value of the UUID Raises AttributeError if this is a 16-bit UUID. (read-only)
128 if this UUID represents a 128-bit vendor-specific UUID. 16 if this UUID represents a 16-bit Bluetooth SIG assigned UUID. (read-only) 32-bit UUIDs are not currently supported.
Packs the UUID into the given buffer at the given offset.
Two UUID objects are equal if their values match and they are both 128-bit or both 16-bit.