TABLE OF CONTENTS

 

[Modules] ISO14443-3

NAME

   SpringProx.API :: ISO 14443 Layer 3 (A and B)

DESCRIPTION

   Implementation of ISO/IEC 14443 layer 3

[Functions] SPROX_A_Exchange

NAME

   SPROX_A_Exchange

DESCRIPTION

   Low-level frame exchange with currently activated ISO 14443-A card.

WARNING

   Once card has entered T=CL mode, the high-level frame exchange must
   be performed through SPROX_Tcl_Exchange

INPUTS

   const BYTE send_data[]  : command (buffer PCD->PICC)
   WORD       send_bytelen : length of send_data
   BYTE       recv_data[]  : answer (buffer PICC->PCD)
   WORD      *recv_bytelen : IN  : size of recv_data (max length)
                             OUT : actual length of recv_data
   BOOL       calc_crc     : if TRUE, the last 2 bytes of send_data
                             will be replaced by a valid 14443 CRC_A
                             if FALSE, the CRC must have been computed
                             by caller
   WORD       timeout      : timeout of the exchange, in ETU
                             (at 106kbps, 1 ETU = 9,44µs)

RETURNS

   MI_OK              : success, card answer to be found in recv_data
   Other code if any error has occured. 

NOTES

   Remember that send_bytelen (and recv_bytelen) are the actual length
   of the frame, INCLUDING THE CRC (on the 2-last bytes).
   Even if calc_crc is TRUE, the caller must provide room in send_data[]
   (and in recv_data[]) to store the CRC.

[Functions] SPROX_A_Halt

NAME

   SPROX_A_Halt

DESCRIPTION

   Send the ISO 14443-A HALT command to the currently selected card.

WARNING

   If card is already in T=CL mode, you must DESELECT the card instead of
   HALTing it.

INPUTS

   none

RETURNS

   MI_OK              : success, card halted
   Other code if internal or communication error has occured. 

SEE ALSO

   SPROX_TclA_Deselect

[Functions] SPROX_A_SelectAgain

NAME

   SPROX_A_SelectAgain

DESCRIPTION

   Allow to re-select an ISO 14443-A card, provided its serial number (the card
   must be available in the RF field, either in the IDLE or HALTed state).

INPUTS

   const BYTE snr[10] : 4 to 10-byte Unique ID of the card to wake-up
   BYTE snrlen        : actual length of card's Unique ID

RETURNS

   MI_OK              : success, card selected
   MI_NOTAGERR        : the required card is not available in the RF field
   Other code if internal or communication error has occured. 

SEE ALSO

   SPROX_A_SelectAny
   SPROX_A_SelectIdle

[Functions] SPROX_A_SelectAny

NAME

   SPROX_A_SelectAny

DESCRIPTION

   Select "Any" ISO 14443-A card available in the RF field (i.e., the first card
   in the IDLE or HALTed state that passes the WUPA + SELA anticollision loop)

INPUTS

   BYTE atq[2]        : 2-byte buffer to receive card's Answer To Query
   BYTE snr[10]       : 4 to 10-byte buffer to receive card's Unique ID
   BYTE *snrlen       : on input, size of snr
                        on ouput, actual length of received Unique ID
   BYTE sak[1]        : 1-byte buffer to receive card's Select AcKnowledge

RETURNS

   MI_OK              : success, card selected
   MI_NOTAGERR        : no card available in the RF field
   Other code if internal or communication error has occured. 

NOTES

   Please refer to Philips "Mifare Type Identification Procedure" documentation
   for atq and sak explanation.

   The Unique ID size is to be found in atq[0] :
   (atq[0] & 0xC0 == 0x00) --> single size UID (snr is 4-byte long)
   (atq[0] & 0xC0 == 0x40) --> double size UID (snr is 7-byte long)
   (atq[0] & 0xC0 == 0x80) --> triple size UID (snr is 10-byte long) 

SEE ALSO

   SPROX_A_SelectIdle
   SPROX_A_Halt
   SPROX_MifStSelectAny
   SPROX_TclA_ActivateAny

[Functions] SPROX_A_SelectIdle

NAME

   SPROX_A_SelectIdle

DESCRIPTION

   Same as SPROX_A_SelectAny, but will return only a card that is in the IDLE
   state.
   This allow discovering all ISO 14443-A available in the RF field :
   - call SPROX_A_SelectIdle to discover the first card
   - halt this card calling SPROX_A_Halt
   - call SPROX_A_SelectIdle again to discover next card, and so on...

INPUTS

   BYTE atq[2]        : 2-byte buffer to receive card's Answer To Query
   BYTE snr[10]       : 10-byte buffer to receive card's Unique ID
   BYTE *snrlen       : on input, size of snr
                        on ouput, actual length of received Unique ID
   BYTE sak[1]        : 1-byte buffer to receive card's Select AcKnowledge

RETURNS

   MI_OK              : success, card selected
   MI_NOTAGERR        : no IDLE card available in the RF field
   Other code if internal or communication error has occured. 

NOTES

   Despite the name of the function, it doesn't check the returned card type
   (i.e., any ISO 14443-A card will be selected, not only Mifare tags).

SEE ALSO

   SPROX_A_SelectAny
   SPROX_A_Halt
   SPROX_MifStSelectIdle
   SPROX_TclA_ActivateIdle

[Functions] SPROX_B_AnticollAny

NAME

   SPROX_B_AnticollAny

DESCRIPTION

   Init the ISO 14443-B anticollision loop, looking for "any" card available.
   Subsequent slots must be addressed with SPROX_B_AnticollSlot

INPUTS

   BYTE slots         : Number of anticollision slots.
                        Must be set to 16.
   BYTE afi           : Application Family Identifier. Set to 0x00 for all
                        families and all sub-families.
   BYTE atq[11]       : 11-byte buffer to receive card's Answer To Query,
                        if a card is active in slot 0

