ACS ACR3801 User Manual

ACR3801
PC-linked Smart Card Reader
Reference Manual V2.01
Subject to change without prior notice info@acs.com.hk
www.acs.com.hk
Table of Contents
1.0. Introduction ............................................................................................................. 4
1.1. Reference Documents ........................................................................................................... 4
1.2. Symbols and Abbreviations ................................................................................................... 4
2.0. Features ................................................................................................................... 5
3.0. Supported Card Types ............................................................................................ 6
3.1. MCU Cards ............................................................................................................................ 6
3.2. Memory-based Smart Cards.................................................................................................. 6
4.0. Smart Card Interface ............................................................................................... 7
4.1. Smart Card Power Supply VCC (C1) .................................................................................... 7
4.2. Programming Voltage VPP (C6) ............................................................................................ 7
4.3. Card Type Selection .............................................................................................................. 7
4.4. Interface for Microcontroller-based Cards ............................................................................. 7
4.5. Card Tearing Protection ......................................................................................................... 7
5.0. Power Supply ........................................................................................................... 8
5.1. Status LED ............................................................................................................................. 8
6.0. USB Interface ........................................................................................................... 9
6.1. Communication Parameters .................................................................................................. 9
6.2. Endpoints ............................................................................................................................... 9
7.0. Communication Protocol ...................................................................................... 10
8.0. Commands ............................................................................................................. 12
8.1. CCID Command Pipe Bulk-OUT Messages ........................................................................ 12
8.1.1. PC_to_RDR_IccPowerOn ........................................................................................... 12
8.1.2. PC_to_RDR_IccPowerOff ........................................................................................... 13
8.1.3. PC_to_RDR_GetSlotStatus ........................................................................................ 14
8.1.4. PC_to_RDR_XfrBlock ................................................................................................. 15
8.1.5. PC_to_RDR_GetParameters ...................................................................................... 16
8.1.6. PC_to_RDR_ResetParameters .................................................................................. 17
8.1.7. PC_to_RDR_SetParameters ...................................................................................... 18
8.2. CCID Bulk-IN Messages ...................................................................................................... 20
8.2.1. RDR_to_PC_DataBlock .............................................................................................. 20
8.2.2. RDR_to_PC_SlotStatus .............................................................................................. 21
8.2.3. RDR_to_PC_Parameters ............................................................................................ 22
8.3. Memory Card Command Set ............................................................................................... 23
8.3.1. Recollection Card – 1, 2, 4, 8 and 18 Kbit I2C Card ................................................... 23
8.3.2. Memory Card – 32, 64, 128, 256, 512, and 1024 Kbit I2C Card ................................ 26
8.3.3. Memory Card – ATMEL AT88SC153.......................................................................... 29
8.3.4. Memory Card – ATMEL AT88C1608 .......................................................................... 32
8.3.5. Memory Card – SLE 4418/SLE 4428/SLE 5518/SLE 5528 ........................................ 36
8.3.6. Memory Card – SLE 4432/SLE 4442/SLE 5532/SLE 5542 ........................................ 41
8.3.7. Memory Card – SLE 4406/SLE 4436/SLE 5536/SLE 6636 ........................................ 46
8.3.8. Memory Card – SLE 4404 .......................................................................................... 50
8.3.9. Memory Card – AT88SC101/AT88SC102/AT88SC1003 ........................................... 54
8.4. Other Commands Access via PC_to_RDR_XfrBlock .......................................................... 60
8.4.1. GET_READER_INFORMATION ................................................................................ 60
Appendix A. Supported Card Types .............................................................................. 61
Appendix B. Response Error Codes ............................................................................. 62
Page 2 of 62
ACR3801 – Reference Manual info@acs.com.hk
Version 2.01
www.acs.com.hk
List of Tables
Table 1 : Symbols and Abbreviations ..................................................................................................... 4
Table 2 : USB Interface Wiring ............................................................................................................... 9
Table 3 : Supported Card Types .......................................................................................................... 61
Table 4 : Response Error Codes .......................................................................................................... 62
Page 3 of 62
ACR3801 – Reference Manual info@acs.com.hk
Version 2.01
www.acs.com.hk
1.0. Introduction
ACR3801 Smart Card Reader acts as a communication interface between a computer and a smart card. Different types of smart cards have different commands and different communication protocols, which prevents in most cases, the direct communication between a smart card and a computer. The ACR3801 Smart Card Reader establishes a uniform interface from the computer to the smart card for a wide variety of cards. By taking care of the card specifics, it liberates the computer software programmer of getting involved with the technical details of the smart card operation, which are in many cases irrelevant to the implementation of a smart card system.
1.1. Reference Documents
The following related documents are available from www.usb.org
Universal Serial Bus Specification 2.0 (also referred to as the USB specification), April 27, 2000
Universal Serial Bus Common Class Specification 1.0, December 16, 1997
Universal Serial Bus Device Class: Smart Card CCID Specification for Integrated Circuit(s)
Cards Interface Devices, Revision 1.1, April 22, 2005
The following related documents can be ordered through www.ansi.org
ISO/IEC 7816-1; Identification Cards – Integrated circuit(s) cards with contacts - Part 1: Physical Characteristics
ISO/IEC 7816-2; Identification Cards – Integrated circuit(s) cards with contacts - Part 2: Dimensions and Locations of the contacts
ISO/IEC 7816-3; Identification Cards – Integrated circuit(s) cards with contacts - Part 3: Electronic signals and transmission protocols
1.2. Symbols and Abbreviations
Abbreviation Description
ATR Answer-to-reset
CCID Chip/Smart Card Interface Device
ICC Integrated Circuit Cards
IFSC Information Field Sized for ICC for protocol T=1
IFSD Information Field Sized for CCID for protocol T=1
NAD Node Address
PPS Protocol and Parameters Selection
RFU Reserved for future use*
TPDU Transport Protocol Data Unit
USB Universal Serial Bus
Table 1: Symbols and Abbreviations
*Note: Must be set to zero unless stated differently.
Page 4 of 62
ACR3801 – Reference Manual info@acs.com.hk
Version 2.01
www.acs.com.hk
2.0. Features
USB 2.0 Full Speed Interface
Plug-and-Play – CCID support brings utmost mobility
Smart Card Reader:
o Supports ISO 7816 Class A, B and C (5 V, 3 V, 1.8 V) cards
o Supports CAC (Common Access Card)
o Supports microprocessor cards with T=0 or T=1 protocol
o Supports memory cards
o Supports PPS (Protocol and Parameters Selection)
o Features Short Circuit Protection
Application Programming Interface:
o Supports PC/SC
o Supports CT-API (through wrapper on top of PC/SC)
Supports Android™ OS 3.1 and above
Compliant with the following standards:
o FIPS 201
o TAA
o EN60950/IEC 60950
o ISO 7816
o CE
o FCC
o PC/SC
o CCID
o Microsoft WHQL
o RoHS
Page 5 of 62
ACR3801 – Reference Manual info@acs.com.hk
Version 2.01
www.acs.com.hk
3.0. Supported Card Types
3.1. MCU Cards
ACR3801 is a PC/SC compliant smart card reader that supports ISO 7816 Class A, B and C (5 V, 3 V, and 1.8 V) smart cards. It also works with MCU cards following either the T=0 and T=1 protocol.
The card ATR indicates the specific operation mode (TA2 present; bit b5 of TA2 must be 0) and when that particular mode is not supported by ACR3801, the reader will reset the card to a negotiable mode. If the card cannot be set to negotiable mode, the reader will then reject the card.
When the card ATR indicates the negotiable mode (TA2 not present) and communication parameters other than the default parameters, the ACR3801 will execute the PPS and try to use the communication parameters that the card suggested in its ATR. If the card does not accept the PPS, the reader will use the default parameters (F=372, D=1).
For the meaning of the aforementioned parameters, please refer to ISO 7816-3.
3.2. Memory-based Smart Cards
ACR3801 works with several memory-based smart cards such as:
Cards following the I2C bus protocol (free memory cards) with maximum 128 bytes page with capability, including:
o Atmel: AT24C01/02/04/08/16/32/64/128/256/512/1024
o SGS-Thomson: ST14C02C/4C
o Gemplus: GFM1K to 8K
Cards with secure memory IC with password and authentication, including:
o Atmel: AT88SC153 and AT88SC1608
Cards with intelligent 1k bytes EEPROM with write-protect function, including:
o Infineon: SLE4418, SLE4428, SLE5518 and SLE5528
Cards with intelligent 256 bytes EEPROM with write-protect function, including:
o Infineon: SLE4432, SLE4442, SLE5532 and SLE5542
Cards with ‘104’ type EEPROM non-reloadable token counter cards, including:
o Infineon: SLE4406, SLE4436, SLE5536 and SLE6636
Cards with Intelligent 416-Bit EEPROM with internal PIN check, including:
o Infineon: SLE4404
Cards with Security Logic with Application Zone(s), including:
o Atmel: AT88SC101, AT88SC102, AT88SC1003
Page 6 of 62
ACR3801 – Reference Manual info@acs.com.hk
Version 2.01
www.acs.com.hk
4.0. Smart Card Interface
The interface between the ACR3801 and the inserted smart card follows the specification of ISO 7816-3 with certain restrictions or enhancements to increase the practical functionality of ACR3801.
4.1. Smart Card Power Supply VCC (C1)
The current consumption of the inserted card must not be higher than 50 mA.
4.2. Programming Voltage VPP (C6)
According to ISO 7816-3, the smart card contact C6 (VPP) supplies the programming voltage to the smart card. Since all common smart cards in the market are EEPROM-based and do not require the provision of an external programming voltage, the contact C6 (VPP) has been implemented as a normal control signal in the ACR3801. The electrical specifications of this contact are identical to those of the signal RST (at contact C2).
4.3. Card Type Selection
The controlling PC must always select the card type through the proper command sent to the ACR3801 prior to activating the inserted card. This includes both the memory cards and MCU-based cards.
For MCU-based cards, the reader allows to select the preferred protocol, T=0 or T=1. However, this selection is only accepted and carried out by the reader through the PPS when the card inserted in the reader supports both protocol types. Whenever an MCU-based card supports only one protocol type, T=0 or selected by the application.
T=1, the reader automatically uses that protocol type, regardless of the protocol type
4.4. Interface for Microcontroller-based Cards
For microcontroller-based smart cards, only the contacts C1 (VCC), C2 (RST), C3 (CLK), C5 (GND) and C7 (I/O) are used. A frequency of 4 MHz is applied to the CLK signal (C3).
4.5. Card Tearing Protection
ACR3801 provides a mechanism to protect the inserted card when it is suddenly withdrawn while it is powered up. The power supply to the card and the signal lines between the ACR3801 and the card is immediately deactivated when the card is being removed. However, as a rule to avoid any electrical damage, a card should only be removed from the reader while it is powered down.
Note: ACR3801 never switches on the power supply to the inserted card by itself. The controlling computer through the proper command sent to the reader must explicitly do this.
Page 7 of 62
ACR3801 – Reference Manual info@acs.com.hk
Version 2.01
www.acs.com.hk
5.0. Power Supply
ACR3801 requires a voltage of 5 V DC, 100 mA, regulated, power supply. ACR3801 gets the power supply from the computer (through the cable supplied along with each type of reader).
5.1. Status LED
The LED indicates the activation status of the smart card interface:
Flashing slowly (turns on 200 ms for every 2 seconds)
Indicates ACR3801 is powered up and in the standby state. Either the smart card has not been inserted or the smart card has not been powered up (if it is inserted).
Lighting up
Indicates power supply to the smart card is switched on, i.e., the smart card is activated.
Flashing quickly
Indicates there are communications between ACR3801 and smart card.
Page 8 of 62
ACR3801 – Reference Manual info@acs.com.hk
Version 2.01
www.acs.com.hk
6.0. USB Interface
6.1. Communication Parameters
ACR3801 is connected to a computer through USB as specified in the USB Specification 2.0. ACR3801 is working in full speed more, i.e. 12 Mbps.
Pin Signal Function
1 VBUS +5 V power supply for the reader
2 D- Differential signal transmits data between ACR3801 and PC
3 D+ Differential signal transmits data between ACR3801 and PC
4 GND Reference voltage level for power supply
Table 2: USB Interface Wiring
Note: In order for the ACR3801 to function properly through USB interface, either ACS proprietary device driver or the ACS PC/SC device driver has to be installed.
6.2. Endpoints
ACR3801 uses the following endpoints to communicate with the host computer:
Control Endpoint
Bulk OUT
Bulk IN
Interrupt IN
For setup and control purpose
For command to be sent from host to ACR3801 (data packet size is 64 bytes)
For response to be sent from ACR3801 to host (data packet size is 64 bytes)
For card status message to sent from ACR3801 to host (data packet size is 8 bytes)
Page 9 of 62
ACR3801 – Reference Manual info@acs.com.hk
Version 2.01
www.acs.com.hk
7.0. Communication Protocol
ACR3801 shall interface with the host through the USB connection. A specification, namely CCID, has been released within the industry defining such a protocol for the USB chip-card interface devices. CCID covers all the protocols required for operating smart cards.
The configurations and usage of USB endpoints on ACR3801 shall follow CCID Section 3.
An overview is summarized below:
1. Control Commands are sent on control pipe (default pipe). These include class-specific requests and USB standard requests. Commands that are sent on the default pipe report information back to the host on the default pipe.
2. CCID Events are sent on the interrupt pipe.
3. CCID Commands are sent on BULK-OUT endpoint. Each command sent to ACR3801 has an associated ending response. Some commands can also have intermediate responses.
4. CCID Responses are sent on BULK-IN endpoint. All commands sent to ACR3801 have to be sent synchronously (e.g., bMaxCCIDBusySlots is equal to 01h for ACR3801).
ACR3801 supported CCID features are indicated in its Class Descriptor:
Offset Field Size Value Description
0
1
2
4
5
6
10
14
18
19
23
27
bLength
bDescriptorType
bcdCCID
bMaxSlotIndex
bVoltageSupport
dwProtocols
dwDefaultClock
dwMaximumClock
bNumClockSupported
dwDataRate
dwMaxDataRate
bNumDataRatesSupported
1 36h Size of this descriptor, in bytes
1 21h CCID Functional Descriptor type
2 0100h
1 00h One slot is available on ACR3801
1 07h
4 00000003h
4 00000FA0h Default ICC clock frequency is 4 MHz
4 00000FA0h
1 00h
4 00002A00h Default ICC I/O data rate is 10752 bps
4 0001F808h
1 00h
CCID Specification Release Number in Binary-Coded decimal
ACR3801 can supply 1.8 V, 3 V, and 5 V to its slot
ACR3801 supports T=0 and T=1 protocol
Maximum supported ICC clock frequency is 4 MHz
Does not support manual setting of clock frequency
Maximum supported ICC I/O data rate is 344 kbps
Does not support manual setting of data rates
28
32
36
dwMaxIFSD
dwSynchProtocols
dwMechanical
4 00000FEh
4 00000000h
4 00000000h
Maximum IFSD supported by ACR3801 for protocol T=1 is 254
ACR3801 does not support synchronous card
ACR3801 does not support special mechanical characteristics
Page 10 of 62
ACR3801 – Reference Manual info@acs.com.hk
Version 2.01
www.acs.com.hk
Offset Field Size Value Description
ACR3801 supports the following features:
Automatic ICC clock frequency change
40
dwFeatures
4 00010030h
according to parameters Automatic baud rate change according
to frequency and FI,DI parameters TPDU level change with ACR3801
44
48
49
50
52
53
dwMaxCCIDMessageLength
bClassGetResponse
bClassEnvelope
wLCDLayout
bPINSupport
bMaxCCIDBusySlots
4 0000010Fh
1 00h Insignificant for TPDU level exchanges
1 00h Insignificant for TPDU level exchanges
2 0000h No LCD
1 00h No PIN Verification
1 01h Only 1 slot can be simultaneously busy
Maximum message length accepted by ACR3801 is 271 bytes
Page 11 of 62
ACR3801 – Reference Manual info@acs.com.hk
Version 2.01
www.acs.com.hk
8.0. Commands
8.1. CCID Command Pipe Bulk-OUT Messages
ACR3801 shall follow the CCID Bulk-OUT Messages as specified in CCID Section 4. In addition, this specification defines some extended commands for operating additional features.
This section lists the CCID Bulk-OUT Messages to be supported by ACR3801.

