Ble Timeout Exception
class BleTimeoutException(message: String, val operation: String? = null, val gattStatus: Int? = GATT_ERROR) : BleException
Exception thrown when a BLE operation times out.
BLE operations can time out for various reasons, including:
Device moved out of range during operation
Device became unresponsive
Radio interference
Device processing taking too long
GATT Timeout Status
The default gattStatus for timeout exceptions is 0x85 (133), which is the standard GATT_ERROR code often used to indicate timeout conditions.
Usage Example
when (error) {
is BleTimeoutException -> {
Log.w("BLE", "Operation '${error.operation}' timed out")
// Implement retry logic
retryWithBackoff()
}
}Content copied to clipboard