BleTimeoutException

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()
}
}

See also

Constructors

Link copied to clipboard
constructor(message: String, operation: String? = null, gattStatus: Int? = GATT_ERROR)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open val cause: Throwable?
Link copied to clipboard
open override val gattStatus: Int?

The GATT status code, defaults to 0x85 (133) for generic GATT error/timeout.

Link copied to clipboard
open val message: String?
Link copied to clipboard
val operation: String? = null

A description of the operation that timed out (e.g., "readCharacteristic", "connect").

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard