splitWrite

@RequiresPermission(value = "android.permission.BLUETOOTH_CONNECT")
suspend fun splitWrite(value: DataByteArray, writeType: BleWriteType = BleWriteType.DEFAULT)

Writes bytes to a characteristic and waits for a request to finish. If value is bigger than MTU then it splits the value and send it in consecutive messages.

Parameters

value

Bytes to write.

writeType

Write type method.

Throws

on GATT communication failure.

when property defined by writeType is missing.

when a BLE device is disconnected.