73S12xxF Software User Guide
UG_12xxF_016
78
Rev. 1.50
AR_ICC_ERR_WRONG_LEN
Either the command case (T=0) is not correctly formatted, or the buffer size
specified is too small; especially in a Case 2 where the card sometimes responds
with a 61xx with xx > specified buffer size.
AR_ICC_ERR_CARD_COMM_PB
Too many errors occurred, so the interface has been closed.
AR_ICC_ERR_CARD_COMM_PB
There is a communication error between the reader and smart card such as a
parity error, a bad response block from the card, a bad EDC, a transmission error
or a bad procedure byte.
ICC_Send_Ext()
Purpose
Transmit a data command to the Smart Card interface and wait for the answer. This
API is very similar to the
ICC_Send() API except it requires a MaxBuffSize. The
application is responsible for the Smart Card command format analysis to compute
the correct command case (1, 2 Short and Extended, 3 Short and Extended or 4
Short and Extended). Calling
ICC_Send_Ext() with a MaxBuffSize of 260 bytes (255
data bytes + 5 header bytes) is equivalent to calling ICC_Send. The ISO 7816-4
standard specifies that setting the first byte (of 3 bytes; or the 5
th byte of the
command header bytes) of the data length field equal to 0x00 indicates the extended
cases; whereas JICSAP (version 1.1) specifies the value of this byte to be 0xFF.
This API is written to accept the ISO format so any command with the fifth byte of the
command header having a value of 0x00 will be treated as an extended case.
Synopsis
AR_ICC_RC ICC_Send_Ext (
IN enum ICC_ID eIccId,
IN unsigned int unIccCommandLength,
IN unsigned char *pucIccCommand,
IN unsigned int MaxBuffSize,
OUT unsigned int *punIccResponseLength,
OUT unsigned char *pucIccResponse,
OUT unsigned char *pucSW1,
OUT unsigned char *pucSW2,
OUT BOOLEAN *pbStatusJustAfterHeader );
Parameters
eIccId: Input parameter
Specifies which Smart Card interface is to be activated. Possible values are:
ICC_1ST 0, (Internal)
ICC_2ND 1, (External)
…
ICC_9TH 8 (External)
unIccCommandLength: Input parameter
Specifies the number of bytes of data pointed to by puclccCommand.
pucIccCommand: Input parameter
Specifies the command to be transmitted to the Smart Card interface.
MaxBuffSize: Input parameter
Specifies the maximum buffer size the reader should reserve to hold the data bytes
sent from the card.
punIccResponseLength: Output parameter
Specifies the number of bytes of response data pointed to by puclccResponse. (This
length value does not include the status bytes SW1/SW2)
pucIccResponse: Output parameter
Contains the response of the Smart Card (SW1/SW2 not included).
pucSW1: Output parameter
Contains the received SW1value.