KableBleConnection
BleConnection implementation using Kable for cross-platform BLE communication.
Manages peripheral lifecycle, connection state tracking, and GATT service profile access.
Connection attempts follow Kable's recommended pattern from the SensorTag sample: try a direct connect first, then fall back to autoConnect = true on failure. Only two attempts are made per connect call — the caller (BleRadioTransport) owns the macro-level retry/backoff loop.
Properties
A flow of BleConnectionState changes. StateFlow semantics ensure the latest state is always observable and distinct-equals deduplication avoids spurious re-emissions.
A flow of the current device. StateFlow semantics: replays the latest value to new collectors and conflates rapid updates.
Functions
Disconnects from the current device.
Returns the maximum write value length for the given write type, or null if unknown.
Asks the platform to switch to a high-throughput / low-latency BLE connection priority for the duration of the connection. Used by latency-sensitive flows like firmware updates. Returns true if the request was issued. Default implementation returns false for platforms that don't support it.