ACR31 Swipe Card Reader Reference Manual V1.00 Subject to change without prior notice info@acs.com.hk www.acs.com.
Table of Contents 1.0. Introduction ............................................................................................................. 3 2.0. Features ................................................................................................................... 4 3.0. System Block Design .............................................................................................. 5 4.0. Hardware Design ..................................................................................
1.0. Introduction The ACR31 Swipe Card Reader serves as an interface for the communication between a mobile device and a magnetic stripe card. Different types of magnetic cards have different commands and communication protocols, and the ACR31 establishes a uniform interface from the mobile device to the magnetic card. The ACR31 is connected to the mobile device through a 3.5-mm audio jack interface.
2.0. Features • 3.5-mm Audio Jack Interface • Powered by a CR2016 battery • Reads up to two tracks of card data • Capable of bi-directional reading • Supports AES-128 encryption algorithm • Magnetic Stripe Card Reader: o Supports ISO 7810/7811 magnetic cards o Supports Hi-coercivity and Low-coercivity magnetic cards o Supports JIS1 and JIS2 • Supports Android™ 2.3 and above* • Supports iOS 5.
3.0. System Block Design The system block design of ACR31 is depicted below: ISO7810/7811 Magnetic Head Magnetic Stripe Decoder IC Audio Jack Power Management MCU Mobile Device Battery ACR31 Figure 1: System Block Diagram Page 5 of 19 ACR31 – Reference Manual Version 1.00 info@acs.com.hk www.acs.com.
4.0. Hardware Design 4.1. Battery ACR31 is using a CR2016 battery which has a capacity of 90 mAh. 4.2. Audio Channel 4.2.1. Communication Parameters ACR31 is connected to a mobile device through Audio Channel. Pin Signal Function 1 Left 2 Right Reset signal to ACR31 3 GND GND 4 MIC Transmit the data to smart phone Transmit the data to ACR31 Table 1: 3.5mm Audio Socket Wiring 4.3.
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.
6.0. Commands 6.1. SPH_to_RDR_Reset This reset command will not send any message to ACR31. Instead, the mobile device will generate several pulses in the right channel of the audio jack that will trigger the ACR31 to perform a hardware reset. This is the only way to resume the normal operation of ACR31 after it has entered the sleep mode. No response will be generated for this command. Page 8 of 19 ACR31 – Reference Manual Version 1.00 info@acs.com.hk www.acs.com.
6.2. SPH_to_RDR_Sleep This command is used to force the ACR31 to enter sleep mode immediately upon receiving this command. Offset Field Size Value 0 bStartByte 1 23h 1 wLength 2 0003h 3 bMessageType 1 63h 4 wCheckSum 2 Description Encrypted Message start byte. Number of extra bytes starting from the next field for this message. No CRC16 checksum for all the preceding fields. The response to this message is RDR_to_SPH_ACK. Page 9 of 19 ACR31 – Reference Manual Version 1.
6.3. SPH_to_RDR_FirmwareVersion This command is used to retrieve the firmware version string from ACR31. Offset Field Size Value 0 bStartByte 1 23h 1 wLength 2 0003h 3 bMessageType 1 6Fh 4 wCheckSum 2 Description Encrypted Message start byte. Number of extra bytes starting from the next field for this message. No CRC16 checksum for all the preceding fields. When there is no error, the response to this message is RDR_to_SPH_FirmwareVersion.
6.4. SPH_to_RDR_GetStatus This command is used to request ACR31 to give a feedback of the current device status to the mobile device. Offset Field Size Value 0 bStartByte 1 23h 1 wLength 2 0003h 3 bMessageType 1 6Eh 4 wCheckSum 2 Description Encrypted Message start byte. Number of extra bytes starting from the next field for this message. No CRC16 checksum for all the preceding fields. When there is no error, the response to this message is RDR_to_SPH_GetStatus.
6.5. SPH_to_RDR_SetSleepTimeout This command is used to request ACR31 to change the sleep timeout value to the one specified. Offset Field Size Value 0 bStartByte 1 23h 1 wLength 2 0004h 3 bMessageType 1 6Ch Description Encrypted Message start byte. Number of extra bytes starting from the next field for this message. No 4 bTimeout 1 Sleep timeout value in seconds. This value should be in the range of 4 – 20. Other values are not allowed.
6.6. RDR_to_SPH_GetStatus This message is sent by ACR31 in response to the command message SPH_to_RDR_GetStatus. Offset Field Size Value 0 bStartByte 1 23h 1 wLength 2 0006h 3 bMessageType 1 80h Description Encrypted Message start byte. Number of extra bytes starting from the next field for this message. 00h – Battery Level ≥ 3.0V 01h – 2.9 ≤ Battery Level < 3.0 V 02h – 2.8 ≤ Battery Level < 2.9 V 03h – 2.7 ≤ Battery Level < 2.8 V 4 bBatteryLevel 1 04h – 2.6 ≤ Battery Level < 2.
6.7. RDR_to_SPH_FirmwareVersion This message is sent by ACR31 in response to the command message SPH_to_RDR_FirmwareVersion. Offset Field Size Value 0 bStartByte 1 23h 1 wLength 2 000Fh Description Encrypted Message start byte. Number of extra bytes starting from the next field for this message. 3 bMessageType 1 4 abFirmwareVersion 12 Firmware version string. 16 wCheckSum 2 CRC16 checksum for all the preceding fields. No 81h Page 14 of 19 ACR31 – Reference Manual Version 1.
6.8. RDR_to_SPH_TrackData This message is sent by ACR31 when it detects the swiping of card and transfers Track 1 and Track 2 data to the mobile device. There is no need for the mobile device to send any command message to ACR31 to retrieve the card data. This message is sent automatically from ACR31 to the mobile device once a card swipe action is performed and thus is known as an interrupt message.
Offset Field Size Value Description Encrypted Track 2 error register. 135 bTrack2Error 1 136 wCheckSum 2 If the MSB is set, It is an error code. Otherwise, it is error-free. CRC16 checksum for all the preceding fields. Page 16 of 19 ACR31 – Reference Manual Version 1.00 info@acs.com.hk www.acs.com.
6.9. RDR_to_SPH_ACK This acknowledgement message is sent by ACR31 to the mobile device specifying the acceptance of certain command messages. This message also includes the error code whenever appropriate. Offset Field Size Value 0 bStartByte 1 23h 1 wLength 2 0004h 3 bMessageType 1 82h 4 bErrorCode 1 Description Encrypted Message start byte. Number of extra bytes starting from the next field for this message. Specify the error code for the previously processed command message.
Appendix A. Track Data Error Code Bit 7 MSB MSB Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 0 0 0 0 LRC error End Sentinel error Bit 0 LSB Start Sentinel error Bits 7 to 1 are error codes. Error-free = 0 Page 18 of 19 ACR31 – Reference Manual Version 1.00 info@acs.com.hk www.acs.com.
Appendix B. System Error Codes The following table lists all the system error codes and their corresponding description for ACR31. Error Code Status 00h ERROR_SUCCESS FFh ERROR_INVALID_CMD FEh ERROR_INVALID_PARAM FDh ERROR_INVALID_CHECKSUM FCh RROR_INVALID_STARTBYTE FBh ERROR_UNKNOWN Page 19 of 19 ACR31 – Reference Manual Version 1.00 info@acs.com.hk www.acs.com.