Skip to Academy content
MODULE 02 · LESSON 04
Beginner15 min read

BLE Services, Characteristics and Descriptors

A service list becomes useful when you can tell which entries are groups, which hold data, and which configure how updates arrive.

LEARNING OBJECTIVES

What you’ll learn

  • Read a service, characteristic declaration, value and descriptor as distinct attributes
  • Separate properties from permissions and UUIDs from handles
  • Inspect a connected peripheral’s discovery output
Before you begin

Know the GATT client/server model from the preceding lesson. A BleuIO dongle and a connectable peripheral are needed only for the optional lab.

A database made of attributes

The GATT lesson introduced the server’s attribute table. Every entry has a handle, a type identified by UUID, a value, and permissions. GATT gives groups of these entries a useful shape: a service declaration followed by characteristic definitions and, where needed, descriptors. The table belongs to one server; discovery tells a client which entries actually exist.

GATT hierarchy showing primary service declaration, characteristic declaration, characteristic value, and optional descriptor as separate attributes with handles
A characteristic definition includes a declaration and value attribute; descriptors, when present, follow the value.

Services group a function

A service groups related characteristics into a recognizable function. For example, the Bluetooth SIG assigns 0x180F to the Battery Service and 0x180A to Device Information. A product may also define custom services with its own 128-bit UUIDs. A service UUID tells a client what kind of service it found; it does not say which handle number the service uses on every device.

Services can be primary or secondary, and a service can include another service. Beginners usually encounter primary services in discovery listings. A familiar name helps an application decide which characteristics to inspect, but it should still discover the actual attributes rather than assume a fixed layout.

A characteristic has a declaration and a value

The characteristic declaration is an attribute of type 0x2803. Its value contains the characteristic properties, the handle of the characteristic value attribute, and the characteristic UUID. The separate value attribute contains the bytes an application reads, writes, or receives in an update. This explains why a discovery listing may show two adjacent handles for one characteristic.

Common properties include Read, Write with response, Write Without Response, Notify, and Indicate. They advertise supported kinds of operation. Permissions and security are separate checks: a characteristic can have a Read property yet refuse a read until the link meets its encryption or authentication requirement. Write Without Response means no ATT write response is requested; it does not promise that an application can ignore errors elsewhere.

Characteristic anatomy: declaration contains properties, value handle and characteristic UUID; value attribute contains bytes; optional CCCD configures updates
The declaration describes the value. The value handle is the address used for a read or write.

Descriptors add detail or configuration

A descriptor is another attribute associated with a characteristic. A Characteristic User Description descriptor (0x2901) can provide a human-readable label. A Client Characteristic Configuration descriptor, or CCCD (0x2902), lets a client enable notifications or indications for a characteristic that supports them. A CCCD is not present on every characteristic, and the characteristic’s properties must support the requested update type.

The descriptor is not the measurement itself. If a temperature characteristic notifies, its value attribute carries the measurement; the CCCD controls whether the client wants updates. The server may maintain client-specific CCCD state according to the Bluetooth rules. More detailed notification behavior is covered later in the curriculum.

Handles and UUIDs answer different questions

A handle is a 16-bit identifier for a particular attribute in one server’s table. The client uses a discovered handle to address an ATT operation. A UUID identifies the attribute type or GATT meaning. Two servers can use the same Battery Level UUID at different handles. A single server can also contain multiple instances of a type. Do not save an illustrative handle as if it were universal.

Ask two questions

“What is this?” Look at the UUID. “Where is this entry on this server?” Look at the handle. The UUID lesson explains short and full-length identifiers.

Worked example: a fictional temperature service

The table below is an illustrative educational database, not output from a real peripheral. The custom UUIDs are example identifiers. This fictional characteristic permits Read and Notify, but a real product would also define its permissions, measurement encoding, and update behavior.

HandleAttributeType / value meaning
0x0010Primary service declarationService UUID 7b8d0001-6542-4f9c-8a20-123456789abc
0x0011Characteristic declaration (0x2803)Read + Notify; value handle 0x0012; characteristic UUID 7b8d0002-6542-4f9c-8a20-123456789abc
0x0012Characteristic valueTwo temperature bytes in this example’s documented format
0x0013CCCD (0x2902)Client configuration for notifications

A client reads 0x0012 to get the current value if permitted; it does not read the declaration at 0x0011 expecting a temperature. It discovers the characteristic UUID and value handle first. If it wants notifications, it configures the CCCD using the appropriate client procedure and permissions.

A recorded HibouAir Device Information Service

In the video, AT+GETSERVICES discovers 000c serv 0x180a on a HibouAir sensor. Bluetooth assigns 0x180A to the Device Information Service. The terminal displays the UUID, so the service name comes from the assigned numbers list. The excerpt below shows the actual characteristic rows recorded for that service:

000c serv 0x180a
000d char 0x180a prop=02 (-R------)
000e ---- 0x2a24
000f char 0x180a prop=02 (-R------)
0010 ---- 0x2a29
0011 char 0x180a prop=02 (-R------)
0012 ---- 0x2a25
0013 char 0x180a prop=02 (-R------)
0014 ---- 0x2a26
0015 char 0x180a prop=02 (-R------)
0016 ---- 0x2a27

The serv row starts the service. Each char row is a characteristic declaration and reports its containing service and properties; prop=02 (-R------) advertises Read. The following ---- row is that characteristic’s value attribute, with its own handle and UUID. For example, 000f declares Manufacturer Name String, but 0010 ---- 0x2a29 is its value handle and assigned UUID. Read 0010, not declaration handle 000f.

