17

I want to build a simple Bluetooth Low Energy-based application using a custom profile. The adopted profiles / services / characteristics / descriptors use 16-bit UUIDs as seen on the official site.

The 16-bit UUIDs are shortcuts for a corresponding 128-bit UUID and is translated as

128-bit UUID = 16-bit Attribute UUID * 2^96 + Bluetooth_Base_UUID 

with Bluetooth_Base_UUID being 00000000-0000-1000-8000-00805F9B34FB. (Source: Bluetooth Core Specification Vol 3 Part F Section 3.2.1)

Since I am using a custom profile, I'm wondering what UUIDs I am allowed to use.

  • Which range of 128-bit UUIDs can be used to describe vendor defined attributes in Bluetooth Low Energy?
Etan
  • 17,014
  • 17
  • 89
  • 148

4 Answers4

20

All of the 16-bit and 32-bit UUIDs above the base UUID that you show above are reserved for items in the spec (or future specs). So vendor apps are free to use any 128-bit UUID less than the base UUID. There is no reserved space for vendors to use 16-bit or 32-bit UUIDs.

Vincent Scheib
  • 17,142
  • 9
  • 61
  • 77
TJD
  • 11,800
  • 1
  • 26
  • 34
  • 2
    Could you specify a source where it is confirmed that all UUIDs less than the base UUID are free to use for anyone? – Etan Apr 23 '12 at 14:51
  • 7
    Vol 3 Part F Section 3.2.1 "Applications shall not convert a 128-bit UUID to a 16-bit UUID for comparison as there is no guarantee that the 128-bit UUID is based on the Bluetooth Base UUID; it could be a vendor defined 128-bit UUID.". Also see Vol 3 Part B 2.5, and most clearly stated in https://www.bluetooth.org/Technical/AssignedNumbers/service_discovery.htm (registration required) – TJD Apr 23 '12 at 17:16
  • @TJD: Such an important like you have shared. Thanks a ton! –  Apr 14 '14 at 14:30
  • 6
    @TJD: can you provide a reference to the "less than the base UUID" part of the statement? I can't find that in the spec. Also, there's not really a "less" than, because the UUID range is non-continuous if you treat UUIDs as 128-bit integers. See my answer. – Martijn Thé May 06 '14 at 05:32
12

You can register 16-bit UUIDs with the Bluetooth SIG: https://www.bluetooth.org/en-us/Pages/LoginRestrictedAll/16-bit-UUIDs-member.aspx This is useful if you need to save the bytes (for space, energy or other performance reasons).

My interpretation of the Bluetooth spec is that you can use any 128-bit UUID outside of Bluetooth UUID Base "range", freely:

 xxxxxxxx-0000-1000-8000-00805F9B34FB

I've put range in quotation marks, because the spec's 16-bit to 128-bit conversion formula that you quoted, suggests that the left-most bytes are the most significant (big endian!). Note, that if you treat the UUID as a 128-bit integer, the Bluetooth UUID Base "range" is not a continuous range of values.

Martijn Thé
  • 4,674
  • 3
  • 29
  • 42
3

You may not use 16-bit or 32-bit UUIDs unless they are assigned to you by registering.

Using a short UUID that was not registered will result in incompatibilities with your device and future standards and or other device's registered numbers. Bluetooth qualification will require valid numbers.

When not registering, generate your own valid 128-bit UUIDs:

Vincent Scheib
  • 17,142
  • 9
  • 61
  • 77
0

Here is FAQ\Talk about BLE UUID

http://www.cypress.com/forum/psoc-4-ble/how-can-i-get-uuid-services-and-characteristics

Darshit Shah
  • 2,366
  • 26
  • 33