src.bluetooth_sig.gatt.characteristics.cgm_status

CGM Status characteristic implementation.

Implements the CGM Status characteristic (0x2AA9). Reports the current status of a CGM sensor.

Structure (from GSS YAML):

Time Offset (uint16) – minutes since session start CGM Status (3 bytes, boolean[24]) – always 3 octets E2E-CRC (uint16, optional) – present if E2E-CRC Supported

The 24-bit status uses the same bit definitions as CGM Measurement’s Sensor Status Annunciation (Status + Cal/Temp + Warning).

References

Bluetooth SIG Continuous Glucose Monitoring Service org.bluetooth.characteristic.cgm_status (GSS YAML)

Classes

Name

Description

CGMStatusCharacteristic

CGM Status characteristic (0x2AA9).

CGMStatusData

Parsed data from CGM Status characteristic.

CGMStatusFlags

CGM Status flags (24-bit).

Module Contents

class src.bluetooth_sig.gatt.characteristics.cgm_status.CGMStatusCharacteristic(info: src.bluetooth_sig.types.CharacteristicInfo | None = None, validation: src.bluetooth_sig.gatt.characteristics.characteristic_meta.ValidationConfig | None = None)

Bases: src.bluetooth_sig.gatt.characteristics.base.BaseCharacteristic[CGMStatusData]

CGM Status characteristic (0x2AA9).

Reports current CGM sensor status with 24-bit status flags and optional E2E-CRC.

allow_variable_length: bool = True
expected_type
min_length: int = 5
class src.bluetooth_sig.gatt.characteristics.cgm_status.CGMStatusData

Bases: msgspec.Struct

Parsed data from CGM Status characteristic.

time_offset

Minutes since session start.

status

24-bit combined status flags.

e2e_crc

E2E-CRC value. None if absent.

e2e_crc: int | None = None
status: CGMStatusFlags
time_offset: int
class src.bluetooth_sig.gatt.characteristics.cgm_status.CGMStatusFlags

Bases: enum.IntFlag

CGM Status flags (24-bit).

Combined Status (bits 0-7), Cal/Temp (bits 8-15), and Warning (bits 16-23).

CALIBRATION_NOT_ALLOWED = 512
CALIBRATION_PENDING = 16384
CALIBRATION_REQUIRED = 2048
DEVICE_BATTERY_LOW = 2
DEVICE_SPECIFIC_ALERT = 16
GENERAL_DEVICE_FAULT = 32
RATE_OF_DECREASE_EXCEEDED = 1048576
RATE_OF_INCREASE_EXCEEDED = 2097152
RESULT_HIGHER_THAN_DEVICE_CAN_PROCESS = 8388608
RESULT_HIGHER_THAN_HYPER = 524288
RESULT_HIGHER_THAN_PATIENT_HIGH = 131072
RESULT_LOWER_THAN_DEVICE_CAN_PROCESS = 4194304
RESULT_LOWER_THAN_HYPO = 262144
RESULT_LOWER_THAN_PATIENT_LOW = 65536
SENSOR_MALFUNCTION = 8
SENSOR_TEMP_TOO_HIGH = 4096
SENSOR_TEMP_TOO_LOW = 8192
SENSOR_TYPE_INCORRECT = 4
SESSION_STOPPED = 1
TIME_SYNC_REQUIRED = 256