Bluetooth GATT Characteristic Reference
Glucose Measurement Context (0x2A34)
The Glucose Measurement Context characteristic is a variable length structure containing a Flags field, a Sequence Number field and, based upon the contents of the Flags field, may contain a Carbohydrate ID field, Carbohydrate field, Meal field, Tester-Health field, Exercise Duration field, Exercise Intensity field, Medication ID field, Medication field and a HbA1c field.
Quick Summary
Payload length is profile-defined or variable based on field formats. 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.
| Property | Value |
|---|---|
| Name | Glucose Measurement Context |
| UUID | 0x2A34 |
| Type | org.bluetooth.characteristic.glucose_measurement_context |
| XML Root | Characteristic |
| Source File | org.bluetooth.characteristic.glucose_measurement_context.xml |
| Field Count | 14 |
Field Specification
Parsed field definitions from the source XML value structure.
| Field | Requirement | Format | Unit | Exponent | Notes |
|---|---|---|---|---|---|
| Flags | Mandatory | 8bit | - | - | These flags define which data fields are present in the Characteristic value |
| Sequence Number | Mandatory | uint16 | - | - | - |
| Extended Flags | C1 | 8bit | - | - | C1: Field exists if the key of bit 7 of the Flags field is set to 1 |
| Carbohydrate ID | C2 | uint8 | - | - | C2: Field exists if the key of bit 0 of the Flags field is set to 1 |
| Carbohydrate - units of kilograms | C2 | SFLOAT | org.bluetooth.unit.mass.kilogram | -3 | C2: Field exists if the key of bit 0 of the Flags field is set to 1 |
| Meal | C3 | uint8 | - | - | C3: Field exists if the key of bit 1 of the Flags field is set to 1 |
| Tester | C4 | nibble | - | - | C4: Field exists if the key of bit 2 of the Flags field is set to 1 |
| Health | C4 | nibble | - | - | C4: Field exists if the key of bit 2 of the Flags field is set to 1 |
| Exercise Duration | C5 | uint16 | org.bluetooth.unit.time.second | - | C5: Field exists if the key of bit 3 of the Flags field is set to 1 |
| Exercise Intensity | C5 | uint8 | org.bluetooth.unit.percentage | - | C5: Field exists if the key of bit 3 of the Flags field is set to 1 |
| Medication ID | C6 | uint8 | - | - | C6: Field exists if the key of bit 4 of the Flags field is set to 1 |
| Medication - units of kilograms | C6 | SFLOAT | org.bluetooth.unit.mass.kilogram | -6 | C6: Field exists if the key of bit 4 of the Flags field is set to 1, C8: Field exists if the key of bit 5 of the Flags field is set to 0 |
| Medication - units of liters | C6 | SFLOAT | org.bluetooth.unit.volume.litre | -3 | C6: Field exists if the key of bit 4 of the Flags field is set to 1, C9: Field exists if the key of bit 5 of the Flags field is set to 1 |
| HbA1c | C7 | SFLOAT | org.bluetooth.unit.percentage | - | C7: Field exists if the key of bit 6 of the Flags field is set to 1 |
Bit Map
Bit-level enumerations extracted from the XML BitField definition.
| Field | Bit | Size | Name | 0 Means | 1 Means |
|---|---|---|---|---|---|
| Flags | 0 | 1 | Carbohydrate ID And Carbohydrate Present | False | True |
| Flags | 1 | 1 | Meal Present | False | True |
| Flags | 2 | 1 | Tester-Health Present | False | True |
| Flags | 3 | 1 | Exercise Duration And Exercise Intensity Present | False | True |
| Flags | 4 | 1 | Medication ID And Medication Present | False | True |
| Flags | 5 | 1 | Medication Value Units | kilograms | liters |
| Flags | 6 | 1 | HbA1c Present | False | True |
| Flags | 7 | 1 | Extended Flags Present | False | True |
Byte Layout and Decode
Payload length is profile-defined or variable based on field formats.
function decodePayload(dataView, offset = 0) {
// Parse flags (8bit) according to Bluetooth format rules.
const sequence_number = dataView.getUint16(offset + 0, true);
// Parse extended_flags (8bit) according to Bluetooth format rules.
const carbohydrate_id = dataView.getUint8(offset + 2);
// Parse carbohydrate_units_of_kilograms (SFLOAT) according to Bluetooth format rules.
const meal = dataView.getUint8(offset + 3);
// Parse tester (nibble) according to Bluetooth format rules.
// Parse health (nibble) according to Bluetooth format rules.
const exercise_duration = dataView.getUint16(offset + 4, true);
const exercise_intensity = dataView.getUint8(offset + 6);
return { flags, sequence_number, extended_flags, carbohydrate_id, carbohydrate_units_of_kilograms, meal };
}
Use Cases and Integration Notes
BLE Telemetry
Map characteristic values into dashboards and alerts for device observability.
Firmware Regression
Compare decoded fields across builds to detect protocol or scaling changes.
App Integration
Build stable parsing paths that convert raw payloads into typed app models.
Implementation Checklist
- Validate payload length and mandatory fields before decode.
- Decode with Bluetooth-specified signedness, unit, and exponent handling.
- Convert units at presentation boundaries to avoid drift in business logic.
- Persist raw packets and decoded values for reproducible troubleshooting.
FAQ
What is Glucose Measurement Context in Bluetooth GATT?
Glucose Measurement Context is defined as a Bluetooth GATT characteristic entry with type org.bluetooth.characteristic.glucose_measurement_context and UUID 0x2A34.
What UUID identifies Glucose Measurement Context?
The UUID for Glucose Measurement Context is 0x2A34.
How should I parse Glucose Measurement Context?
Payload length is profile-defined or variable based on field formats.
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.