Characteristic UUIDBluetooth assigned nameRecorded value handle
0x2A24Model Number String000e
0x2A29Manufacturer Name String0010
0x2A25Serial Number String0012
0x2A26Firmware Revision String0014
0x2A27Hardware Revision String0016

These handles belong to the sensor used in the recording. UUIDs identify characteristic types; handles locate attributes in one connected server database. Another sensor may expose a different layout. A Read property also does not override the server’s access permissions or security requirements.

Reading value handle 0010 in that recording returned Smart Sensor Devices AB, hex 0x536D6172742053656E736F722044657669636573204142, and size 23. Reading value handle 0014 returned firmware revision 1.1.4, hex 0x312E312E34, and size 5. These are text characteristics, so the shown hex bytes encode the displayed characters. The data formats lesson explains why other characteristic values may require a different interpretation.

Inspect a real server with BleuIO

The Web App lab follows the recorded HibouAir workflow, but you may use another connectable BLE peripheral with a readable GATT characteristic. Scan results, addresses, RSSI, services and handles vary. Some values require pairing or authentication; some do not allow reads at all.

After a successful connection, AT+GETSERVICES prints service, characteristic, value and possibly descriptor lines. Read the leading four hex digits as the handle, the UUID at the end as the type, and prop= on declaration lines as advertised properties. Wait for browse completion before using a value handle. If the connected peripheral does not expose a readable Device Information characteristic, inspect its documentation and choose a permitted value instead.

VIDEO DEMONSTRATION

Watch: Discover BLE Services and Read Characteristic Values

Connect to a HibouAir sensor with BleuIO, inspect its GATT database, and read the manufacturer name and firmware revision from their discovered value handles.

Video unavailable here? Watch on YouTube ↗

HANDS-ON LAB · BLEUIO WEB APP

Discover and Read a Peripheral with BleuIO

Scan, connect, discover value handles, then read a characteristic that your peripheral permits.

What you need

A BleuIO or BleuIO Pro USB dongle with current compatible firmware, a separate connectable BLE peripheral with a readable characteristic (the video uses HibouAir), a computer with USB, and a desktop browser with Web Serial support such as current Chrome or Edge. Browser and operating system support varies.

BleuIO Web App terminal output above an AT command entry field and Send button
BleuIO Web App command input and terminal. Official screenshot and guide.
  1. Power the peripheral in connectable advertising mode. Open the BleuIO Web App and connect the dongle’s serial port.
  2. Send AT and confirm OK. Check AT+GAPSTATUS; for this read workflow, use Central role. If needed, stop advertising, terminate BLE connections, and send AT+CENTRAL.
  3. Send AT+GAPSCAN=5. Find your own connectable peripheral. The recorded scan showed [12] Device: [1]DD:32:A7:3F:6E:39 RSSI: -58 (HibouAir); your address, address type, index and RSSI will differ.
  4. Connect using the documented AT+GAPCONNECT=[address type]<observed address> form, replacing both placeholders with your scan result. The video used AT+GAPCONNECT=[1]DD:32:A7:3F:6E:39. Here [1] is the address type, while [12] in the scan was a temporary result index. Alternatively, use your current scan index with the documented AT+GAPCONNECT=<index>! form.
  5. Wait for CONNECTED and any automatic discovery to complete. Send AT+GETSERVICES and wait for handle_evt_gattc_browse_completed with status=0. Find the service, declaration, and following value rows; some firmware prints discovery automatically after connecting.
  6. If your device exposes a readable Manufacturer Name String (0x2A29), send AT+GATTCREAD=<its value handle>. The recording used 0010 and returned Smart Sensor Devices AB. Do not use that handle unless your own discovery shows it.
  7. If your device exposes a readable Firmware Revision String (0x2A26), read its discovered value handle. The recording used 0014 and returned 1.1.4. Compare the text, hex bytes and byte count.

Commands to send

AT
AT+GAPSTATUS
AT+CENTRAL
AT+GAPSCAN=5
AT+GAPCONNECT=<your scan index>!
AT+GETSERVICES
AT+GATTCREAD=<your value handle>
Recorded responses from one HibouAir sensor — discover your own value handles before reading
AT+GATTCREAD=0010
OK
handle_evt_gattc_read_completed: conn_idx=0000 handle=0010 status=0
Value read: Smart Sensor Devices AB
Hex: 0x536D6172742053656E736F722044657669636573204142
Size: 23

AT+GATTCREAD=0014
OK
handle_evt_gattc_read_completed: conn_idx=0000 handle=0014 status=0
Value read: 1.1.4
Hex: 0x312E312E34
Size: 5
Troubleshooting tips
  • If a scan result cannot be connected, check that it is connectable, available and in range; addresses may rotate.
  • If AT+CENTRAL is rejected, terminate BLE connections and stop advertising first.
  • If the read fails, check the characteristic Read property, access permissions, and any pairing or authentication requirement.
  • If discovery fails or a command is unavailable, check firmware and the current command reference.
  • Verbose output and discovery row order can differ by firmware; identify row types and completion status rather than expecting identical lines.
  • For multiple simultaneous connections, confirm the intended target connection with AT+TARGETCONN before discovery.

Need a visual reference? See BleuIO’s illustrated Web App guide.

Open BleuIO Web App Opens in a new tab so you can keep this lesson open.
QUICK CHECK

Check your understanding

In the fictional table, which handle holds the temperature value to read?

IN BRIEF

Key takeaways

  • A GATT service groups characteristic definitions; each characteristic has a declaration and value attribute.
  • Properties advertise operations, while permissions and security decide whether an attempt is allowed.
  • UUIDs identify types; discovered handles locate entries on a particular server.

Further Reading and Resources

Finished this lesson?

Save your progress in this browser.