transceive

abstract suspend fun transceive(command: ByteArray): ByteArray

Sends one command APDU and returns the chip's whole answer, status word included.

The answer is returned as received, never changed. A transport that cannot reach the chip throws ApduTransportException with the NfcError that says why; it never returns an empty array instead.

Return

The response APDU: the response data followed by the two status-word bytes.

Parameters

command

The command APDU, at most maxCommandLength bytes.

Throws

when the connection to the chip fails.