background image

 

ACR122L – Communication Protocol

 

[email protected] 

Version 1.03 

www.acs.com.hk 

Page 52 of 57

 

 

 

Byte Number 

Page 

Data read/write 

Data8 

Data9 

Data10 

Data11 

Data read/write 

Data12 

Data13 

Data14 

Data15 

Data read/write 

Data16 

Data17 

Data18 

Data19 

Data read/write 

Data20 

Data21 

Data22 

Data23 

Data read/write 

Data24 

Data25 

Data26 

Data27 

10 

Data read/write 

Data28 

Data29 

Data30 

Data31 

11 

Data read/write 

Data32 

Data33 

Data34 

Data35 

12 

Data read/write 

Data36 

Data37 

Data38 

Data39 

13 

Data read/write 

Data40 

Data41 

Data42 

Data43 

14 

Data read/write 

Data44 

Data45 

Data46 

Data47 

15 

Data read/write 

Data48 

Data49 

Data50 

Data51 

16 

Data read/write 

Data52 

Data53 

Data54 

Data55 

17 

Data read/write 

Data56 

Data57 

Data58 

Data59 

18 

Data read/write 

Data60 

Data61 

Data62 

Data63 

19 

Data read/write 

Data64 

Data65 

Data66 

Data67 

20 

Data read/write 

Data68 

Data69 

Data70 

Data71 

21 

Data read/write 

Data72 

Data73 

Data74 

Data75 

22 

Data read/write 

Data76 

Data77 

Data78 

Data79 

23 

Data read/write 

Data80 

Data81 

Data82 

Data83 

24 

Data read/write 

Data84 

Data85 

Data86 

Data87 

25 

Data read/write 

Data88 

Data89 

Data90 

Data91 

26 

Data read/write 

Data92 

Data93 

Data94 

Data95 

27 

Data read/write 

Data96 

Data97 

Data98 

Data99 

28 

Data read/write 

Data100 

Data101 

Data102 

Data103 

29 

Data read/write 

Data104 

Data105 

Data106 

Data107 

30 

Data read/write 

Data108 

Data109 

Data110 

Data111 

31 

Data read/write 

Data112 

Data113 

Data114 

Data115 

32 

Data read/write 

Data116 

Data117 

Data118 

Data119 

33 

Data read/write 

Data120 

Data121 

Data122 

Data123 

34 

Data read/write 

Data124 

Data125 

Data126 

Data127 

35 

Data read/write 

Data128 

Data129 

Data130 

Data131 

36 

Data read/write 

Data132 

Data133 

Data134 

Data135 

37 

Data read/write 

Data136 

Data137 

Data138 

Data139 

38 

Data read/write 

Data140 

Data141 

Data142 

Data143 

39 

Lock 

Lock 

Lock 

40 

16 bit counter 

16 bit counter  16 bit counter 

41 

Summary of Contents for ACR122L

Page 1: ...Subject to change without prior notice info acs com hk www acs com hk Communication Protocol V1 03 ACR122L Serial NFC Reader with LCD...

Page 2: ...I Mode 25 6 5 LCD Display GB Mode 28 6 6 LCD Display Graphic Mode 29 6 7 Scroll Current LCD Display 30 6 8 Pause LCD Scrolling 31 6 9 Stop LCD Scrolling 32 6 10 Clear LCD 32 6 11 LCD Backlight Control...

Page 3: ...able 1 PIN Configuration 5 Table 2 DDRAM Address for Font Sets 1 and 2 25 Table 3 DDRAM Address for Font Set 3 26 Table 4 LCD Character Position Representation 28 Table 5 Scrolling Period 31 Table 6 S...

Page 4: ...tags cards ISO 14443 4 Type A and B Mifare ISO 18092 NFC and FeliCa The major applications supported are the following Access Control Identification Reading the serial numbers of all cards in the fiel...

Page 5: ...o Two line graphic LCD with interactive operability i e scroll up and down left and right etc and multi language support i e Chinese English Japanese and several European languages o Four user control...

Page 6: ...red 2 4 Buzzer A user controllable monotone buzzer with a default state of OFF is provided 2 5 SAM Interface Three SAM sockets supporting ISO 7816 1 2 3 T 0 cards are provided 2 6 Built in Antenna A 3...

Page 7: ...less interface and peripherals are accessed through the use of pseudo APDUs The SAM interface is accessed through the use of standard APDUs Figure 1 Communication Flowchart of ACR122L Serial Interface...

