Communication protocol, Audio channel message – ACS ACR31 Swipe Card Reader User Manual
Page 7
ACR31 – Reference Manual
Version 1.00
www.acs.com.hk
Page 7 of 19
5.0. Communication Protocol
ACR31 is a slave device and almost all operations are initiated by the mobile device. The mobile
device that sends the command is carried out in the form of successive command request-response
exchange. Additionally, the new request message should wait until previous response message has
been received (except interrupted by the RDR_to_SPH_TrackData interrupt message).
ACR31 will communicate with a mobile device through its audio jack interface. The communication
channel is bi-directional, with the reader sending data to the mobile device through the MIC pin of the
audio jack while the mobile device sending commands to the reader through the Left-Channel of the
audio jack.
While it’s not operating, the ACR31 will remain in deep sleep mode. Upon receiving a wake up signal
from the mobile device through the Right-Channel of the audio jack, the ACR31 will wake up. ACR31
will then wait for the swipe of the magnetic stripe card or any command message sent by the mobile
device within a timeout limit. After successfully obtaining the data from the swiped card, the ACR31
will perform AES-128 encryption on the received card data and send back the encrypted data to the
mobile device in communication. If the reader fails to obtain a card swipe or command message
within the timeout limit, the ACR31 will go back to deep sleep mode to save battery power.
Before the communication protocol between the ACR31 and the mobile device employ a direct signal
feeding, the signal received from the ACR31 will be passing through a DC offset cancellation filter.
The data to be transmitted will be encoded using the Manchester coding scheme (conforms to IEEE
802.3), with the clock frequency used in the Manchester coding scheme being set at 2.756 kHz. Since
the data transmission speed in the Manchester coding scheme always matches the clock speed, a
maximum baud rate of around 2.756 kbps could be achieved.
The signal interpretation on the mobile device and ACR31 is based on sampling the corresponding
input waveforms. The sampling frequency should be at least double the clock frequency (Nyquist
rate) used in the Manchester coding scheme. After sampling the signals, the data encoded in the
signals could be received by determining the logical zero-crossing time.
5.1. Audio Channel Message
All messages between ACR31 and the mobile device consist of a header containing a frame start byte
(1 byte), a length field (2 bytes) and a message type indicator (1 byte). There is 2-byte CRC at the
end of each message for error detection. The card data will be encrypted using AES-128 encryption
algorithm.
Below list all the messages that would appear between the communications of ACR31 and the mobile
device:
Send-Out Message
Code
Send-In Message
Code
SPH_to_RDR_Reset
N/A
RDR_to_SPH_GetStatus
80h
SPH_to_RDR_Sleep
63h
RDR_to_SPH_FirmwareVersion
81h
SPH_to_RDR_FirmwareVersion
6Fh
RDR_to_SPH_ACK
82h
SPH_to_RDR_GetStatus
6Eh
SPH_to_RDR_SetSleepTimeout
6Ch
Interrupt-In Message
Code
RDR_to SPH_TrackData
50h