BleConnection
Encapsulates a BLE connection to a BleDevice.
Inheritors
Properties
Link copied to clipboard
abstract val connectionState: ERROR CLASS: Symbol not found for SharedFlow<org/meshtastic/core/ble/BleConnectionState>
A flow of BleConnectionState changes.
Link copied to clipboard
abstract val deviceFlow: ERROR CLASS: Symbol not found for SharedFlow<org/meshtastic/core/ble/BleDevice?>
A flow of the current device.
Functions
Link copied to clipboard
abstract suspend fun connectAndAwait(device: BleDevice, timeoutMs: Long, onRegister: suspend () -> Unit = {}): BleConnectionState
Connects to the given BleDevice and waits for a terminal state.
Link copied to clipboard
Disconnects from the current device.
Link copied to clipboard
Returns the maximum write value length for the given write type.
Link copied to clipboard
abstract suspend fun <T> profile(serviceUuid: ERROR CLASS: Symbol not found for Uuid, timeout: ERROR CLASS: Symbol not found for Duration = 30.seconds, setup: suspend ERROR CLASS: Symbol not found for CoroutineScope.(BleService) -> T): T
Executes a block within a discovered profile.