How do I choose a UUID for my custom services and characteristics?

Custom UUIDs for custom GATT Services and Characteristics

First, a few things to know:

  • “A UUID is a universally unique identifier that is guaranteed to be unique across all space and all time” (Bluetooth 4.2 spec, Vol 3, Part B, section 2.5.1 UUID)
  • A UUID is a 128-bit value.
  • There are reserved UUIDs by the Bluetooth SIG that are generally represented by their 16-bit aliases. These aliases are used for convenience and represent a 128-bit value computed as follows:

128-bit value = 16-bit-value * 2^96 + BluetoothBaseUUID

where the BluetoothBaseUUID is 00000000-0000-1000-8000-00805F9B34FB Examples include:
0x180F -> Battery Service UUID (128-bit UUID: 0000180F-0000-1000-8000-00805F9B34FB)
0x2A00 -> Device Name Characteristic UUID (128-bit UUID: 00002A00-0000-1000-8000-00805F9B34FB)

These reserved UUIDs cannot be used for any custom services or characteristics, so you need to avoid them.

Note: you can actually purchase and reserve a 16-bit alias from the Bluetooth SIG here for a fee of $3,000, which would allow you to use the alias instead.

So, to create a UUID for your custom services and characteristics you would:

  1. Use a website such as GUID Generator to generate a UUID (or multiple UUIDs)
  2. Make sure it does not conflict with a reserved UUID (avoid any containing  XXXXXXXX-0000-1000-8000-00805F9B34FB where XXXXXXXX is any number)

Helpful Resources:

Don't miss out on the latest articles & tutorials. Sign-up for our newsletter today!

Take your BLE knowledge to the next level.

If you’re looking to get access to full video courses covering more topics, then check out the Bluetooth Developer Academy.

As part of all the courses within the Academy, you’ll also be able to download the full source code to use as a reference or use within your own application.

By joining the Bluetooth Developer Academy, you will get access to a growing library of video courses (one course released every single month).

The Academy also features access to a private community of Bluetooth experts, developers, and innovators. You’ll get to connect and interact with me and other experts in the Bluetooth space, learn from others’ experiences and knowledge, and share yours as well.

So, what are you waiting for?? Join today!

You may also be interested in these articles.

Don't miss out on the latest articles & tutorials. Sign-up for our newsletter today!

Want to quickly learn the core basics of Bluetooth Low Energy?

Grab a copy of my FREE “Intro to Bluetooth Low Energy” e-book now!