The ACR38x (CCID) PC-linked Smart Card Reader acts as an interface for the communication
between a computer and a smart card. Different types of smart cards have different commands and
different communication protocols, which, in most cases, prevent direct communication between a
smart card and a computer. The ACR38x (CCID) 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’s
particulars, it releases the computer software programmer from being responsible with smart card
operations’ technical details, which in many cases, are not relevant 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
*Must be set to zero unless stated differently.
Page 4 of 58
ACR38x (CCID) – Reference Manual info@acs.com.hk
Version 6.04
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 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 EN60950/IEC 60950
o ISO 7816
o CE
o FCC
o VCCI
o PC/SC
o CCID
o EMV 2000 Level 1
o Microsoft WHQL
o RoHS
Page 5 of 58
ACR38x (CCID) – Reference Manual info@acs.com.hk
Version 6.04
www.acs.com.hk
3.0. Smart Card Support
3.1. MCU Cards
The ACR38x (CCID) 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 the ACR38x (CCID), 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 ACR38x (CCID) 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
The ACR38x (CCID) 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, ST14C04C
o Gemplus: GFM1K, GFM2K, GFM4K, GFM8K
• 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 and AT88SC1003
Page 6 of 58
ACR38x (CCID) – Reference Manual info@acs.com.hk
Version 6.04
www.acs.com.hk
4.0. Smart Card Interface
The interface between the ACR38x (CCID) and the inserted smart card follows the specification of
ISO 7816-3 with certain restrictions or enhancements to increase the practical functionality of ACR38x
(CCID).
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 ACR38x (CCID). 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 ACR38x
(CCID) 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
The ACR38x (CCID) 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 ACR38x (CCID)
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: The ACR38x (CCID) 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 58
ACR38x (CCID) – Reference Manual info@acs.com.hk
Version 6.04
www.acs.com.hk
5.0. Power Supply
The ACR38x (CCID) requires a voltage of 5 V DC, 100 mA, regulated, power supply. The ACR38x
(CCID) gets 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 every 2 seconds)
Indicates ACR38x (CCID) 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 ACR38x (CCID) and smart card.
Page 8 of 58
ACR38x (CCID) – Reference Manual info@acs.com.hk
Version 6.04
www.acs.com.hk
6.0. USB Interface
6.1. Communication Parameters
The ACR38x (CCID) is connected to a computer through USB as specified in the USB Specification
2.0. The ACR38x (CCID) is working in full speed mode, i.e. 12 Mbps.
Pin Signal Function
1 V
2 D- Differential signal transmits data between ACR38x (CCID) and PC
3 D+ Differential signal transmits data between ACR38x (CCID) and PC
4 GND Reference voltage level for power supply
Note: In order for the ACR38x (CCID) to function properly through USB interface, either ACS CCID
driver or the Microsoft CCID driver has to be installed.
+5 V power supply for the reader
BUS
Table 2: USB Interface Wiring
6.2. Endpoints
The ACR38x (CCID) 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 ACR38x (CCID)
(data packet size is 64 bytes)
For response to be sent from ACR38x (CCID) to host
(data packet size is 64 bytes)
For card status message to sent from ACR38x (CCID) to
host
(data packet size is 8 bytes)
Page 9 of 58
ACR38x (CCID) – Reference Manual info@acs.com.hk
Version 6.04
www.acs.com.hk
7.0. Communication Protocol
ACR38x (CCID) 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 ACR38x (CCID) shall follow CCID Rev 1.0
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 ACR38x (CCID)
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 ACR38x (CCID) have
to be sent synchronously (e.g., bMaxCCIDBusySlots is equal to 01h for ACR38x (CCID)).
The ACR38x (CCID) 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
1
2
1
1
4
4
4
1
4
4
1
Size of this descriptor, in bytes.
CCID Functional Descriptor type.
CCID Specification Release Number in
Binary-coded decimal.
One slot is available on ACR38x (CCID).
ACR38x (CCID) can supply 1.8 V, 3 V, and
5 V to its slot.
ACR38x (CCID) supports T=0 and T=1
protocol.
Default ICC clock frequency is 4 MHz.
Maximum supported ICC clock frequency
is 4 MHz.
Does not support manual setting of clock
frequency.
Default ICC I/O data rate is 10752 bps.
Maximum supported ICC I/O data rate is
344 kbps.
Does not support manual setting of data
rates.
Maximum IFSD supported by ACR38x
28
32
36
dwMaxIFSD
dwSynchProtocols
dwMechanical
4
4
4
(CCID) for protocol T=1 is 254.
ACR38x (CCID) does not support
synchronous card.
ACR38x (CCID) does not support special
mechanical characteristics.
Page 10 of 58
ACR38x (CCID) – Reference Manual info@acs.com.hk
Version 6.04
www.acs.com.hk
Offset Field Size Value Description
ACR38x (CCID) supports the following
features:
•Automatic ICC clock frequency change
40
dwFeatures
4
according to parameters
•Automatic baud rate change according
to frequency and FI,DI parameters
•TPDU level change with ACR38x
(CCID)
Maximum message length accepted by
44
dwMaxCCIDMessageLength
4
ACR38x (CCID) is 271 bytes.
48
49
50
52
53
bClassGetResponse
bClassEnvelope
wLCDLayout
bPINSupport
bMaxCCIDBusySlots
1
1
2
1
1
Insignificant for TPDU level exchanges.
Insignificant for TPDU level exchanges.
No LCD.
With PIN Verification.
Only 1 slot can be simultaneously busy.
Page 11 of 58
ACR38x (CCID) – Reference Manual info@acs.com.hk
Version 6.04
www.acs.com.hk
8.0. Memory Card Type Selection
SELECT_CARD_TYPE command must be executed first before other memory card commands. This
command powers up and down the selected card inserted in the card reader and performs a card
reset. This command can only be used after the logical smart card reader communication has been
established using the SCardConnect() API.
For details of SCardConnect() API, please refer to PC/SC specifications.
For the Memory Card Command Set, please refer to Section 9.3.
A code snippet for the program flow is given below to demonstrate how to select the memory card
type in ACR38x (CCID):
//Disconnect from the reader
retCode = SCardDisconnect(hCard, SCARD_UNPOWER_CARD);
//End the established context
retCode = SCardReleaseContext(hContext);
Page 12 of 58
ACR38x (CCID) – Reference Manual info@acs.com.hk
Version 6.04
www.acs.com.hk
9.0. Commands
9.1. CCID Command Pipe Bulk-OUT Messages
ACR38x (CCID) shall follow the CCID Bulk-OUT Messages as specified in CCID Rev 1.0 Section 4.1.
In addition, this specification defines some extended commands for operating additional features.
This section lists the CCID Bulk-OUT Messages to be supported by ACR38x (CCID).
9.1.1. PC_to_RDR_IccPowerOn
This command activates the card slot and returns ATR data 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
9.1.2. PC_to_RDR_IccPowerOff
This command deactivates the card slot.
Offset Field Size Value Description
0
bMessageType
1 63h
1
5
6
7
The response to this message is the RDR_to_PC_SlotStatus message.
dwLength
bSlot
bSeq
abRFU
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.
9.1.3. PC_to_RDR_GetSlotStatus
This command gets the current status of the slot.
Offset Field Size Value Description
0
1
bMessageType
dwLength
ACR38x (CCID) – Reference Manual info@acs.com.hk
Version 6.04
1 65h
4 00000000h Size of extra bytes of this message.
Page 13 of 58
www.acs.com.hk
Offset Field Size Value Description
5
6
7
The response to this message is the RDR_to_PC_SlotStatus message.
bSlot
bSeq
abRFU
1
1 Sequence number for command.
3 Reserved for future use.
Identifies the slot number for this
command.
9.1.4. PC_to_RDR_XfrBlock
This command transfers data block to the ICC.
Offset Field Size Value Description
0
1
5
6
7
bMessageType
dwLength
bSlot
bSeq
bBWI
1 6Fh
4 Size of abData field of this message.
1
1 Sequence number for command.
1
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.
8
10
The response to this message is the RDR_to_PC_DataBlock message.
wLevelParameter
abData
2 0000h RFU (TPDU exchange level).
Byte
array
Data block sent to the CCID. Data is
sent “as is” to the ICC (TPDU exchange
level).
9.1.5. PC_to_RDR_GetParameters
This command gets the 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 14 of 58
ACR38x (CCID) – Reference Manual info@acs.com.hk
Version 6.04
www.acs.com.hk
9.1.6. PC_to_RDR_ResetParameters
This command resets slot parameters to the 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.
9.1.7. PC_to_RDR_SetParameters
This command sets the slot parameters.
Offset Field Size Value Description
0
1
5
6
7
bMessageType
dwLength
bSlot
bSeq
bProtocolNum
1 61h
4 Size of extra bytes of this message.
1
1 Sequence number for command.
1
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
8
10
Protocol Data Structure for Protocol T=0 (dwLength=00000005h)
Offset Field Size Value Description
10
abProtocolDataStructure
abRFU
bmFindexDindex
2 Reserved for future use.
Byte
array
1
Protocol Data Structure.
B7-4 – FI – Index into the table 7 in
ISO/IEC 7816-3:1997 selecting a clock
rate conversion factor
B3-0 – DI - Index into the table 8 in
ISO/IEC 7816-3:1997 selecting a baud
rate conversion factor
Page 15 of 58
ACR38x (CCID) – Reference Manual info@acs.com.hk
Version 6.04
www.acs.com.hk
Index into the table 7 in
3:1997 selecting a clock
3:1997 selecting a baud
Checksum type (b0=0 for LRC,
Convention used (b1=0 for direct,
b1=1 for inverse) Note: The CCID
Extra Guardtime (0 to 254 etu between
, then
Offset Field Size Value Description
B0 – 0b, B7-2 – 000000b
11
bmTCCKST0
1
B1 – Convention used (b1=0 for direct,
b1=1 for inverse) Note: The CCID ignores this bit.
Extra Guardtime between two
12
bGuardTimeT0
1
characters. Add 0 to 254 etu to the
normal guardtime of 12 etu. FFh is the
same as 00h.
13
bWaitingIntegerT0
1
WI for T=0 used to define WWT
ICC Clock Stop Support
00h = Stopping the Clock is not allowed
14
bClockStop
1
01h = Stop with Clock signal Low
02h = Stop with Clock signal High
03h = Stop with Clock either High or
Low
Protocol Data Structure for Protocol T=1 (dwLength=00000007h)
Offset Field Size Value Description
10
11
12
13
bmFindexDindex
BmTCCKST1
BGuardTimeT1
BwaitingIntegerT1
1
1
1
1
B7-4 – FI –
ISO/IEC 7816rate conversion factor
B3-0 – DI - Index into the table 8 in
ISO/IEC 7816rate conversion factor
B7-2 – 000100b
B0 –
b0=1 for CRC)
B1 –
ignores this bit.
two characters). If value is FFh
guardtime is reduced by 1 etu.
B7-4 = BWI values 0-9 valid
B3-0 = CWI values 0-Fh valid
ACR38x (CCID) – Reference Manual info@acs.com.hk
Version 6.04
Page 16 of 58
www.acs.com.hk
Offset Field Size Value Description
ICC Clock Stop Support
00h = Stopping the Clock is not allowed
14
bClockStop
1
01h = Stop with Clock signal Low
02h = Stop with Clock signal High
03h = Stop with Clock either High or Low
15
16
bIFSC
bNadValue
1 Size of negotiated IFSC
1 00h Only support NAD = 00h
The response to this message is the RDR_to_PC_Parameters message.
Page 17 of 58
ACR38x (CCID) – Reference Manual info@acs.com.hk
Version 6.04
www.acs.com.hk
9.2. CCID Bulk-IN Messages
The Bulk-IN messages are used in response to the Bulk-OUT messages. ACR38x (CCID) shall follow
the CCID Bulk-IN Messages as specified in CCID Rev 1.0 Section 4.2.
This section lists the CCID Bulk-IN Messages to be supported by ACR38x (CCID).
9.2.1. RDR_to_PC_DataBlock
This command is sent by ACR38x (CCID) in response to PC_to_RDR_IccPowerOn,
PC_to_RDR_XfrBlock and PC_to_RDR_Secure messages.
Offset Field Size Value Description
0
1
5
6
7
8
9
10
bMessageType
dwLength
bSlot
bSeq
bStatus
bError
bChainParameter
abData
1 80h
4 Size of extra bytes of this message.
1 Same value as in Bulk-OUT message.
1 Same value as in Bulk-OUT message.
1
1
1 00h RFU (TPDU exchange level).
Byte
array
Indicates that a data block is being sent
from the CCID.
Slot status register as defined in CCID
Rev 1.0 Section 4.2.1.
Slot error register as defined in CCID
Rev 1.0 Section 4.2.1.
This field contains the data returned by
the CCID.
9.2.2. RDR_to_PC_SlotStatus
This command is sent by ACR38x (CCID) in response to PC_to_RDR_IccPowerOff,
PC_to_RDR_GetSlotStatus, PC_to_RDR_Abort messages and Class Specific ABORT request.
Offset Field Size Value Description
0
1
5
6
7
8
bMessageType
dwLength
bSlot
bSeq
bStatus
bError
1 81h
4 00000000h
1
1
1
1
Size of extra bytes of this
message.
Same value as in Bulk-OUT
message.
Same value as in Bulk-OUT
message.
Slot status register as defined in
CCID Rev 1.0 Section 4.2.1.
Slot error register as defined in
CCID Rev 1.0 Section 4.2.1.
Page 18 of 58
ACR38x (CCID) – Reference Manual info@acs.com.hk
Version 6.04
www.acs.com.hk
Loading...
+ 40 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.