l2cap
fun l2cap(peripheral: Peripheral, channel: L2capChannel, commandTimeout: Duration = 10.seconds): DfuTransport
Create an L2CAP-based DFU transport for high-throughput firmware transfer.
Commands are still sent via GATT; data goes over the L2CAP channel.
Parameters
peripheral
a connected peripheral with the DFU service discovered
channel
an open L2CAP CoC channel for data transfer
commandTimeout
how long to wait for command responses
Throws
if DFU characteristics are missing