uicc.hci.services.readermode
Interface ReaderMessage

All Superinterfaces:
HCIMessage

public interface ReaderMessage
extends HCIMessage

The ReaderMessage offers specialized methods for generating Contactless Reader commands or events.


Field Summary
static byte MULTIPLE_TARGET_STATUS
          when there are several targets in the field irrespective of the RF technology
static byte PARAM_ID_TYPE_A_READER_APPLICATION_DATA
          The historical bytes as defined in ISO/IEC 14443-3 for type A
static byte PARAM_ID_TYPE_A_READER_ATQA
          Pre-formatted ATQA as defined in ISO/IEC 14443-3 for type A (see TS 102 622 for coding of the value)
static byte PARAM_ID_TYPE_A_READER_DATARATE_MAX
          Maximum data rate supported
static byte PARAM_ID_TYPE_A_READER_FWI
          SFGT Frame waiting time and start-up frame guard time as defined in ISO/IEC 14443-4 for type A
static byte PARAM_ID_TYPE_A_READER_SAK
          Pre-formatted SAK as defined in ISO/IEC 14443-3 for type A
static byte PARAM_ID_TYPE_A_READER_UID
          UID as defined in ISO/IEC 14443-3 for type A
static byte PARAM_ID_TYPE_B_READER_AFI
          Application family identifier as defined in ISO/IEC 14443-3 for type B used by the reader to poll the target
static byte PARAM_ID_TYPE_B_READER_APPLICATION_DATA
          Application data as defined in ISO/IEC 14443-3 for ATQB
static byte PARAM_ID_TYPE_B_READER_HIGHER_LAYER_DATA
          Higher layer data as defined in ISO/IEC 14443-3 for ATTRIB command
static byte PARAM_ID_TYPE_B_READER_HIGHER_LAYER_RESPONSE
          Higher layer response as defined in ISO/IEC 14443-3 for answer to ATTRIB command
static byte PARAM_ID_TYPE_B_READER_PUPI
          PUPI as defined in ISO/IEC 14443-3 for type B
static byte RESP_ANY_E_TIMEOUT
          An Applet level time-out occurred.
static byte RESP_WR_RF_ERROR
          The target has returned an RF error.
static byte SINGLE_TARGET_STATUS
          when there is a single target in the reader field and the activation of the target is completed
 
Fields inherited from interface uicc.hci.framework.HCIMessage
RESP_ANY_E_CMD_NOT_SUPPORTED, RESP_ANY_E_INHIBITED, RESP_ANY_E_NOK, RESP_ANY_E_NOT_CONNECTED, RESP_ANY_E_REG_ACCESS_DENIED, RESP_ANY_E_REG_PAR_UNKNOWN, RESP_ANY_OK, TYPE_COMMAND, TYPE_EVENT, TYPE_RESPONSE
 
Method Summary
 void prepareAndSendGetParameterCommand(byte paramid)
          This non-blocking method builds the HCI command ANY_GET_PARAMETER for the indicated information and sends it to the Contactless Reader Gate of the CLF.
 void prepareAndSendWriteXchgDataCommand(byte timeout, byte[] data, short offset, short len)
          This non-blocking method builds the HCI command WR_XCHG_DATA with the data passed in the parameter data and sends it to the Contactless Reader Gate of the CLF.
 void restartReaderModeProcedure()
          This method sends first the HCI event EVT_END_OPERATION and then the HCI event EVT_READER_REQUESTED.
 
Methods inherited from interface uicc.hci.framework.HCIMessage
getInstruction, getReceiveBuffer, getReceiveLength, getReceiveOffset, getType, isComplete, isHeading
 

Field Detail

RESP_ANY_E_TIMEOUT

static final byte RESP_ANY_E_TIMEOUT
An Applet level time-out occurred.

See Also:
Constant Field Values

RESP_WR_RF_ERROR

static final byte RESP_WR_RF_ERROR
The target has returned an RF error.

See Also:
Constant Field Values

SINGLE_TARGET_STATUS

static final byte SINGLE_TARGET_STATUS
when there is a single target in the reader field and the activation of the target is completed

See Also:
Constant Field Values

MULTIPLE_TARGET_STATUS

static final byte MULTIPLE_TARGET_STATUS
when there are several targets in the field irrespective of the RF technology

See Also:
Constant Field Values

PARAM_ID_TYPE_A_READER_UID

static final byte PARAM_ID_TYPE_A_READER_UID
UID as defined in ISO/IEC 14443-3 for type A

See Also:
Constant Field Values

PARAM_ID_TYPE_A_READER_ATQA

static final byte PARAM_ID_TYPE_A_READER_ATQA
Pre-formatted ATQA as defined in ISO/IEC 14443-3 for type A (see TS 102 622 for coding of the value)

See Also:
Constant Field Values

PARAM_ID_TYPE_A_READER_APPLICATION_DATA

static final byte PARAM_ID_TYPE_A_READER_APPLICATION_DATA
The historical bytes as defined in ISO/IEC 14443-3 for type A

See Also:
Constant Field Values

PARAM_ID_TYPE_A_READER_SAK

