Table 4 : Response Status Codes ........................................................................................................ 40
Page 3 of 40
ACR38x – Reference Manual info@acs.com.hk
Version 6.02
www.acs.com.hk
1.0. Introduction
The ACR38x 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 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 for 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
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
ICC Integrated Circuit Cards
NAD Node Address
PPS Protocol and Parameters Selection
TPDU Transport Protocol Data Unit
USB Universal Serial Bus
Table 1: Symbols and Abbreviations
Page 4 of 40
ACR38x – Reference Manual info@acs.com.hk
Version 6.02
www.acs.com.hk
2.0. Features
• USB 2.0 Full Speed Interface
• 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)
• Compliant with the following standards:
o EN60950/IEC 60950
o ISO 7816
o CE
o FCC
o PC/SC
o EMV 2000 Level 1
o Microsoft® WHQL
o RoHS
Page 5 of 40
ACR38x – Reference Manual info@acs.com.hk
Version 6.02
www.acs.com.hk
3.0. Smart Card Support
3.1. MCU Cards
The ACR38x 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 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, 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 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 works with several memory-based smart cards such as:
•Cards following the I2Cbus 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
Page 6 of 40
ACR38x – Reference Manual info@acs.com.hk
Version 6.02
www.acs.com.hk
4.0. Smart Card Interface
The interface between the ACR38x and the inserted smart card follows the specification of ISO 78163 with certain restrictions or enhancements to increase the practical functionality of ACR38x.
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. 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
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 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 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 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 40
ACR38x – Reference Manual info@acs.com.hk
Version 6.02
www.acs.com.hk
5.0. Power Supply
The ACR38x requires a voltage of 5 V DC, 100 mA, regulated, power supply. The ACR38x 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 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 and smart card.
Page 8 of 40
ACR38x – Reference Manual info@acs.com.hk
Version 6.02
www.acs.com.hk
6.0. USB Interface
6.1. Communication Parameters
The ACR38x is connected to a computer through USB as specified in the USB Specification 2.0. The
ACR38x is working in full speed mode, i.e. 12 Mbps.
Pin Signal Function
1 V
2 D- Differential signal transmits data between ACR38x and PC
3 D+ Differential signal transmits data between ACR38x and PC
4 GND Reference voltage level for power supply
Note: In order for the ACR38x to function properly through USB interface, either ACS PC/SC driver
has to be installed.
+5 V power supply for the reader
BUS
Table 2: USB Interface Wiring
6.2. Endpoints
The ACR38x 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
(data packet size is 64 bytes)
For response to be sent from ACR38x to host
(data packet size is 64 bytes)
For card status message to sent from ACR38x to host
(data packet size is 8 bytes)
Page 9 of 40
ACR38x – Reference Manual info@acs.com.hk
Version 6.02
www.acs.com.hk
7.0. Communication Protocol
During normal operation, the ACR38x acts as a slave device with regard to the communication
between a computer and the reader. The communication is carried out in the form of success
command-response exchanges. The computer transmits a command to the reader and receives a
response from the reader after the command has been executed. A new command can be transmitted
to the ACR38x only after the response to the previous command has been received.
There are two cases where the reader transmits data without having received a command from the
computer, namely the Reset Message and the Card Status Message.
7.1. Command to Reader
A command consists of six protocol bytes and a variable number of data bytes with the following
structure:
Byte 1 2 3 4 5 ... N+4 (N>0)
HeaderInstruction Data Length = N
01h Data Length N
Where:
Header Always 01h to indicate the start of a command.
Instruction The instruction code of the command to be carried out by the ACR38x.
Data Length Number of subsequent data bytes, and is encoded in 2 bytes. The first
byte (MSB) and second byte (LSB) represent data length N.
Data Data contents of the command.
For a READ command, for example, the data bytes would specify the
start address and the number of bytes to be read.
For a WRITE command, the data bytes would specify the start address
and the data to be written to the card.
The data bytes can represent values to be written to a card and/or
command parameters such as an address, a counter, etc.
Note: Commands are sent from host computer to ACR38x through the BULK OUT endpoint.
Data
7.2. Response from Reader
The response from the ACR38x to any command depends on whether the command has been
received by the ACR38x without error (e.g. checksum error).
The response from the ACR38x to a correctly received command consists of three protocol bytes, two
status bytes and a variable number of data bytes with the following structure:
Byte 1 2 3 4 5 ... N+4 (N>0)
Header Status Data Length = N
01h Data Length N
Where:
Header Always 01h to indicate the start of the response.
Status Indicates the command execution status:
Data
Page 10 of 40
ACR38x – Reference Manual info@acs.com.hk
Version 6.02
www.acs.com.hk
00h = command successfully executed
Otherwise = error in command data, or command cannot be executed
A table listing the possible values of the status byte and the
corresponding meaning is given in Appendix B.
Data LengthNumber of subsequent data bytes, and is encoded in 2 bytes. The first
byte (MSB) and second byte (LSB) represent data length N.
Data Data contents of the command.
For a READ_DATA command, for example, the data bytes would contain
the contents of the memory addresses read from the card. The data
bytes can represent values read from the card and/or status information.
Note: Responses are sent from ACR38x to the host computer through BULK IN endpoint.
7.3. Card Status Message
When a card is being inserted into the ACR38x or an inserted card is being removed from the
ACR38x while the ACR38x is in idle mode, i.e. not executing a command, the ACR38x transmits a
Card Status Message to notify the host computer of the change in the card insertion status.
The Card Status Message consists of the following structure and contents:
Card Status Message for Card Insertion
Byte 1 2 3 4
Header Status Data Length
01h C1h 00h 00h
Card Status Message for Card Removal
Byte 1 2 3 4
Header Status Data Length
01h C0h 00h 00h
A Card Status Message is transmitted only once for every card insertion or removal. The ACR38x
does not expect an acknowledgement signal from the computer. After transmitting a status message,
the ACR38x waits for the next command from the computer.
Note: Card Status Messages are sent from ACR38x to the host computer through INTERRUPT IN
endpoint.
Page 11 of 40
ACR38x – Reference Manual info@acs.com.hk
Version 6.02
www.acs.com.hk
8.0. Memory Card Type Selection
8.1. By Property Sheet
User could invoke the reader setting property sheet by selecting the Properties of ACR38 Smart Card
Reader device under the Device Manager.
Figure 1: ACR38x Reader Setting Property Sheet
The ACR38x needs to be removed, and then reconnected to the computer in order for the change to
take effect.
8.2. By Programmatic Method
The card type can also be changed the program run-time using Vendor Specific extension API of
PC/SC.
Application programs are required to include the following MACRO in one of the source header file:
Applications should connect to PC/SC using the SCARD_SHARE_DIRECT protocol. After which,
invoke the SCardControl() and use IOCTL_SMARTCARD_SET_CARD_TYPE for the dwControlCode
parameter to inform the driver of new card type. The input buffer will be a LONG variable storing the
desired card type. The return value is either SCARD_S_SUCCESS or a WIN32 Error
(ERROR_INSUFFICIENT_BUFFER).
Page 12 of 40
ACR38x – Reference Manual info@acs.com.hk
Version 6.02
www.acs.com.hk
Loading...
+ 28 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.