Page 8: ...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...

Page 9: ...ack a positive status frame immediately 02 00 00 03 positive status frame After some processing delay 3 RDR sends back the response of the command 02 80 0D 00 00 00 00 01 00 00 00 3B 2A 00 80 65 24 B0...

Page 10: ...0 65 24 B0 00 02 00 82 90 00 Checksum 03 Note If the frame sent by the HOST is correctly received by the RDR a positive status frame 02 00 00 03 will be sent to the HOST immediately to inform the HOST...

Page 11: ...Format Offset Field Size Value Description 0 bMessageType 1 62h 1 dDwLength LSB MSB 4 00000000h Message specific data length 5 bSlot 1 00 FFh Identifies the slot number for this command Default 00h 6...

Page 12: ...2A 00 80 65 24 B0 00 02 00 82 90 00 Checksum 03 The ATR 3B 2A 00 80 65 24 B0 00 02 00 82 SW1 SW2 90 00 Example 2 To activate the SAM Interface 2 slot 0 default sequence number 1 5 V card HOST 12 62 00...

Page 13: ...command 7 abRFU 3 Reserved for Future Use ACR122L Response Frame Format STX Bulk IN Header RDR_to_HOST_SlotStatus abData Checksum ETX 1 Byte 10 Bytes 0 Byte 1 Byte 1 Byte For SAM Interface 1 STX 02h a...

Page 14: ...HOST 22 63 00 00 00 00 00 02 00 00 00 Checksum 23 RDR 22 00 00 23 RDR 22 81 00 00 00 00 00 02 00 00 00 Checksum 23 5 3 Exchanging data through the SAM Interface ACR122L Command Frame Format STX Bulk O...

Page 15: ...g command 7 bStatus 1 8 bError 1 9 bChainParameter 1 Example 1 To send an APDU 80 84 00 00 08 to the SAM Interface 1 slot 0 default sequence number 3 HOST 02 6F 05 00 00 00 00 03 00 00 00 80 84 00 00...

Page 16: ...3 To send an APDU 80 84 00 00 08 to the SAM Interface 3 slot 0 default sequence number 3 HOST 22 6F 05 00 00 00 00 03 00 00 00 80 84 00 00 08 Checksum 23 RDR 22 00 00 23 RDR 22 80 0A 00 00 00 00 03 0...

Page 17: ...Meaning 1 D4 40 Tg DataOut Tag Exchange Data 2 D4 4A MaxTg BrTy InitiatorData Tag Polling Where Tg A byte containing the logical number of the relevant target This byte also contains the More Informa...

Page 18: ...resents the type of application targeted by the device IC and is used to preselect the PICCs before the ATQB This field is mandatory Polling Method This field is optional It indicates the approach to...

Page 19: ...d rate selected The following information is given for one target it is repeated for each target initialized NbTg times 106 kbps Type A Tg SENS_RES10 2 bytes SEL_RES 1 byte NFCIDLength 1 byte NFCID1 N...

Page 20: ...Meaning Success 90 Current Baud Rate The operation is completed successfully Error 63 00h The operation is failed Where SW2 Current Baud Rate 00h The current baud rate is 9600 bps 01h The current bau...

Page 21: ...02 03 00 4B 02 4F 49 8A 8A 80 08 NFCID2t of the FeliCa Tag 01 01 05 01 86 04 02 02 Status Code returned by the reader 90 00 Example 2 To write 16 bytes data to the FeliCa Tag Tag Write Step 1 Issue a...

Page 22: ...04 02 02 01 09 01 01 80 00 In which Direct Transmit APDU FF 00 00 00 Length of the Tag Command 13 Tag Command InDataExchange D4 40 01 Tag Command Read Data 10 06 01 01 05 01 86 04 02 02 01 09 01 01 8...

Page 23: ...equence number 4 HOST 02 6F 0A 00 00 00 00 04 00 00 00 FF 00 00 00 05 D4 4A 01 03 00 Checksum 03 RDR 02 00 00 03 RDR 02 81 14 00 00 00 00 04 00 00 00 D5 41 01 01 50 00 01 32 F4 00 00 00 00 33 81 81 01...

Page 24: ...by the contactless chip D5 41 00 Response from the Type B Tag 01 02 03 04 05 06 07 08 90 00 Status Code returned by the reader 90 00 6 3 Get firmware version This command is used to derive the firmwar...

