ACR122L – Communication Protocol
Version 1.03
www.acs.com.hk
Page 8 of 57
4.0. Serial Interface (CCID-like Frame Format)
In normal operation, the ACR122L 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 successive command-
response exchanges. The computer transmits a command to the reader, and then receives a
response from the reader after the command has been executed. A new command can be transmitted
to the ACR122L 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 of the reader and the Card Status Message.
Note:
Communication setting: 115200 bps, 8-N-1.
The communication protocol between the host and ACR122L is very similar to the CCID protocol.
ACR122L Command Frame Format
STX (02h) Bulk-OUT Header
APDU Command or
Parameters
Checksum ETX (03h)
1 Byte
10 Bytes
M Bytes (If applicable)
1 Byte
1 Byte
ACR122L Status Frame Format
STX (02h) Status Checksum ETX (03h)
1 Byte
1 Byte
1 Byte
1 Byte
ACR122L Response Frame Format
STX (02h) Bulk-IN Header APDU Response or abData Checksum ETX (03h)
1 Byte
10 Bytes
N Bytes
(If applicable)
1 Byte
1 Byte
Checksum = XOR {Bulk-OUT Header, APDU Command or Parameters}
Checksum = XOR {Bulk-IN Header, APDU Response or abData}
For control SAM Socket 1, the STX must be equal to 02h and ETX must be equal to 03h.
For control SAM Socket 2, the STX must be equal to 12h and ETX must be equal to 13h.
For control SAM Socket 3, the STX must be equal to 22h and ETX must be equal to 23h.
For control access Contactless interface, Peripherals (i.e. LEDs, LCD and Buzzer), the STX must be
equal to 02h and ETX must be equal to 03h, which is the same with control SAM Socket1.
In general, we would make use of three types of Bulk-OUT Header:
•
HOST_to_RDR_IccPowerOn:
To activate the SAM interface. The ATR of the SAM will be
returned if available.
•
HOST_to_RDR_IccPowerOff:
To deactivate the SAM interface.
•
HOST_to_RDR_XfrBlock:
To exchange APDUs between the host and ACR122L.
The SAM1 interface must be activated in order to use the contactless interface and peripherals. In
short, all the APDUs are exchanged through the SAM interface.