read

@RequiresPermission(value = "android.permission.BLUETOOTH_CONNECT")
suspend fun read(): DataByteArray

Reads value from a characteristic and suspends for the result.

Return

Read value.

Throws

when BleGattProperty.PROPERTY_READ not found on a characteristic.

on GATT communication failure.

when a BLE device is disconnected.