src.bluetooth_sig.gatt.characteristics.digital¶
Digital characteristic (0x2A56).
Classes¶
Name | Description |
|---|---|
Digital characteristic (0x2A56). |
|
2-bit digital signal state enumeration (Automation IO Service v1.0). |
Module Contents¶
- class src.bluetooth_sig.gatt.characteristics.digital.DigitalCharacteristic¶
Bases:
src.bluetooth_sig.gatt.characteristics.base.BaseCharacteristic[tuple[DigitalSignalState,Ellipsis]]Digital characteristic (0x2A56).
org.bluetooth.characteristic.digital
Automation IO Service (AIOS) v1.0 §3.1: Array of n 2-bit digital signal values in little-endian bit order within packed octets.
- Format:
Length: ceil(n/4) octets, where n = number of digital signals
Each 2-bit field encodes one signal state (see DigitalSignalState enum)
Bit order within each octet: LSB first (little-endian) Byte bits [1:0] = Signal 0, bits [3:2] = Signal 1, bits [5:4] = Signal 2, bits [7:6] = Signal 3
- Specification:
Source: Bluetooth SIG Automation IO Service v1.0 (AIOS_v1.0)
Mandatory descriptor: Number of Digitals (0x2908) - specifies number of valid 2-bit fields
Optional descriptors: Value Trigger Setting, Time Trigger Setting
- allow_variable_length = True¶
- min_length = 0¶
- class src.bluetooth_sig.gatt.characteristics.digital.DigitalSignalState¶
Bases:
enum.IntEnum2-bit digital signal state enumeration (Automation IO Service v1.0).
- Per AIO spec §3.1, each digital signal is encoded as a 2-bit value:
0b00: Inactive state (logical low / contact open) 0b01: Active state (logical high / contact closed) 0b10: Tri-state (if supported; ignored on write) 0b11: Unknown (server cannot report; writes with this value are ignored by server)
- ACTIVE = 1¶
- INACTIVE = 0¶
- TRISTATE = 2¶
- UNKNOWN = 3¶