Page 25: ...command is used to display the LCD Message in ASCII Mode LCD Display Command Format 5 Bytes LCD Message Length Command Class INS P1 P2 Lc Data In Max 16 Bytes LCD Display FFh Option Byte 68h LCD XY Po...

Page 26: ...9 6A 6B 6C 6D 6E 6F Table 3 DDRAM Address for Font Set 3 Lc LCD Message Length The length of the LCD message max 10h If the message length is longer than the number of characters that the LCD screen c...

Page 27: ...ACR122L Communication Protocol info acs com hk Version 1 03 www acs com hk Page 27 of 57 Figure 3 Character Set B Figure 4 Character Set C...

Page 28: ...14 15 16 DISPLAY POSITION FIRST LINE 00 01 02 03 04 05 06 07 LCD XY POSITION SECOND LINE 40 41 42 43 44 45 46 47 Table 4 LCD Character Position Representation Lc LCD Message Length The length of the L...

Page 29: ...tes LCD Message Length Command Class INS P1 P2 Lc Data In max 128 Bytes LCD Display FFh 00h 6Ah Line Index Pixel Data Length Pixel Data Where P2 Line Index To set which line to start to update the LCD...

Page 30: ...ass INS P1 P2 Lc Data In 6 Bytes Scroll LCD FFh 00h 6Dh 00h 06h Scroll Ctrl Data In Scroll Ctrl Scrolling Control Format 6 Bytes Byte 0 Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 00h 00h 0Fh 1Fh Refresh Speed...

Page 31: ...ode Results SW1 SW2 Meaning Success 90 00h The operation is completed successfully Error 63 00h The operation is failed 6 8 Pause LCD Scrolling This command is used to pause the LCD scrolling that has...

Page 32: ...10 Clear LCD This command is used to clear all contents shown in the LCD Clear LCD Command Format 5 Bytes Command Class INS P1 P2 Lc Clear LCD FFh 00h 60h 00h 00h Data Out SW1 SW2 Status Code Results...

Page 33: ...completed successfully Error 63 00h The operation is failed 6 12 LCD Contrast Control This command is used to control the LCD contrast LCD Contrast Control Command Format 5 Bytes Command Class INS P1...

Page 34: ...W2 Status Code Results SW1 SW2 Meaning Success 90 00h The operation is completed successfully Error 63 00h The operation is failed 6 14 LED Control This command is used to control the four LEDs LED Co...

Page 35: ...ion Control P2 LED State Control LED_0 LED_1 and Buzzer Control Format 1 Byte CMD Item Description Bit 0 Final LED_1 State 1 On 0 Off Bit 1 Final LED_0 State 1 On 0 Off Bit 2 LED_1 State Mask 1 Update...

Page 36: ...ription Bit 0 Current LED_1 LED 1 On 0 Off Bit 1 Current LED_0 LED 1 On 0 Off Bits 2 7 Reserved Notes 1 The LED State operation will be performed after the LED Blinking operation is completed 2 The LE...

Page 37: ...turn on LED_0 and LED_1 Assume both LED_0 and LED_1 are OFF initially Not linked to the buzzer APDU FF 00 40 0F 04 00 00 00 00 Response 90 03 LED_0 and LED_1 are ON To turn off both LED_0 and LED_1 A...

Page 38: ...ration 0 ms 00h Number of repetition 01h Link to Buzzer 01h APDU FF 00 40 50 04 14 00 01 01 Response 90 02 Example 5 To make LED_1 blink of 1 Hz for 3 times After that resume to initial state Assume t...

Page 39: ...1h APDU FF 00 40 50 04 05 05 03 01 Response 90 02 Example 6 To make LED_1 and LED_0 blink of 1 Hz for 3 times Assume both the LED_0 and LED_1 are initially OFF Both Initial LED_0 and LED_1 Blinking St...

Page 40: ...ED_1 and LED_0 blink in turn of 1 Hz for 3 times Assume both LED_0 and LED_1 LEDs are initially OFF The Initial LED_1 Blinking State is ON The Initial LED_0 Blinking States is OFF The buzzer will turn...

Page 41: ...successfully Error 63 00h The operation is failed 6 17 Basic program flow for ISO 14443 4 Type A and B tags Typical sequence may be 1 Scan the tags in the field Polling with the correct parameter Type...

