NAME
SpringProxAPI :: Access to smartcard readers
DESCRIPTION
Access to SmartCard slot for CSB-5 and related products Those functions work only on readers featuring a GemPlus GemCore smartcard reader
NOTES
Most parameters of the SPROX_Card_xxx functions are directly sent to reader's internal GemCore chipset. Please refer to GemPlus GemCore documentation for details regarding those functions.
NAME
SPROX_Card_Exchange
DESCRIPTION
Perform a T=0 or T=1 exchange according to ISO 7816-3
INPUTS
BYTE slot : smarcard slot number const BYTE send_buffer[] : buffer to sens to the card WORD send_len : length of send_buffer BYTE recv_buffer[] : buffer for card's answer WORD *recv_len : input : size of recv_buffer output : actual length of reply
RETURNS
MI_OK : success GemCore specific code if an error has occured ; please refer to relevant GemPlus documentation.
NOTES
This functions accepts only short APDUs (Lc <= 256, Le <= 254) No interpretation of the SW is performed. In particular, a 61xx status word is returned to the caller "as it".
SEE ALSO
SPROX_Card_Status SPROX_Card_PowerUp
NAME
SPROX_Card_GetConfig
DESCRIPTION
Retrieves the operating mode of a smartcard slot
INPUTS
BYTE slot : smartcard slot number BYTE *mode : - will be 0x45 if EMV mode is selected - will be 0x47 if generic ISO mode is selected BYTE *type : - will be 0x02 if T=0 or T=1 smartcard type is selected (see relevant GemPlus documentation for other options)
RETURNS
MI_OK : success GemCore specific code if an error has occured ; please refer to relevant GemPlus documentation.
SEE ALSO
SPROX_Card_Status SPROX_Card_SetConfig
NAME
SPROX_Card_GetFirmware
DESCRIPTION
Retrieve the SpringProx' internal GemCore version info
INPUTS
TCHAR firmware[] : buffer to receive the firmware info WORD len : character-size of the buffer
RETURNS
MI_OK : success GemCore specific code if an error has occured ; please refer to relevant GemPlus documentation.
NAME
SPROX_Card_PowerDown
DESCRIPTION
Power down a smarcard
INPUTS
BYTE slot : smartcard slot number
RETURNS
MI_OK : success GemCore specific code if an error has occured ; please refer to relevant GemPlus documentation.
SEE ALSO
SPROX_Card_Status SPROX_Card_PowerUp
NAME
SPROX_Card_PowerUp
DESCRIPTION
Power up a T=0 or T=1 smartcard with user-supplied options
INPUTS
BYTE slot : smartcard slot number BYTE config : power-up options (in EMV mode this byte MUST be 0x00, in ISO mode set to 0x00 for default options) x0xxx001 : power up at 5V (class A) x0xxx010 : power up at 3V (class B) x0xxx011 : power up at 3V or 5V (class AB) 0010xxxx : automatic PPS management ; the reader uses the highest speed proposed by the cards and changes to T=1 protocol if possible 0001xxxx : no PPS management : the reader stays at 9600bps and the card remains in negotiable mode (see relevant GemPlus documentation for other options) BYTE *atr : buffer to retrieve card's ATR WORD *atr_len : input : size of atr output : actual length of atr
RETURNS
MI_OK : success GemCore specific code if an error has occured ; please refer to relevant GemPlus documentation.
SEE ALSO
SPROX_Card_Status SPROX_Card_SetConfig SPROX_Card_PowerDown
NAME
SPROX_Card_PowerUp
DESCRIPTION
Power up a T=0 or T=1 smartcard with automatic adjustment of the parameters :
INPUTS
BYTE slot : smartcard slot number BYTE *atr : buffer to retrieve card's ATR WORD *atr_len : input : size of atr output : actual length of atr
RETURNS
MI_OK : success GemCore specific code if an error has occured ; please refer to relevant GemPlus documentation.
NOTES
The smartcard detection algorithm is as follow : - Power down the card (if needed) - Set slot to EMV mode - EMV power-up (with EMV PTS and so on...) - OK --> done - KO - Set slot to ISO mode - ISO power-up a double speed with auto-PTS - OK --> done - KO - ISO power-up at single speed with auto-PTS - OK --> done - KO --> - ISO power-up at single speed without PTS
SEE ALSO
SPROX_Card_PowerUp SPROX_Card_PowerDown
NAME
SPROX_Card_SetConfig
DESCRIPTION
Set the operating mode of a smartcard slot
INPUTS
BYTE slot : smartcard slot number BYTE mode : - set to 0x45 for EMV compliant operation (default) - set to 0x47 for generic ISO mode BYTE type : - set to 0x02 for T=0 or T=1 smartcards (see relevant GemPlus documentation for other options)
RETURNS
MI_OK : success GemCore specific code if an error has occured ; please refer to relevant GemPlus documentation.
SEE ALSO
SPROX_Card_Status SPROX_Card_GetConfig SPROX_Card_PowerUp
NAME
SPROX_Card_Status
DESCRIPTION
Retrieve status of a smartcard reader slot, or of the smartcard itself
INPUTS
BYTE slot : smarcard slot number BYTE *stat : on correct execution, this byte provides the status of the slot : xxxxx0xx : card not inserted xxxxx1xx : card inserted but not powered (note : this bit is always set on SIM/SAM slots - do not trust it !) xxxxx110 : card inserted and powered (5V) xxxxx111 : card inserted and powered (3V) xxxx011x : T=0 protocol xxxx111x : T=1 protocol BYTE *type : on correct execution, this byte provides the activated card type (see SPROX_Card_SetConfig) BYTE config[4] : on correct execution, this buffer provides card's communication parameters : - for a T=0 card config[0] : TA1 (FI & DI) config[1] : TC1 (EGT) config[2] : WI config[3] : 0x00 - for a T=1 card config[0] : TA1 (FI & DI) config[1] : TC1 (EGT) config[2] : IFSC config[3] : TB3 (BWI & CWI)
RETURNS
MI_OK : success -214 : smartcard slot is not wired -216 : smartcard slot does not exists GemCore specific code if an error has occured ; please refer to relevant GemPlus documentation.
SEE ALSO
SPROX_Card_SetConfig SPROX_Card_GetConfig