8.1.1. PC_to_RDR_IccPowerOn

Activates the card slot and returns ATR from the card.
Offset Field Size Value Description
0
1
2
5
6
7
The response to this command message is the RDR_to_PC_DataBlock response message and the data returned is the Answer-to-Reset (ATR) data.
bMessageType
dwLength
bSlot
bSeq
bPowerSelect
abRFU
1 62h -
4 00000000h Size of extra bytes of this message
1 -
1 - Sequence number for command
1 -
2 - Reserved for future use
Identifies the slot number for this command
Voltage that is applied to the ICC: 00h = Automatic Voltage Selection 01h = 5 volts 02h = 3 volts
Page 12 of 62
ACR3801 – Reference Manual info@acs.com.hk
Version 2.01
www.acs.com.hk

8.1.2. PC_to_RDR_IccPowerOff

Deactivates the card slot.
Offset Field Size Value Description
0
1
5
6
7
The response to this message is the RDR_to_PC_SlotStatus message.
bMessageType
dwLength
bSlot
bSeq
abRFU
1 63h -
4 00000000h Size of extra bytes of this message
1 -
1 - Sequence number for command
3 - Reserved for future use
Identifies the slot number for this command
Page 13 of 62
ACR3801 – Reference Manual info@acs.com.hk
Version 2.01
www.acs.com.hk

