VelocAI logo Bluetooth Explorer Documentation

Bluetooth GATT Characteristic Reference

Glucose Measurement Context (0x2A34)

org.bluetooth.characteristic.glucose_measurement_context

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.

PropertyValue
NameGlucose Measurement Context
UUID0x2A34
Typeorg.bluetooth.characteristic.glucose_measurement_context
XML RootCharacteristic
Source Fileorg.bluetooth.characteristic.glucose_measurement_context.xml
Field Count14

Field Specification

Parsed field definitions from the source XML value structure.

Field Requirement Format Unit Exponent Notes
FlagsMandatory8bit--These flags define which data fields are present in the Characteristic value
Sequence NumberMandatoryuint16---
Extended FlagsC18bit--C1: Field exists if the key of bit 7 of the Flags field is set to 1
Carbohydrate IDC2uint8--C2: Field exists if the key of bit 0 of the Flags field is set to 1
Carbohydrate - units of kilogramsC2SFLOATorg.bluetooth.unit.mass.kilogram-3C2: Field exists if the key of bit 0 of the Flags field is set to 1
MealC3uint8--C3: Field exists if the key of bit 1 of the Flags field is set to 1
TesterC4nibble--C4: Field exists if the key of bit 2 of the Flags field is set to 1
HealthC4nibble--C4: Field exists if the key of bit 2 of the Flags field is set to 1
Exercise DurationC5uint16org.bluetooth.unit.time.second-C5: Field exists if the key of bit 3 of the Flags field is set to 1
Exercise IntensityC5uint8org.bluetooth.unit.percentage-C5: Field exists if the key of bit 3 of the Flags field is set to 1
Medication IDC6uint8--C6: Field exists if the key of bit 4 of the Flags field is set to 1
Medication - units of kilogramsC6SFLOATorg.bluetooth.unit.mass.kilogram-6C6: 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 litersC6SFLOATorg.bluetooth.unit.volume.litre-3C6: 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
HbA1cC7SFLOATorg.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
Flags01Carbohydrate ID And Carbohydrate PresentFalseTrue
Flags11Meal PresentFalseTrue
Flags21Tester-Health PresentFalseTrue
Flags31Exercise Duration And Exercise Intensity PresentFalseTrue
Flags41Medication ID And Medication PresentFalseTrue
Flags51Medication Value Unitskilogramsliters
Flags61HbA1c PresentFalseTrue
Flags71Extended Flags PresentFalseTrue

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.