nfc_se_session_open_basic_channel()

Retrieve an access to the basic channel.

Synopsis:

#include <nfc/nfc_se_access.h>
 
NFC_API nfc_result_t nfc_se_session_open_basic_channel(uint32_t hSESession, fcp_type_t fcpResponseType, uint32_t *phSEChannel, int32_t *pnLengthOfResponseInBytes)

Since:

BlackBerry 10.0.0

Arguments:

hSESession

The handle to the session.

fcpResponseType

The format of the File Control Parameter(FCP) information requested from the secure element. The value of this argument must be one of the constants defined by fcp_type_t. Use OPEN_NO_FCP_INFO if you are not interested in the results.

phSEChannel

The channel created to the secure element.

pnLengthOfResponseInBytes

The length of the response data returned as a result of the open call. This argument is set to 0 if there is no data, -1 if the fctResponseType argument is unsupported by the reader on which the session has been opened, and NULL if OPEN_NO_FCP_INFO is provided to the fcpResponseType argument. Use the nfc_se_channel_get_transmit_data() function to read the data received prior to any APDU exchanges.

Library:

libnfc (For the qcc command, use the -l nfc option to link against this library)

Description:

Basic channels are defined in the ISO 7816-4 specification (the one that has number 0). Access to the basic channel is only available for certain secure elements.

Returns:

NFC_RESULT_SUCCESS if the session is retrieved successfully; or one of the following: