GattDfuTransport

class GattDfuTransport(peripheral: Peripheral, commandTimeout: Duration) : DfuTransport

Constructors

Link copied to clipboard
constructor(peripheral: Peripheral, commandTimeout: Duration)

Properties

Link copied to clipboard
open override val mtu: Int

Maximum payload size per write, in bytes.

Link copied to clipboard
open override val notifications: Flow<ByteArray>

Incoming notifications from the DFU Control Point characteristic.

Functions

Link copied to clipboard
open override fun close()

Release transport resources synchronously.

Link copied to clipboard
open suspend override fun sendCommand(data: ByteArray): ByteArray

Write a command to the DFU Control Point and wait for the response notification.

Link copied to clipboard

Send a command where the device is expected to disconnect or reboot before responding (e.g. reset commands).

Link copied to clipboard
open suspend override fun sendData(data: ByteArray)

Write firmware data to the peripheral.