static final byte PARAM_ID_TYPE_A_READER_SAK
Pre-formatted SAK as defined in ISO/IEC 14443-3 for type A

See Also:
Constant Field Values

PARAM_ID_TYPE_A_READER_FWI

static final byte PARAM_ID_TYPE_A_READER_FWI
SFGT Frame waiting time and start-up frame guard time as defined in ISO/IEC 14443-4 for type A

See Also:
Constant Field Values

PARAM_ID_TYPE_A_READER_DATARATE_MAX

static final byte PARAM_ID_TYPE_A_READER_DATARATE_MAX
Maximum data rate supported

See Also:
Constant Field Values

PARAM_ID_TYPE_B_READER_PUPI

static final byte PARAM_ID_TYPE_B_READER_PUPI
PUPI as defined in ISO/IEC 14443-3 for type B

See Also:
Constant Field Values

PARAM_ID_TYPE_B_READER_APPLICATION_DATA

static final byte PARAM_ID_TYPE_B_READER_APPLICATION_DATA
Application data as defined in ISO/IEC 14443-3 for ATQB

See Also:
Constant Field Values

PARAM_ID_TYPE_B_READER_AFI

static final byte PARAM_ID_TYPE_B_READER_AFI
Application family identifier as defined in ISO/IEC 14443-3 for type B used by the reader to poll the target

See Also:
Constant Field Values

PARAM_ID_TYPE_B_READER_HIGHER_LAYER_RESPONSE

static final byte PARAM_ID_TYPE_B_READER_HIGHER_LAYER_RESPONSE
Higher layer response as defined in ISO/IEC 14443-3 for answer to ATTRIB command

See Also:
Constant Field Values

PARAM_ID_TYPE_B_READER_HIGHER_LAYER_DATA

static final byte PARAM_ID_TYPE_B_READER_HIGHER_LAYER_DATA
Higher layer data as defined in ISO/IEC 14443-3 for ATTRIB command

See Also:
Constant Field Values
Method Detail

prepareAndSendGetParameterCommand

void prepareAndSendGetParameterCommand(byte paramid)
                                       throws HCIException,
                                              javacard.framework.SystemException
This non-blocking method builds the HCI command ANY_GET_PARAMETER for the indicated information and sends it to the Contactless Reader Gate of the CLF. The prepareAndSendGetParameterCommand method should only be called when the CLF has successfully discovered a card in the field, i.e. after reception of the HCI event EVT_TARGET_DISCOVERED, otherwise the received data will be meaningless.

Parameters:
paramid - shall be one of the PARAM_* values defined in this interface
Throws:
HCIException - with the following reason code:
  • HCI_CURRENTLY_DISABLED if the HCI interface was disabled
  • HCI_FRAGMENTED_MESSAGE_ONGOING if the Contactless Framework is still receiving a fragmented HCI Message
  • HCI_RESOURCES_NOT_AVAILABLE if the contactless framework does not have enough resources to process the command
javacard.framework.SystemException - with the following reason code:
  • ILLEGAL_VALUE
    • if the paramID does not match with the predefined values

prepareAndSendWriteXchgDataCommand

void prepareAndSendWriteXchgDataCommand(byte timeout,
                                        byte[] data,
                                        short offset,
                                        short len)
                                        throws HCIException,
                                               java.lang.NullPointerException,
                                               java.lang.ArrayIndexOutOfBoundsException,
                                               javacard.framework.SystemException
This non-blocking method builds the HCI command WR_XCHG_DATA with the data passed in the parameter data and sends it to the Contactless Reader Gate of the CLF. The response data from the CLF will be transferred to the UICC with the event ReaderListener.EVENT_WRITE_EXCHANGE_DATA_RESPONSE.

Parameters:
timeout - value according to TS 102 622, or -1 if no timeout value is given
data - byte array holding the data to send to the CLF
offset - into the byte array indicating the start of the data to send to the CLF
len - overall length of data that will be send to the CLF
Throws:
HCIException - with the following reason code:
  • HCI_CURRENTLY_DISABLED if the HCI interface was disabled
  • HCI_FRAGMENTED_MESSAGE_ONGOING if the Contactless Framework is still receiving a fragmented HCI Message
  • HCI_RESOURCES_NOT_AVAILABLE if the contactless framework does not have enough resources to process the command
java.lang.NullPointerException - if data is null
java.lang.ArrayIndexOutOfBoundsException - if operation would cause access of data outside array bounds.
javacard.framework.SystemException - with the following reason code:
  • ILLEGAL_VALUE if the timeout value does not match with the predefined values

restartReaderModeProcedure

void restartReaderModeProcedure()
                                throws HCIException
This method sends first the HCI event EVT_END_OPERATION and then the HCI event EVT_READER_REQUESTED. This method is intended to recover from the following error states:
  • reception of RESP_ANY_E_TIMEOUT
  • reception of RESP_WR_RF_ERROR
  • reception of EVT_TARGET_DISCOVERED with a MULTIPLE_TARGET_STATUS

    Throws:
    HCIException - with the following reason code:
    • HCI_CURRENTLY_DISABLED if the HCI interface was disable