RETURNS

   MI_OK              : success, card selected
   MI_NOTAGERR        : no card active in slot 0
   Other code if internal or communication error has occured. 

SEE ALSO

   SPROX_B_SelectAny
   SPROX_B_AnticollIdle

[Functions] SPROX_B_AnticollIdle

NAME

   SPROX_B_AnticollIdle

DESCRIPTION

   Init the ISO 14443-B anticollision loop, looking for idle cards only.
   Subsequent slots must be addressed with SPROX_B_AnticollSlot

INPUTS

   BYTE slots         : Number of anticollision slots.
                        Must be set to 16.
   BYTE afi           : Application Family Identifier. Set to 0x00 for all
                        families and all sub-families.
   BYTE atq[11]       : 11-byte buffer to receive card's Answer To Query,
                        if a card is active in slot 0

RETURNS

   MI_OK              : success, card selected
   MI_NOTAGERR        : no card active in slot 0
   Other code if internal or communication error has occured. 

SEE ALSO

   SPROX_B_SelectIdle
   SPROX_B_AnticollAny

[Functions] SPROX_B_AnticollSlot

NAME

   SPROX_B_AnticollSlot

DESCRIPTION

   Send the next 14443-B SLOT-MARKER to continue the anticollision loop

INPUTS

   BYTE slot          : Index of anticollision slot, 1 <= slot <= 15
   BYTE atq[11]       : 11-byte buffer to receive card's Answer To Query,
                        if a card is active in the selected slot

RETURNS

   MI_OK              : success, card selected
   MI_NOTAGERR        : no card active in selected slot
   Other code if internal or communication error has occured. 

SEE ALSO

   SPROX_B_AnticollAny
   SPROX_B_AnticollIdle

[Functions] SPROX_B_Exchange

NAME

   SPROX_B_Exchange

DESCRIPTION

   Low-level frame exchange with currently activated ISO 14443-B card.

WARNING

   Once card has entered T=CL mode, the high-level frame exchange must
   be performed through SPROX_Tcl_Exchange

INPUTS

   const BYTE send_data[]  : command (buffer PCD->PICC)
   WORD       send_bytelen : length of send_data
   BYTE       recv_data[]  : answer (buffer PICC->PCD)
   WORD      *recv_bytelen : IN  : size of recv_data (max length)
                             OUT : actual length of recv_data
   BOOL       calc_crc     : if TRUE, the last 2 bytes of send_data
                             will be replaced by a valid 14443 CRC_B
                             if FALSE, the CRC must have been computed
                             by caller
   WORD       timeout      : timeout of the exchange, in ETU
                             (at 106kbps, 1 ETU = 9,44µs)

RETURNS

   MI_OK              : success, card answer to be found in recv_data
   Other code if any error has occured. 

NOTES

   Remember that send_bytelen (and recv_bytelen) are the actual length
   of the frame, INCLUDING THE CRC (on the 2-last bytes).
   Even if calc_crc is TRUE, the caller must provide room in send_data[]
   (and in recv_data[]) to store the CRC.

[Functions] SPROX_B_Halt

NAME

   SPROX_B_Halt

DESCRIPTION

   Send the ISO 14443-B HALT command to a card.

WARNING

   If card is already in T=CL mode, you must DESELECT the card instead of
   HALTing it.

INPUTS

   const BYTE pupi[4] : 4-byte buffer of card's PUPI
                        (= 4 first bytes of card's ATQ)

RETURNS

   MI_OK              : success, card halted
   Other code if internal or communication error has occured. 

SEE ALSO

   SPROX_TclB_Deselect

[Functions] SPROX_B_SelectAny

NAME

   SPROX_B_SelectAny

DESCRIPTION

   Select "Any" ISO 14443-B card available in the RF field (i.e., the first
   card in the IDLE or HALTed state that answers the REQB command).
   There is no anticollision.

INPUTS

   BYTE afi           : Application Family Identifier. Set to 0x00 for all
                        families and all sub-families.
   BYTE atq[11]       : 11-byte buffer to receive card's Answer To Query

RETURNS

   MI_OK              : success, card selected
   MI_NOTAGERR        : no card available in the RF field
   Other code if internal or communication error has occured. 

NOTES

   The 4 first bytes of the ATQ are card's Pseudo-Unique Identifier (PUPI) .
   You can use the atq buffer directly as paramater for SPROX_TclB_Attrib or 
   SPROX_B_Halt

SEE ALSO

   SPROX_B_SelectIdle
   SPROX_B_Halt 
   SPROX_TclB_ActivateAny

[Functions] SPROX_B_SelectIdle

NAME

   SPROX_B_SelectIdle

DESCRIPTION

   Same as SPROX_TclB_ActivateAny, but will return only a card that is in the
   IDLE state (sends REQB instead of WUPB).
   There is no anticollision.

INPUTS

   BYTE afi           : Application Family Identifier. Set to 0x00 for all
                        families and all sub-families.
   BYTE atq[11]       : 11-byte buffer to receive card's Answer To Query

RETURNS

   MI_OK              : success, tag selected
   MI_NOTAGERR        : no tag available in the RF field
   Other code if internal or communication error has occured. 

NOTES

   The 4 first bytes of the ATQ are card's Pseudo-Unique Identifier (PUPI) .
   You can use the atq buffer directly as paramater for SPROX_TclB_Attrib or 
   SPROX_B_Halt

SEE ALSO

   SPROX_B_SelectAny
   SPROX_B_Halt 
   SPROX_TclB_ActivateIdle

Generated from sprox_14443-3.c on Mon Aug 18 16:38:16 2014