VelocAI logo Bluetooth Explorer Documentation

Bluetooth GATT Attribute Reference

Include (0x2802)

org.bluetooth.attribute.gatt.include_declaration

Include is defined in the Bluetooth GATT XML specification with type org.bluetooth.attribute.gatt.include_declaration and UUID 0x2802.

Quick Summary

Payload length ranges from 6 to 20 bytes depending on UUID width or variable fields. This page is generated from official GATT XML and presented as implementation-ready guidance.

At a Glance

Key reference details for BLE implementation, interoperability testing, and AI-assisted troubleshooting.

PropertyValue
NameInclude
UUID0x2802
Typeorg.bluetooth.attribute.gatt.include_declaration
XML RootAttribute
Source Fileorg.bluetooth.attribute.gatt.include_declaration.xml
Field Count3

Field Specification

Parsed field definitions from the source XML value structure.

Field Requirement Format Unit Exponent Notes
Included Service Attribute HandleMandatoryuint16---
End Group HandleMandatoryuint16---
Service UUIDMandatorygatt_uuid---

Byte Layout and Decode

Payload length ranges from 6 to 20 bytes depending on UUID width or variable fields.

function decodePayload(dataView, offset = 0) {
  const included_service_attribute_handle = dataView.getUint16(offset + 0, true);
  const end_group_handle = dataView.getUint16(offset + 2, true);
  const service_uuidRaw = new Uint8Array(dataView.buffer, dataView.byteOffset + offset + 4);
  const service_uuid = service_uuidRaw.length === 2
    ? `0x${service_uuidRaw[0].toString(16).padStart(2, "0")}${service_uuidRaw[1].toString(16).padStart(2, "0")}`
    : Array.from(service_uuidRaw).map((b) => b.toString(16).padStart(2, "0")).join("");
  // UUID width can be 2 bytes (16-bit) or 16 bytes (128-bit).
  return { included_service_attribute_handle, end_group_handle, service_uuid };
}

Use Cases and Integration Notes

GATT Table Parsing

Interpret declaration attributes to build reliable handles and operation maps in clients.

Code Generation

Use attribute metadata to auto-generate strongly-typed BLE client APIs.

Firmware QA

Check declaration consistency against actual values to catch table defects early.

Implementation Checklist

  • Parse attribute fields strictly in declared order and format.
  • Treat handles and value references as separate entities where required.
  • Guard for variable-width UUID formats in mixed 16-bit and 128-bit profiles.
  • Log parsed attribute metadata for post-run debugging and audits.

FAQ

What is Include in Bluetooth GATT?

Include is defined as a Bluetooth GATT attribute entry with type org.bluetooth.attribute.gatt.include_declaration and UUID 0x2802.

What UUID identifies Include?

The UUID for Include is 0x2802.

How should I parse Include?

Payload length ranges from 6 to 20 bytes depending on UUID width or variable fields.

Where does this definition come from?

This page is generated from the Bluetooth SIG mirror XML in the oesmith/gatt-xml repository.

How does this page support BLE implementation?

The page combines structured tables, practical Q&A, and JSON-LD metadata to help teams validate integrations and troubleshoot consistently.