Page 3
READER_SWITCH_RF_ON_OFF ..................31 Appendix A ..........................31 Status Words Table ........................ 31 Appendix B ..........................32 Samples of SCR331-DI contact-less communications............32 7.1.1 Simple APDU........................32 Appendix C..........................33 Sample Code for using Escape messages through Escape IOCTL ........33 IND.SCR331-DI.MANUAL.VER.1.8...
This document contains information that allows a developer of host software to integrate an interface to contact-less cards in SCR331-DI dual interface smart card reader. This document describes the interfaces that will be provided by our SCR331-DI devices to support contact and contact-less operation. This contains details on what kind of APDUs for contact-less memory cards and T=CL type of cards is provided, their details and how applications can build a set of APDUs corresponding to contact-less cards.
PC/SC 1.0 compliant drivers – including the contact-less interface Type A – CL , Type B – CL , Mifare, Memory card support T=1 simulation for contactless USB CCID like Host interface handled by SCM vendor drivers USB2.0 compliant full speed device High bus-powered through USB SCM Vendor drivers for all WINTEL platforms ( except WINNT4.0)
CONTACT card in the CONTACT slot. The LED behavior for both the firmware configurations is given below. For details about the two different driver architectures (single/dual) please see chapter 4.2. SCR331-DI Firmware Ver 6.18; Driver Ver 4.30.00.01; PCB Rev 1.4 SCR331-DI DUAL SLOT FIRMWARE LED STATUS LED States...
SCR331-DI Product Technical Manual SCR331-DI SINGLE SLOT FIRMWARE LED STATUS LED States LED1 (GREEN) LED2 (RED) Just after plug-in (with drivers already installed) Just after DFU operation Suspend / standby Reader powered, Contact card IN, 500ms ON but not powered (98/ME - issue...
SCR331-DI Product Technical Manual 3.3 Software Specifics 3.3.1 Operating systems Generic device firmware Vendor drivers for WIN98SE, WINME , WIN2000, WINXP, Windows Server 2003, Win CE 3.3.2 ICC parameters Some important smart card parameters, supported smart card types, maximum operable smart card frequencies, operating voltages etc., are detailed in the tables below.
SCR331-DI Product Technical Manual 3.3.3 PICC parameters Some important PICC parameters, supported contact-less card types, maximum operable PICC frequencies, operating voltages etc., are detailed in the tables below. ICC Parameters Value/Description Type A memory card PICC Supported (Through SCM Specific APDUs)
OFF during CONTACT card presence, the real Dual slot feature is lost. 4.3 Utilities 4.3.1 Installation SCM provides Install Shield Installer for Windows to install the product. The SCM drivers as well as the utilities can be installed with the help of this installer. 4.3.2 DFU Utility DFU utilities/drivers for dynamic Device Firmware Upgrade (DFU) are shipped with the device for USB interface.
SCR331-DI Product Technical Manual 4.4 USB Interface The SCR331DI USB Smart Card Reader implements a transport protocol that is compliant with Universal Serial Bus Device Class Specification for USB Chip/Smart Card Interface Devices Revision 1.00. The following sections of this document describe about the features that are implemented/ NOT implemented vis-à-vis the CCID specification.
SCR331-DI Product Technical Manual 4.4.4 CCID Error Codes Extensive error codes are reported on many conditions during all CCID responses. Most of the error messages are reported by the CCID appropriately. Some of the main error codes are: HW_ERROR XFR_PARITY_ERROR...
SCR331-DI Product Technical Manual 4.4.6 Note on Automatic PPS implementation The CCID host driver shall use the PC_to_RDR_SetParamters message to set the F and D values. This is described in the CCID specification requirements, Sec4.1.7. For contactless part by default the reader switches to the maximum speed indicated by the card parameters.
SCR331-DI Product Technical Manual 4.5.3 TYPE A T=CL - ATR The ATR obtained from the card, which contains PUPI length of serial numbers, and some additional card parameters like SAK byte, type of card (T=CL supported or not) etc are sent as historic bytes of a T = 1 protocol based simulated ATR.
PICC transmission part is simulated as PCSC 1.0 based T=1 protocol. All PCSC host APDU are transferred in to the SCR331-DI firmware as CCID messages. As far as the SCR331-DI firmware is concerned, it should accept only CCID messages for both ICC and PICC implementation. So the application provides does not bother about the implementation of Host applications.
SCR331-DI Product Technical Manual 4.5.7 Detailed description of the APDU set 4.5.7.1 Memory card APDU Set 4.5.7.1.1 ISO7816_READ_BINARY Description This APDU reads block, which is specified as a P1 parameter. This APDU reads block size based on Type A memory card types like Mifare 1K and 4K cards block size are 0x10 bytes and Mifare Ultra light card size is 0x04 bytes.
Page 20
SCR331-DI Product Technical Manual 4.5.7.1.2 ISO7816_WRITE_BINARY Description This APDU writes data pattern in to corresponding block number which is specified as a P1 parameter in APDU command set. Based on Memory card size, P3 bytes are varied. If Memory card is Mifare 1K/4K type, then P3 length is 0x10 bytes otherwise P3 length is 0x04.
Page 21
SCR331-DI Product Technical Manual 4.5.7.1.3 ISO7816_VERIFY Description This APDU is an authentication command for Mifare 1K and 4K cards. All Mifare cards except Mifare Ultra light support 3-Pass Authentication. Authentication for Mifare cards need 48 bit Mifare card Key. This 6 byte key value is needed for 3-Pass authentication. This command writes Authentication key in to Mifare EEPROM and check and enable 3-Pass authentication every time during transaction.
Page 22
SCR331-DI Product Technical Manual 4.5.7.1.4 ISO7816_USER_CMD Description This APDU helps user to give any raw data to PICC. Type B Memory card and Specific command set for both Type A and Type B cards (not as per ISO14443 standard) will use this APDU. The original PICC command starts in Data field of APDU.
Page 23
SCR331-DI Product Technical Manual 4.5.7.1.5 ISO7816_VALUE_BLOCK Description This APDU is used for e-purse applications. This command notifies card to increment or decrement value in particular block. Usually Mifare 1K/4K cards have two types of blocks called Data and Value blocks. Initially all blocks are data block. If user wants to change one Data block to Value block, he needs to write specific Value block format to that block.
SCR331-DI Product Technical Manual 4.5.7.2 T=CL card APDU Set 4.5.7.2.1 T=CL command Description This APDU is directly transferred to PICC, since T=CL protocol command is similar to ISO7816 part 4 complaint command. Format Command Data T=CL command ISO 7816 part 4 complaint command...
Page 25
SCR331-DI Product Technical Manual 4.5.7.2.2 T=CL PPS Description This APDU helps user to change the baud rate of PICC. Currently this is enabled only for Type A PICC. This command is similar to ISO 7816 PPS, but this command has to manually send by user for changing speed of PICC.
Page 26
P3 field. The firmware parses this APDU and send the Lc part to the card. Response Data PICC response data with Status bytes N ote SCR331-DI parses this APDU and send only P3 length data bytes from this APDU to PICC Example User APDU command Data 0xFC...
SCR331-DI Product Technical Manual 4.5.7.2.4 T=CL GET IFSC command Description This APDU helps user to get the contact-less card IFSC value and CID value. This APDU is used for T=CL type of cards. Format Command T=CL GET IFSC 0xFC 0xFD...
SCR331-DI Product Technical Manual 5.2 READER_CNTLESS_SEND_REQ This escape message causes the firmware to issue the PICC Request command. The first byte of the input buffer contains the escape function value and the second one contains the request code to be issued. The output buffer contains the Answer To request bytes.
SCR331-DI Product Technical Manual Any other value sent as mode will set the type as the default one, that is TYPE AB. 5.8 READER_CNTLESS_RF_SWITCH This escape message ID can be used to retrieve the current RF state (ON/OFF) in reader and to switch the RF state.
SCR331-DI Product Technical Manual 5.10 READER_CNTLESS_RAW_XMIT Based on the Raw Transmit configurations set in the READER_CNTLESS_RAW_CFG escape command, and the parameters in this escape IOCTL, the command is executed, and the output buffer contains the response of the command The input buffer values are as given below S.No.
SCR331-DI Product Technical Manual bytes, the second byte will be set to 0xFF and on success of the command, the first byte of output buffer contains the current state. Following table gives the value of second byte of input buffer as interpreted by firmware S.No.
SCR331-DI Product Technical Manual 8.0 Appendix C 8.1 Sample Code for using Escape messages through Escape IOCTL File Name : T_pupi.H #ifdef __cplusplus extern "C" { #endif #define IOCTL_CCID_ESCAPE SCARD_CTL_CODE(0xDAC) #define CCID_GET_PUPI_STATUS 0xFF9B #define CCID_SET_PUPI_ON 0x019B #define CCID_SET_PUPI_OFF 0x009B #define MINTIMEOUT...
Page 34
// please add the name of the used reader here or use SCardListReaders to find the right reader name char *ReaderName[] = "SCM Microsystems Inc. SCR331-DI USB ContactlessReader 0", NULL /********************************************************************************************************/ ContextHandle = -1; ret = SCardEstablishContext(SCARD_SCOPE_USER, NULL, NULL, &ContextHandle);...
Page 36
SCR331-DI Product Technical Manual ret = SCardDisconnect(CardHandle, SCARD_RESET_CARD); else printf("\n SCardConnect failed with 0x%.8lX",ret); ret = SCardReleaseContext(ContextHandle); else printf("\n SCardEstablishContext failed with %.8lX",ret); printf("\npress any key to close the test tool\n"); getch(); IND.SCR331-DI.MANUAL.VER.1.8 VER1.8 Page 36 of 36...
Need help?
Do you have a question about the SCR331-DI and is the answer not in the manual?
Questions and answers