8.1.3. PC_to_RDR_GetSlotStatus

Gets current status of the slot.
Offset Field Size Value Description
0
1
5
6
7
The response to this message is the RDR_to_PC_SlotStatus message.
bMessageType
dwLength
bSlot
bSeq
abRFU
1 65h -
4 00000000h Size of extra bytes of this message
1 -
1 - Sequence number for command
3 - Reserved for future use
Identifies the slot number for this command
Page 14 of 62
ACR3801 – Reference Manual info@acs.com.hk
Version 2.01
www.acs.com.hk

8.1.4. PC_to_RDR_XfrBlock

Transfers data block to the ICC.
Offset Field Size Value Description
0
1
5
6
7
8
10
The response to this message is the RDR_to_PC_DataBlock message.
bMessageType
dwLength
bSlot
bSeq
bBWI
wLevelParameter
abData
1 6Fh -
4 -
1 -
1 - Sequence number for command
1 -
2 0000h RFU (TPDU exchange level)
Byte
array
Size of abData field of this message
Identifies the slot number for this command
Used to extend the CCIDs Block Waiting Timeout for this current transfer. The CCID will timeout the block after “this number multiplied by the Block Waiting Time” has expired.
Data block sent to the CCID. Data is
-
sent “as is” to the ICC (TPDU exchange level).
Page 15 of 62
ACR3801 – Reference Manual info@acs.com.hk
Version 2.01
www.acs.com.hk

