Skip to Academy content
MODULE 02 · LESSON 05
Beginner12 min read

Understanding 16-bit and 128-bit BLE UUIDs

A UUID is the label that tells software what a service or characteristic represents. Its length and context matter more than how intimidating the hex looks.

LEARNING OBJECTIVES

What you’ll learn

  • Identify assigned 16-bit UUIDs and full 128-bit UUIDs
  • Expand a 16-bit assigned value using the Bluetooth Base UUID
  • Distinguish a UUID from a local attribute handle
Before you begin

Know the service, characteristic and handle structure from the previous lesson.

What a UUID identifies

UUID means Universally Unique Identifier. In a GATT database, UUIDs identify service types, characteristic types, descriptor types and other attribute types. A client can recognize a Battery Service by its assigned UUID, then inspect the characteristics inside it. The UUID names a type; it does not contain the current battery percentage or tell the client which handle to read.

UUIDs make independently built devices easier to interpret when they implement the same specification. They do not guarantee that every device with the same service UUID has identical application behavior or permissions. To use a value, a client still discovers the server’s actual database.

Assigned short UUIDs

The Bluetooth SIG assigns shorter aliases for standardized types. Verified examples in the Bluetooth Assigned Numbers list include Battery Service 0x180F, Battery Level characteristic 0x2A19, and Client Characteristic Configuration descriptor 0x2902. These values have different meanings even though each is written with four hexadecimal digits. The prefix alone is not a universal grammar for every possible UUID; consult the assigned list and the attribute context.

These 16-bit aliases save space in common representations. Bluetooth also defines assigned 32-bit UUID aliases. An application developer should not simply select an unused-looking 16-bit value for a private service; custom definitions normally use generated 128-bit UUIDs.

Assigned 16-bit UUID 0x180F expands to 0000180F-0000-1000-8000-00805F9B34FB using the Bluetooth Base UUID
The short assigned value replaces the leading four hexadecimal digits of the base UUID’s first group after zero padding.

The Bluetooth Base UUID

The Bluetooth Base UUID is 00000000-0000-1000-8000-00805F9B34FB. The full form of the assigned 16-bit Battery Service UUID 0x180F is 0000180F-0000-1000-8000-00805F9B34FB. The assigned 32-bit form replaces all eight leading hex digits instead. A short and expanded form are two representations of the same assigned UUID, not two separate services.

Be careful when reading raw packets: a human-readable UUID string and its transmitted byte order are different representations. The Bluetooth protocol and the field definition determine on-air encoding. This lesson compares identifiers as displayed to developers; the data-format lesson teaches how to interpret byte sequences.

Custom 128-bit UUIDs

A manufacturer can generate a 128-bit UUID for a custom service, then distinct UUIDs for each custom characteristic type. For example, the fictional temperature database in the previous lesson uses full-length example UUIDs to distinguish the service from its value. A production team should generate UUIDs properly and publish the data format for software that needs to use them.

Not every 128-bit UUID is proprietary: the full form of an assigned 16-bit UUID is also 128 bits. Look for whether the value matches the Bluetooth Base UUID pattern and an assigned alias. A different full-length UUID usually indicates an application-specific definition, whose meaning must come from the device documentation.

UUID versus handle in discovery output

In the recorded HibouAir discovery, 000c serv 0x180a means service declaration handle 000c has the assigned Device Information Service UUID 0x180A. The pair 000f char 0x180a prop=02 and 0010 ---- 0x2a29 shows a characteristic declaration at handle 000f and a Manufacturer Name String value at handle 0010. UUID 0x2A29 identifies the characteristic type; handle 0010 is where this sensor stores that attribute. Other devices may assign a different handle.

GATT listing labels local handles on the left and UUID types on the right for service, characteristic declaration and value entries
Read a discovery line from both ends: location at left, type at right.

Classify four identifiers

For each item, decide whether it is an assigned service UUID, an assigned characteristic UUID, a full custom UUID, or a local attribute handle. Open the answers after making your choice.

0x180F

Assigned service UUID: Battery Service. It can expand to 0000180F-0000-1000-8000-00805F9B34FB.

0x2A19

Assigned characteristic UUID: Battery Level. Its current value is not encoded in the UUID.

7b8d0002-6542-4f9c-8a20-123456789abc

Full 128-bit custom example UUID from our fictional temperature service; look to that product’s documentation for meaning.

0x0012 in the fictional attribute table

A local attribute handle, because it points to one entry in that server. By itself, the same four-digit shape cannot tell you the role; context does.

To see UUIDs in a real discovery listing, follow the HibouAir video and BleuIO Web App lab. This recognition exercise needs no hardware and avoids repeating that connection workflow.

QUICK CHECK

Check your understanding

Which full UUID represents the assigned Battery Service UUID 0x180F?

IN BRIEF

Key takeaways

  • UUIDs identify types; handles locate attributes within one server database.
  • A Bluetooth-assigned 16-bit alias expands using the Bluetooth Base UUID.
  • A full 128-bit representation can be an assigned UUID or a custom definition.

Further Reading and Resources

Finished this lesson?

Save your progress in this browser.