ACR122S – Communication Protocol
Version 2.01
www.acs.com.hk
Page 8 of 57
4.0. Serial Interface (CCID-like Frame Format)
Note:
Communication setting: 9600 bps, 8-N-1.
The communication protocol between the host and ACR122S is very similar to the CCID protocol.
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
Status Frame Format
STX (02h) Status Checksum ETX (03h)
1 Byte
1 Byte
1 Byte
1 Byte
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}
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 ACR122S.
The SAM interface must be activated in order to use the contactless interface and peripherals. In
short, all the APDUs are exchanged through the SAM interface.
Similarly, two types of Bulk-IN Header are used:
•
RDR_to_HOST_DataBlock:
In response to the HOST_to_RDR_IccPowerOn and
HOST_to_RDR_XfrBlock Frames.
•
RDR_to_HOST_SlotStatus:
In response to the HOST_to_RDR_IccPowerOff Frame.
RDR = ACR122S; HOST = Host Controller
HOST_to_RDR = Host Controller -> ACR122S
RDR_to_HOST = ACR122S -> Host Controller