Page 42: ...00 HOST_to_RDR_XfrBlock Format HOST FF 00 00 00 05 D4 4E 01 02 02 Checksum 03 Change to Baud Rate 424 kbps OR HOST FF 00 00 00 05 D4 4E 01 01 01 Checksum 03 Change to Baud Rate 212 kbps RDR 02 00 00...

Page 43: ...am flow for Mifare applications Typical sequence may be 1 Scanning the tags in the field Polling 2 Authentication 3 Read Write the memory of the tag 4 Halt the tag optional Step 1 Polling for the MIFA...

Page 44: ...00 00 0F D4 40 01 61 04 FF FF FF FF FF FF F6 8E 2A 99 Checksum 03 Step 3 Read the content of Block 04 02 6F 0A 00 00 00 00 01 00 00 00 FF 00 00 00 05 D4 40 01 30 04 Checksum 03 02 00 00 03 02 80 05 0...

Page 45: ...the storage address of a block Optional Example Value 100 decimal 64 Hex assume Block 05h The formatted value block 64 00 00 00 9B FF FF FF 64 00 00 00 05 FA 05 FA Step 1 Update the content of Block...

Page 46: ...the value 101 dec Step 5 Copy the value of Block 05 to Block 06 dec 02 6F 0A 00 00 00 00 01 00 00 00 FF 00 00 00 05 D4 40 01 C2 05 Checksum 03 02 00 00 03 02 80 05 00 00 00 00 01 00 00 00 D5 41 00 90...

Page 47: ...L_RES 00 Length of the UID 7 UID 04 6E 0C A1 BF 02 84 Operation Finished 90 00 Step 2 Read the content of Page 04 HOST 02 6F 0A 00 00 00 00 01 00 00 00 HOST FF 00 00 00 05 D4 40 01 30 04 Checksum 03 R...

Page 48: ...12 ZEROS are for padding Only the page 4 4 bytes is updated even through 16 byte are sent to the reader Step 4 Read the content of Page 04 again HOST 02 6F 0A 00 00 00 00 01 00 00 00 HOST FF 00 00 00...

Page 49: ...r 01 SENS_RES 00 44 SEL_RES 00 Length of the UID 7 UID 04 6E 0C A1 BF 02 84 Operation Finished 90 00 Byte Number 0 1 2 3 Page Serial Number SN0 SN1 SN2 BCC0 0 Serial Number SN3 SN4 SN5 SN6 1 Internal...

Page 50: ...89 61 24 90 00 Checksum 03 In which 3DES reply from the card 06 78 53 80 68 89 61 24 Operation Finished 90 00 Note The 3DES reply from the card should be checked to make sure the card is legitimate St...

Page 51: ...content of Page 04 again HOST 02 6F 0A 00 00 00 00 01 00 00 00 HOST FF 00 00 00 05 D4 40 01 30 04 Checksum 03 RDR 02 00 00 03 Waiting the Tag RDR 02 80 15 00 00 00 00 01 01 00 00 RDR D5 41 00 AA BB CC...

Page 52: ...7 20 Data read write Data68 Data69 Data70 Data71 21 Data read write Data72 Data73 Data74 Data75 22 Data read write Data76 Data77 Data78 Data79 23 Data read write Data80 Data81 Data82 Data83 24 Data re...

Page 53: ...tep 0 Start the application The first thing is to activate the SAM Interface The ATR of the SAM if a SAM is inserted or a Pseudo ATR 3B 00 if no SAM is inserted will be returned In other words the SAM...

Page 54: ...ess 08 Block 1 Byte 0 HOST 02 6F 0A 00 00 00 00 01 00 00 00 FF 00 00 00 05 D4 40 01 01 08 Checksum 03 RDR 02 00 00 03 02 80 06 00 00 00 00 01 01 00 00 D5 41 00 18 90 00 Checksum 03 In which Response D...

Page 55: ...0 00 00 00 01 01 00 00 D5 41 00 90 00 Checksum 03 In which Command 58 Starting memory address 08 Number of write content 02 Memory content AA BB Step 4 Deselect the tag HOST 02 6F 08 00 00 00 00 01 00...

Page 56: ...nna drivers 0Eh Internal buffer overflow 10h Invalid parameter range format etc 12h DEP Protocol The chip configured in target mode does not support the command received from the initiator the command...

Page 57: ...acs com hk Version 1 03 www acs com hk Page 57 of 57 Error Code Error 2Ch Mismatch between the NFCID3 initiator and the NFCID3 target in DEP 212 424 kbps passive 2Dh An over current event has been de...

Reviews: