simulateValueUpdate

open override fun simulateValueUpdate(handle: Int, value: ByteArray)

Simulates a characteristic value update on the peripheral.

This will notify all connected clients that the value has changed.

A notification or indication carries at most ATT MTU - 3 bytes, so a longer value is truncated to that length, as a real peripheral would do. The MTU is the one of the connection when this method is called.

The handle number is returned when creating the characteristic using PeripheralSpec.Builder.connectable from ServiceScope.Characteristic.

Parameters

handle

The handle of the characteristic.

value

The new value of the characteristic.