maximumWriteValueLength

open override fun maximumWriteValueLength(type: WriteType): Int

The maximum amount of data, in bytes, you can send to a characteristic in a single write operation.

Maximum size for WriteType.WITH_RESPONSE type is 512 bytes or to ATT MTU - 5 bytes when writing reliably (see usingReliableWrite). For WriteType.WITHOUT_RESPONSE it is equal to ATT MTU - 3 bytes.

Higher values of ATT MTU for WriteType.WITHOUT_RESPONSE can be requested using requestHighestValueLength.

Throws

If the device is not connected.