Transmit an Application Data Unit (APDU) command (as per ISO 7816-4) to the secure element.
NFC_API nfc_result_t nfc_se_channel_transmit_apdu(uint32_t hSEChannel, const uint8_t *pSendAPDUBuffer, size_t nLengthOfSendAPDUBufferInBytes, size_t *pnLengthOfResponseInBytes)
The handle to the channel the APDU should be transmitted over.
The APDU to send.
The length of the pSendAPDUBuffer.
The length of any response received from the command sent in. Data is retrieved using the nfc_se_channel_get_transmit_data() function.
The response length is returned. In order to retrieve the data the nfc_se_channel_get_transmit_data() function must be called. If a subsequent call on the same channel is made before a call to the nfc_se_channel_get_transmit_data() function, then the data of the original exchange is lost.
NFC_RESULT_SUCCESS if the the APDU is transmitted successfully, or one of the following:
- NFC_RESULT_SERVICE_CONNECTION_ERROR: An attempt to connect to the NFC system has failed.
- NFC_RESULT_INVALID_PARAMETER: A parameter is invalid.
- NFC_RESULT_SE_INVALID_HANDLE: The hSEchannel is invalid.
- NFC_RESULT_SE_INVALID_APDU: The APDU provided is malformed or invalid.
- NFC_RESULT_SE_REQUEST_REJECTED: The request is rejected by the Access Control files (ACF) or some other security mechanism.