8.1.5. PC_to_RDR_GetParameters

Gets slot parameters.
Offset Field Size Value Description
0
1
5
6
7
The response to this message is the RDR_to_PC_Parameters message.
bMessageType
DwLength
BSlot
BSeq
AbRFU
1 6Ch -
4 00000000h Size of extra bytes of this message
1 -
1 - Sequence number for command
3 - Reserved for future use
Identifies the slot number for this command
Page 16 of 62
ACR3801 – Reference Manual info@acs.com.hk
Version 2.01
www.acs.com.hk

8.1.6. PC_to_RDR_ResetParameters

Resets slot parameters to default value.
Offset Field Size Value Description
0
1
5
6
7
The response to this message is the RDR_to_PC_Parameters message.
bMessageType
DwLength
BSlot
BSeq
AbRFU
1 6Dh -
4 00000000h Size of extra bytes of this message
1 -
1 - Sequence number for command
3 - Reserved for future use
Identifies the slot number for this command
Page 17 of 62
ACR3801 – Reference Manual info@acs.com.hk
Version 2.01
www.acs.com.hk

8.1.7. PC_to_RDR_SetParameters

Sets slot parameters.
Offset Field Size Value Description
0
1
5
6
7
8
10
Protocol Data Structure for Protocol T=0 (dwLength=00000005h)
bMessageType
dwLength
bSlot
bSeq
bProtocolNum
abRFU
abProtocolDataStructure
1 61h -
4 - Size of extra bytes of this message
1 -
1 - Sequence number for command
1 -
2 - Reserved for future use
Byte
array
Identifies the slot number for this command
Specifies what protocol data structure follows:
00h = Structure for protocol T=0 01h = Structure for protocol T=1 The following values are reserved for
future use: 80h = Structure for 2-wire protocol 81h = Structure for 3-wire protocol 82h = Structure for I2C protocol
- Protocol Data Structure
Offset Field Size Value Description
B7-4 – FI – Index into the table 7 in ISO/IEC 7816-3:1997 selecting a
10
11
12
13
14
bmFindexDindex
bmTCCKST0
bGuardTimeT0
bWaitingIntegerT0
bClockStop
1 -
1 -
1 -
1 - WI for T=0 used to define WWT
1 -
clock rate conversion factor B3-0 – DI - Index into the table 8 in ISO/IEC 7816-3:1997 selecting a baud
rate conversion factor
B0 – 0b, B7-2 – 000000b B1 – Convention used (b1=0 for direct,
b1=1 for inverse) Note: The CCID ignores this bit.
Extra Guardtime between two characters. Add 0 to 254 etu to the normal guardtime of 12etu. FFh is the same as 00h.
ICC Clock Stop Support: 00h = Stopping the Clock is not
allowed 01h = Stop with Clock signal Low 02h = Stop with Clock signal High 03h = Stop with Clock either High or
Low
Page 18 of 62
ACR3801 – Reference Manual info@acs.com.hk
Version 2.01
www.acs.com.hk
Protocol Data Structure for Protocol T=1 (dwLength=00000007h)
Offset Field Size Value Description
B7-4 – FI – Index into the table 7 in ISO/IEC 7816-3:1997 selecting a clock
10
11
12
bmFindexDindex
BmTCCKST1
BGuardTimeT1
1 -
1 -
1 -
rate conversion factor B3-0 – DI - Index into the table 8 in ISO/IEC 7816-3:1997 selecting a baud
rate conversion factor
B7-2 – 000100b B0 – Checksum type (b0=0 for LRC,
b0=1 for CRC B1 – Convention used (b1=0 for direct,
b1=1 for inverse) Note: The CCID ignores this bit.
Extra Guardtime (0 to 254 etu between two characters). If value is FFh, then guardtime is reduced by 1 etu.
13
14
15
16
The response to this message is the RDR_to_PC_Parameters message.
BwaitingIntegerT1
bClockStop
bIFSC
bNadValue
1 -
1 -
1 Size of negotiated IFSC
1 00h Only support NAD = 00h
B7-4 = BWI values 0-9h valid B3-0 = CWI values 0-Fh valid
ICC Clock Stop Support: 00h = Stopping the Clock is not allowed 01h = Stop with Clock signal Low 02h = Stop with Clock signal High 03h = Stop with Clock either High or Low
Page 19 of 62
ACR3801 – Reference Manual info@acs.com.hk
Version 2.01
www.acs.com.hk
Loading...
+ 43 hidden pages