readPacket

abstract suspend fun readPacket(): ByteArray?

Reads the next H4-framed HCI packet from the controller, or returns null if closed.

Throws

IOException

if reading from the underlying HCI transport fails.

CancellationException

if the coroutine is cancelled.