Bluetooth Low Energy ATT Decoder Handle Mapping

Low Energy device attributes contain a 16-bit address called the attribute handle. Each handle is associated with an attribute Universally Unique Identifier (UUID) that is 128-bits long. In the attribute database, the handle is unique while the UUID is not unique.

The Wireless Protocol Suite software detects and stores the relationships (mappings) between handle and UUID during the GATT discovery process. But sometimes, there is no GATT discovery process because:

  • The discovery has previously taken place, both devices stored the mappings, and the discovery will not repeat at every subsequent connection.

  • The developer owns both devices in the conversation and chose to ignore discovery because the mappings are known.

  • The devices are in development and the code to perform the mappings has not been written yet. The solution to this problem is to:

  1. define the mappings in a file and

  1. then pre-loading the mapping using the Wireless Protocol Suite software.


Creating handle-UUID mapping file

Create a file named "ATT_Handle_UUID_Preload.ini' in the root directory of "C:\Users\Public\Public Documents\Teledyne LeCroy Wireless\My Decoders\", but the file can be located anywhere.

For macOS installations, the Wireless Protocol Suite directory locations are available via a link that is created in the Documents shortcut in your Finder window within a “Teledyne LeCroy Wireless” folder.

Assume that you want to create a GATT service starting at handle 1.

Create a section in the .ini file called:

[Service Base Handles]

A=1

"A" will be your first service. Make the base handle equal to the handle of your service. You can use all upper- and lower-case letters so you can have up to 52 service handles.

Next add the following section.

[Advertiser Handles]

; Generic Access Profile (GAP) A0 = 1800

A1 = 2803 A2 = 2a00 A3 = 2803

A4 = 2a01 A5 = 2803 A6 = 2a04

A few things of note:

  • In the code above, lines beginning with a semi-colon are comments.

  • If you want to change the base handle of the GAP service, change the "1" to some other number.