ACR122L-USB-ACS Design Specification ACR1222L-D1
Revision History ACR122L-USB-ACS Version Date Prepared By V1.00 2010-6-24 Nathan.Li, Kit Au V1.
Table of Contents ACR122L-USB-ACS Table of Contents ............................................................................................................... 3 1.0. Introduction ............................................................................................................. 5 2.0. Feature..................................................................................................................... 5 3.0. Hardware Interfaces.....................................................
6.4.3. Escape APDU for LEDs Control................................................................................. 39 6.4.4. Escape APDU for Buzzer Control .............................................................................. 40 6.4.5. Escape APDU for Store Data one at Reader ............................................................. 40 6.4.6. Escape APDU for Store Data two at Reader ............................................................. 41 6.4.7.
1.0. Introduction The ACR122L-USB is a module for accessing both contact and contactless cards with LCD Display. It can support 3 SAMs access and ISO14443 Part1 - 4 Type A & B, MIFARE, FeliCa and NFC tags. 2.0. Feature ISO 7816 Parts 1-4 Compliant for SAM Socket. ISO 14443 Parts 1-4 Compliant for Contactless Smart Card Interface. Support ISO14443 Part 4 Type A & B, MIFARE, FeliCa and NFC tags. Built-in Antenna for contactless tags access. 3 X SAM Interface 4 LEDs. Buzzer.
3.0. Hardware Interfaces ACR122L-USB-ACS 3.1. USB Interface The ACR122L-USB is connected to computer through USB as specified in the USB Specification 2.0. ACR122L-USB is working in Full speed mode, i.e. 12 Mbps. Pin Signal Function 1 VBUS +5V power supply for the reader (~ 200mA) 2 D- Differential signal transmits data between ACR122L-USB and PC. 3 D+ Differential signal transmits data between ACR122L-USB and PC. 4 GND Reference voltage level for power supply 3.2.
ACR122L-USB-ACS 4.0. Implementation 4.1. The ACR122L-USB is built based on the ST221 and PN5321 chips. LCD Buzzer &LED1 &LED2 &LED3 &LED4 Built-In Antenna PN532 NFC Interface Chip USB2.0 USB ST2211U Host Controller SPI Contactless Interface Carrier=13.
4.2. Communication between the Host and ACR122L-USB-ACS the Contactless interface, SAM and Peripherals. The Contactless interface & Peripherals are accessed through the use of Pseduo-APDUs. The SAM interface are accessed through the use of standard APDUs.
5.0. Firmware Upgrade ACR122L-USB-ACS 5.1. With Press FW Key Step 1: Unplug the USB Cable from the PC. Step 2: Press and Hold the FW Key Step3: Plug the USB Cable to the PC. Step 4: The USB Mass Storage Device can be found in Device Manager, release the FW Key Step 5: Execute the Firmware Upgrade Program: “FW Upgrade Tool.exe” Step 6: Pressing the “Load BIN” Button.
Step 7: Pressing the “Start Program” Button. ACR122L-USB-ACS The firmware is being uploaded to the reader The firmware upgrade is completed. Step 8: Close the plastic covers. After that, reconnect the USB cord. Noted: If the upgrade firmware “fail”, please repeat do from steps 3 to 7.
5.2. Without Press FW Key ACR122L-USB-ACS Step 1: Plug the USB Cable from the PC. Step 2: Send EscapeCommand for Enter FW upgrade mode Command = {E0 00 00 E0 00}. Response = {E1 00 00 00 01 “Status”} Step 3: The USB Mass Storage Device can be found in Device Manager, release the FW Key Step 4: Execute the Firmware Upgrade Program: “FW Upgrade Tool.exe” Step 5: Pressing the “Load BIN” Button.
Step 6: Pressing the “Start Program” Button. ACR122L-USB-ACS The firmware is being uploaded to the reader The firmware upgrade is completed. Step 7: Close the plastic covers. After that, reconnect the USB cord. Noted: If the upgrade firmware “fails”, please using “5.
Pseudo APDUs for Contactless Interface and Peripherals Control ACR122L-USB-ACS 6.0. PICC Interface Description 6.1. ATR Generation If the reader detects a PICC, an ATR will be sent to the PCSC driver for identifying the PICC. 1.1 ATR format for ISO 14443 Part 3 PICCs. Byte Value Designation Description (Hex) 0 3B Initial Header 1 8N T0 Higher nibble 8 means: no TA1, TB1, TC1 only TD1 is following.
ACR122L-USB-ACS Card Name (C0 .. C1) 00 01: Mifare 1K 00 02: Mifare 4K 00 03: Mifare Ultralight 00 26: Mifare Mini F0 04: Topaz and Jewel F0 11: FeliCa 212K F0 12: FeliCa 424K FF [SAK]: undefined tags 1.2 ATR format for ISO 14443 Part 4 PICCs. Byte Value Designation Description (Hex) 0 3B Initial Header 1 8N T0 Higher nibble 8 means: no TA1, TB1, TC1 only TD1 is following.
ACR122L-USB-ACS Hint: Use the APDU “FF CA 01 00 00” to distinguish the ISO14443A-4 and ISO14443B-4 PICCs, and retrieve the full ATS if available. ISO14443A-3 or ISO14443B-3/4 PICCs do have ATS returned. APDU Command = FF CA 01 00 00 APDU Response = 06 75 77 81 02 80 90 00 ATS = {06 75 77 81 02 80} E.g 2. ATR for ST19XRC8E = { 3B 8C 80 01 50 12 23 45 56 12 53 54 4E 33 81 C3 55} // 12 bytes of ATQB, No CRC-B ATQB = {50 12 23 45 56 12 53 54 4E 33 81 C3} 6.2.
Status Code returned by the reader. ACR122L-USB-ACS Table 1.0C: Status Code Results SW1 SW2 Meaning Success 90 00 The operation is completed successfully. Error 63 00 The operation is failed. Checksum Error 63 27 The checksum of the Response is wrong. 6.2.2. Direct Transmit via ScardControl Command = {E0 00 00 24 XX “PN532_TAG Command”} Response = {E1 00 00 00 YY “PN532_TAG Response”} XX = Length of the “PN532_TAG Command” YY= Length of the “PN532_TAG Response” 6.3.
0 = No ACR122L-USB-ACS change Bit 4 Initial LED_1 Blinking State 1 = On; 0 = Off Bit 5 Initial LED_0 Blinking State 1 = On; 0 = Off Bit 6 LED_1 Blinking Mask 1 = Blink 0 = Not Blink Bit 7 LED_0 Blinking Mask 1 = Blink 0 = Not Blink Data In: Blinking Duration Control Table 2.
ACR122L-USB-ACS Remark: 1. The LED State operation will be performed after the LED Blinking operation is completed. 2. The LED will not be changed if the corresponding LED Mask is not enabled. 3. The LED will not be blinking if the corresponding LED Blinking Mask is not enabled. Also, the number of repetition must be greater than zero. 4. T1 and T2 duration parameters are used for controlling the duty cycle of LED blinking and Buzzer Turn-On duration. For example, if T1=1 and T2=1, the duty cycle = 50%.
Example 1: To read the existing LED State. ACR122L-USB-ACS // Assume both LED_0 and LED_1 are OFF initially // // Not link to the buzzer // APDU = “FF 00 40 00 04 00 00 00 00” Response = “90 00”. LED_0 and LED_1 LEDs are OFF. Example 2: To turn on LED_0 and LED_1 // Assume both LED_0 and LED_1 are OFF initially // // Not link to the buzzer // APDU = “FF 00 40 0F 04 00 00 00 00” Response = “90 03”.
ACR122L-USB-ACS Example 4: To turn on the LED_1 for 2 sec. After that, resume to the initial state // Assume the LED_1 is initially OFF, while the LED_0 is initially ON. // // The LED_1 and buzzer will turn on during the T1 duration, while the LED_0 will turn off during the T1 duration.
ACR122L-USB-ACS 1Hz = 1000ms Time Interval = 500ms ON + 500 ms OFF T1 Duration = 500ms = 0x05 T2 Duration = 500ms = 0x05 Number of repetition = 0x03 Link to Buzzer = 0x01 APDU = “FF 00 40 50 04 05 05 03 01” Response = “90 02” Example 6: To blink the LED_1 and LED_0 of 1Hz for 3 times // Assume both the LED_0 and LED_1 are initially OFF.
// The buzzer will turn on during the T1 duration// ACR122L-USB-ACS LED_1 On LED_1 Off T1 500ms = T2 500ms = LED_0 On LED_0 Off Buzzer On Buzzer Off 1Hz = 1000ms Time Interval = 500ms ON + 500 ms OFF T1 Duration = 500ms = 0x05 T2 Duration = 500ms = 0x05 Number of repetition = 0x03 Link to Buzzer = 0x01 APDU = “FF 00 40 D0 04 05 05 03 01” Response = “90 00”
6.3.2. Pseudo APDU for LEDs Control Enable ACR122L-USB-ACS This APDU is used to set the LEDs Control Enable/ Disable by user. Default “Disable”, the LED perform by the firmware Table 3.0A: Clear LCD Command Format (5 Bytes) Command Class INS P1 P2 Lc LED Control 0xFF 0x00 0x43 bLEDCtrl 0x00 P2: bLEDCtrl (1 Byte) CMD Description 0x00 Disable LEDs Control by user 0xFF Enable LEDs Control by user Data Out: SW1 SW2. Table 3.
ACR122L-USB-ACS Data Out: SW1 SW2. Table 4.0B: Status Code Results SW1 SW2 Meaning Success 90 00 The operation is completed successfully. Error 63 00 The operation is failed. 6.3.4. Pseduo APDU for Buzzer Control This APDU is used to control Buzzer Table 5.0A: Buzzer Control Command Format (5 Bytes) Command Class INS P1 P2 Lc Data In (3 Bytes) Buzzzer Control 0xFF 0x00 0x42 0x00 0x03 Buzzer Control Data In: Buzzer Control Table 5.
6.3.5. Pseudo APDU for Clear LCD ACR122L-USB-ACS This APDU is used to clear all content show on the LCD Table 6.0A: Clear LCD Command Format (5 Bytes) Command Class INS P1 P2 Lc Clear LCD 0xFF 0x00 0x60 0x00 0x00 Data Out: SW1 SW2. Table 6.0B: Status Code Results SW1 SW2 Meaning Success 90 00 The operation is completed successfully. Error 63 00 The operation is failed.
ACR122L-USB-ACS 6.3.6. Pseudo APDU for LCD Display (ASCII Mode) This APDU is used to Display LCD Message in ASCII Mode Table 7.0A: LCD Display Command Format (5 Bytes + LCD Message Length) Command Class INS P1 P2 Lc Data In (Max.
Data In: LCD Message ACR122L-USB-ACS The data to be sent to LCD, maximum 16 Character for each line Please follow the Fonts tables (selected by INS Bit 4 - 5) below for the LCD Character Index Remarks: Size of the Characters in Fonts Set A and Fonts Set B is 8x16, but size of the Characters in Fonts Set C is 8x8 Character Set A Character Set B Character Set C Data Out: SW1 SW2. Table 7.0B: Status Code Results SW1 SW2 Meaning Success 90 00 The operation is completed successfully.
Please follow the DDRAM table below for the LCD character position’s representation ACR122L-USB-ACS 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 FIRST LINE 00 01 02 03 04 05 06 07 SECOND LINE 40 41 42 43 44 45 46 47 DISPLAY POSITION LCD XY POSITION Lc: LCD Message Length The length of the LCD message (max.
X-axis Line Index ACR122L-USB-ACS 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 … … 0x1F Data Out: SW1 SW2. Table 9.0B: Status Code Results SW1 SW2 Meaning Success 90 00 The operation is completed successfully. Error 63 00 The operation is failed. 6.3.9. Pseudo APDU for Scrolling LCD Current Display This APDU is used to set scrolling feature of the Current LCD Display Table 10.
ACR122L-USB-ACS 0x05 0x06 0x07 0x08 0x09 … … 0x1F Scrolling Range (Horizontal): How many 8 pixels in Horizontal after X position will be scrolled Scrolling Range (vertical): How many pixels in Vertical after Y position will be scrolled Refresh Speed Ctrl: Bit0~Bit3 – how many pixel move pre scrolling Bit4~Bit7 – Scrolling period Bit7 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 Bit6 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 Bit5 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 Bit4 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Scrolling period 1 Unit 3
Error 6.3.10. 63 00 ACR122L-USB-ACS The operation is failed. Pseudo APDU for Pause LCD Scrolling This APDU is used to Pause the LCD Scrolling set before To resume the scrolling, send again the scrolling LCD command (5.10) to perform Table 11.0A: Pause Scrolling Command Format (5 Bytes) Command Class INS P1 P2 Lc Clear LCD 0xFF 0x00 0x6E 0x00 0x00 Data Out: SW1 SW2. Table 11.0B: Status Code Results SW1 SW2 Meaning Success 90 00 The operation is completed successfully.
ACR122L-USB-ACS Command Class INS P1 P2 Lc LCD Contrast Control 0xFF 0x00 0x6C Contrast Control 0x00 P2: Contrast Control The value range is between 0x00 to 0x0F. It is as large as brighten on contrast. Otherwise the contrast will been darken. Data Out: SW1 SW2. Table 13.0B: Status Code Results SW1 SW2 Meaning Success 90 00 The operation is completed successfully. Error 63 00 The operation is failed. 6.3.13.
6.4. Escape APDU for Peripherals Control ACR122L-USB-ACS All the command is the same as Part 5.3 for Terminal Application Layer, but the command is sent by Escape APDU. 6.4.1. Escape APDU for LEDs and Buzzer Control This APDU is used to control the states of the LED_0, LED_1 and Buzzer. Table 2.
0x01: The buzzer will turn on during the T1 Duration ACR122L-USB-ACS 0x02: The buzzer will turn on during the T2 Duration 0x03: The buzzer will turn on during the T1 and T2 Duration. Data Out: SW1 SW2. Status Code returned by the reader. Table 2.0D: Status Code Results SW1 SW2 Meaning Success 90 Current LED State The operation is completed successfully. Error 63 00 The operation is failed. Table 3.
Example 1: To read the existing LED State. ACR122L-USB-ACS // Assume both LED_0 and LED_1 are OFF initially // // Not link to the buzzer // APDU = “FF 00 40 00 04 00 00 00 00” Response = “90 00”. LED_0 and LED_1 LEDs are OFF. Example 2: To turn on LED_0 and LED_1 // Assume both LED_0 and LED_1 are OFF initially // // Not link to the buzzer // APDU = “FF 00 40 0F 04 00 00 00 00” Response = “90 03”.
ACR122L-USB-ACS Example 4: To turn on the LED_1 for 2 sec. After that, resume to the initial state // Assume the LED_1 is initially OFF, while the LED_0 is initially ON. // // The LED_1 and buzzer will turn on during the T1 duration, while the LED_0 will turn off during the T1 duration.
ACR122L-USB-ACS 1Hz = 1000ms Time Interval = 500ms ON + 500 ms OFF T1 Duration = 500ms = 0x05 T2 Duration = 500ms = 0x05 Number of repetition = 0x03 Link to Buzzer = 0x01 APDU = “FF 00 40 50 04 05 05 03 01” Response = “90 02” Example 6: To blink the LED_1 and LED_0 of 1Hz for 3 times // Assume both the LED_0 and LED_1 are initially OFF.
// The buzzer will turn on during the T1 duration// ACR122L-USB-ACS LED_1 On LED_1 Off = T2 500ms T1 500ms = LED_0 On LED_0 Off Buzzer On Buzzer Off 1Hz = 1000ms Time Interval = 500ms ON + 500 ms OFF T1 Duration = 500ms = 0x05 T2 Duration = 500ms = 0x05 Number of repetition = 0x03 Link to Buzzer = 0x01 APDU = “FF 00 40 D0 04 05 05 03 01” Response = “90 00” 6.4.2. Escape APDU for LEDs Control Enable This APDU is used to set the LEDs Control Enable/ Disable by user.
Success 90 00 ACR122L-USB-ACS The operation is completed successfully. Error 63 00 The operation is failed. 6.4.3. Escape APDU for LEDs Control This APDU is used to control 4 LEDs Table 4.
6.4.4. Escape APDU for Buzzer Control ACR122L-USB-ACS This APDU is used to control Buzzer Table 5.0A: Buzzer Control Command Format (5 Bytes) Command Class INS P1 P2 Lc Data In (3 Bytes) Buzzzer Control 0xFF 0x00 0x42 0x00 0x03 Buzzer Control Data In: Buzzer Control Table 5.0B: Buzzer On/Off Duration Control Format (4 Bytes) Byte 0 Byte 1 Byte 2 T1 Duration T2 Duration On State Off State Number of repetition (Unit = 100ms) (Unit = 100ms) Data Out: SW1 SW2. Table 5.
6.4.6. Escape APDU for Store Data two at Reader ACR122L-USB-ACS This APDU is used to store a data up to 256 byte to the reader. Table 5.0A: Store Data One Command Format (5 Bytes) Command Class INS P1 P2 Lc Buzzzer Control 0xFF 0x00 0x4b 0x00 0x00 Data LenH Data LenL Data data Data LenH : The high byte of the data length Data LenL : The low byte of the data length Data Out: SW1 SW2. Table 5.
ACR122L-USB-ACS 6.4.8. Escape APDU for Read Data two from Reader This APDU is used to store a data up to 256 byte to the reader. Table 5.0A: Store Data two Command Format (5 Bytes) Command Class INS P1 P2 Lc Data LenH Buzzzer Control 0xFF 0x00 0x4d 0x00 0x00 Data LenL Data data Data LenH : The high byte of the data length Data LenL : The low byte of the data length Data Out: Results data data the data return for the reader 6.4.9.
6.4.10. Escape APDU for LCD Display (ASCII Mode) ACR122L-USB-ACS This APDU is used to Display LCD Message in ASCII Mode Table 7.0A: LCD Display Command Format (5 Bytes + LCD Message Length) Command Class INS P1 P2 Lc Data In (Max.
Please follow the Fonts tables (selected by INS Bit 4 - 5) below for the LCD Character Index ACR122L-USB-ACS Remarks: Size of the Characters in Fonts Set A and Fonts Set B is 8x16, but size of the Characters in Fonts Set C is 8x8 Character Set A Character Set B Character Set C Data Out: SW1 SW2. Table 7.0B: Status Code Results SW1 SW2 Meaning Success 90 00 The operation is completed successfully. Error 63 00 The operation is failed.
6.4.11. Escape APDU for LCD Display (GB Mode) This APDU is used to Display LCD Message in GB Mode Table 8.0A: LCD Display Command Format (5 Bytes + LCD Message Length) Command Class INS P1 P2 Lc Data In (Max.
P2: Line Index To set which line to start to update the LCD Display ACR122L-USB-ACS Refer to Below LCD Display Position Lc: Pixel Data Length The length of the pixel data (max.
Y Position: Vertical Start Up Position, Ref to LCD Display Position Below ACR122L-USB-ACS LCD Display Position (Total LCD Size: 128x32): Byte 0x00 (X = 0x00) 7 6 5 4 3 2 1 Byte 0x01 (X = 0x01) 0 7 6 5 4 3 2 1 … 0 … Byte 0x0F (X = 0x0F) 7 6 5 4 3 2 1 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 … … 0x1F Scrolling Range (Horizontal): How many 8 pixels in Horizontal after X position will be scrolled Scrolling Range (vertical): How many pixels in Vertical after Y position will
Data Out: SW1 SW2. Table 10.0C: Status Code ACR122L-USB-ACS Results SW1 SW2 Meaning Success 90 00 The operation is completed successfully. Error 63 00 The operation is failed. 6.4.14. Escape APDU for Pause LCD Scrolling This APDU is used to Pause the LCD Scrolling set before To resume the scrolling, send again the scrolling LCD command (5.10) to perform Table 11.
Command Class INS P1 P2 Lc ACR122L-USB-ACS LCD Contrast Control 0xFF 0x00 0x6C Contrast Control 0x00 P2: Contrast Control The value range is between 0x00 to 0x0F. It is as large as brighten on contrast. Otherwise the contrast will been darken. Data Out: SW1 SW2. Table 13.0B: Status Code Results SW1 SW2 Meaning Success 90 00 The operation is completed successfully. Error 63 00 The operation is failed. 6.4.17.
6.5. Escape APDU for getting the Firmware Version This APUD is used to get the version of the reader ACR122L-USB-ACS Get Firmware Version Command Format (5 Bytes) Command Class INS P1 P2 Le Get Response 0XE0 0x00 0x00 0x18 0x00 Maximum 255 bytes Table 16.
ACR122L-USB-ACS Table 2.1-1d: Response Codes Results SW1 SW2 Meaning Success 90 00 The operation is completed successfully. Warning 62 82 End of UID/ATS reached before Le bytes (Le is greater than UID Length). Error 6C XX Wrong length (wrong number Le: ‘XX’ encodes the exact number) if Le is less than the available UID length. Error 63 00 The operation is failed.
Key (6 Bytes): The key value loaded into the reader. E.g. {FF FF FF FF FF FF} ACR122L-USB-ACS Table 2.1-1b: Load Authentication Keys Response Format (2 Bytes) Response Data Out Result SW1 SW2 Table 2.1-1c: Load Authentication Keys Response Codes Results SW1 SW2 Meaning Success 90 00 The operation is completed successfully. Error 63 00 The operation is failed. Examples: // Load a key {FF FF FF FF FF FF} into the key location 0x00. APDU = {FF 82 00 00 06 FF FF FF FF FF FF} 6.7.2.
Block Number (1 Byte): The memory block to be authenticated. ACR122L-USB-ACS For MIFARE 1K Card, it has totally 16 sectors and each sector consists of 4 consecutive blocks. E.g. Sector 0x00 consists of Blocks {0x00, 0x01, 0x02 and 0x03}; Sector 0x01 consists of Blocks {0x04, 0x05, 0x06 and 0x07}; the last sector 0x0F consists of Blocks {0x3C, 0x3D, 0x3E and 0x3F}.
Sectors Data Blocks Trailer Block (Total 32 sectors. Each sector consists of 4 consecutive blocks) (3 blocks, 16 bytes per block) Sector 0 0x00 ~ 0x02 0x03 Sector 1 0x04 ~ 0x06 0x07 Sector 30 0x78 ~ 0x7A 0x7B Sector 31 0x7C ~ 0x7E 0x7F Sectors Data Blocks Trailer Block (Total 8 sectors.
Serial Number SN3 SN4 SN5 SN6 1 Internal / Lock BCC1 Internal Lock0 Lock1 OTP OPT0 OPT1 OTP2 OTP3 3 Data read/write Data0 Data1 Data2 Data3 4 Data read/write Data4 Data5 Data6 Data7 5 Data read/write Data8 Data9 Data10 Data11 6 Data read/write Data12 Data13 Data14 Data15 7 Or Data read/write Data16 Data17 Data18 Data19 8 64 bytes Data read/write Data20 Data21 Data22 Data23 9 Data read/write Data24 Data25 Data26 Data27 10 Data read/write Data28 D
6.7.3. Read Binary Blocks The “Read Binary Blocks command” is used for retrieving a multiple of “data blocks” from the PICC. The data block/trailer block must be authenticated first before executing the “Read Binary Blocks command”. Table 2.3-1a: Read Binary APDU Format (5 Bytes) Command Read Blocks Binary Class INS P1 P2 Le FF B0 00 Block Number Number of Bytes to Read Block Number (1 Byte): The starting block.
// Read 240 bytes starting from the binary block 0x80 (MIFARE 4K) // Block 0x80 to Block 0x8E (15 blocks) ACR122L-USB-ACS APDU = {FF B0 00 80 F0} 6.7.4. Update Binary Blocks The “Update Binary Blocks command” is used for writing a multiple of “data blocks” into the PICC. The data block/trailer block must be authenticated first before executing the “Update Binary Blocks command”. Table 2.
6.7.5. Value Block Related Commands The data block can be used as value block for implementing value-based applications. 6.7.5.1. Value Block Operation The “Value Block Operation command” is used for manipulating value-based transactions. E.g. Increment a value of the value block etc. Table 2.5.1-1a: Value Block Operation APDU Format (10 Bytes) Command Class INS P1 P2 Lc Value Block Operation FF D7 00 Block Number 05 Data In VB_OP VB_Value (4 Bytes) {MSB ..
Success 90 00 The operation successfully. Error 63 00 The operation is failed. 6.7.5.2. is ACR122L-USB-ACS completed Read Value Block The “Read Value Block command” is used for retrieving the value from the value block. This command is only valid for value block. Table 2.5.2-1a: Read Value Block APDU Format (5 Bytes) Command Read Block Value Class INS P1 P2 Le FF B1 00 Block Number 00 Block Number (1 Byte): The value block to be accessed. Table 2.5.
6.7.5.3. ACR122L-USB-ACS Restore Value Block The “Restore Value Block command” is used to copy a value from a value block to another value block. Table 2.5.3-1a: Restore Value Block APDU Format (7 Bytes) Command Class INS P1 P2 Lc Value Block Operation FF D7 00 Source 02 Block Number Data In 03 Target Block Number Source Block Number (1 Byte): The value of the source value block will be copied to the target value block. Target Block Number (1 Byte): The value block to be restored.
ACR122L-USB-ACS
7.0. Basic Program Flow for Contactless Applications ACR122L-USB-ACS Step 0. Start the application. The reader will do the PICC Polling and scan for tags continuously. Once the tag is found and detected, the corresponding ATR will be sent to the PC. Step 1. Connect the “ACR122L PICC Interface” with T=1 protocol. Step 2. Access the PICC by exchanging APDUs. .. Step N. Disconnect the “ACR122L PICC Interface”. Shut down the application.
7.1. How to access PCSC Compliant Tags (ISO14443-4)? Basically, all ISO 14443-4 complaint cards (PICCs) would understand the ISO 7816-4 APDUs. The ACR122L-USB-ACS ACR122L-USB Reader just has to communicate with the ISO 14443-4 complaint cards through exchanging ISO 7816-4 APDUs and Responses. ACR122L-USB will handle the ISO 14443 Parts 1-4 Protocols internally. MIFARE 1K, 4K, MINI and Ultralight tags are supported through the T=CL emulation. Just simply treat the MIFARE tags as standard ISO14443-4 tags.
Typical sequence may be: - Present the Tag and Connect the PICC Interface - Read / Update the memory of the tag Step 1) Connect the Tag The ATR of the tag is 3B 8C 80 01 50 57 26 34 D9 1C 2D 94 11 F7 71 85 76 In which, The ATQB = 50 57 26 34 D9 1C 2D 94 11 F7 71 85. It is an ISO14443-4 Type B tag. Step 2) Send an APDU, Get Challenge. << 00 84 00 00 08 >> 44 70 3D A2 6C DA 43 D5 [90 00] Hint: For ISO14443-4 Type A tags, the ATS can be obtained by using the APDU “FF CA 01 00 00” Website: www.acs.com.
For Example: ISO7816-4 APDU // To read 8 bytes from an ISO 14443-4 TypeA PICC APDU ={80 B2 80 00 08} Class = 0x80 INS = 0xB2 P1 = 0x80 P2 = 0x00 Lc = None Data In = None Le = 0x08 Answer: 01 02 03 04 05 06 07 08 [90 00] Website: www.acs.com.hk Email: info@acs.com.
7.2. How to access DESFIRE Tags (ISO14443-4)? The DESFIRE supports ISO7816-4 APDU Wrapping and Native modes. Once the DESFire Tag is activated, the first APDU sent to the DESFire Tag will determine the “Command Mode”. If the first APDU is “Native Mode”, the rest of the APDUs must be in “Native Mode” format. Similarly, If the first APDU is “ISO7816-4 APDU Wrapping Mode”, the rest of the APDUs must be in “ISO7816-4 APDU Wrapping Mode” format. Example 1: DESFIRE ISO7816-4 APDU Wrapping.
// To get the version of the DESFIRE card. ACR122L-USB-ACS Step 1: Send an APDU {90 60 00 00 00} to get the first frame. INS=0x60 Answer: 04 01 01 01 00 1A 05 91 AF[$91AF] Step 2: Send an APDU {90 AF 00 00 00} to get the second frame. INS=0xAF Answer: 04 01 01 01 00 1A 05 91 AF[$91AF] Step 3: Send an APDU {90 AF 00 00 00} to get the last frame. INS=0xAF Answer: 04 2C 46 71 E6 23 80 CD 64 51 65 60 50 07 91 00[$9100] Example 3: DESFIRE Native Command.
// To get the version of the DESFIRE card. ACR122L-USB-ACS Step 1: Send an APDU {60} to get the first frame. INS=0x60 Answer: AF 04 01 01 01 00 1A 05[$1A05] Step 2: Send an APDU {AF} to get the second frame. INS=0xAF Answer: AF 04 01 01 01 00 1A 05[$1A05] Step 3: Send an APDU {AF} to get the last frame. INS=0xAF Answer: 00 04 2C 46 71 E6 23 80 CD 64 51 65 60 50 07[$5007] Hints: In DESFIRE Native Mode, the status code [90 00] will not be added to the response if the response length is greater than 1.
The ATR = 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 F0 11 00 00 00 00 8A ACR122L-USB-ACS In which, F0 11 = FeliCa 212K Step 2) Read the memory block without using Pseudo APDU. << 10 06 [8-byte NFC ID] 01 09 01 01 80 00 >> 0C 07 01 10 13 00 D9 09 B0 03 01 A6 90 00[$9000] Or Step 2) Read the memory block using Pseudo APDU. << FF 00 00 00 [13] D4 40 01 10 06 [8-byte NFC ID] 01 09 01 01 80 00 In which, [13] is the length of the Pseudo Data “D4 40 01..
ACR122L-USB-ACS The ATR = 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 F0 04 00 00 00 00 9F In which, F0 04 = Topaz Step 2) Read the memory address 08 (Block 1: Byte-0) without using Pseudo APDU << 01 08 >> 18 [90 00] In which, Response Data = 18 Or Step 2) Read the memory address 08 (Block 1: Byte-0) using Pseudo APDU << FF 00 00 00 [05] D4 40 01 01 08 In which, [05] is the length of the Pseudo APDU Data “D4 40 01 01 08” D4 40 01 is the DataExchange Command. 01 08 is the data to be sent to the tag.
Tip: To read all the memory content of the tag ACR122L-USB-ACS << 00 >> 11 49 18 26 .. 00 [90 00] Step 3) Update the memory address 08(Block 1: Byte-0)with the data FF << 53 08 FF >> FF [90 00] In which, Response Data = FF Topaz Memory Map. Memory Address = Block No * 8 + Byte No e.g. Memory Address 08 (hex) = 1 x 8 + 0 = Block 1: Byte-0 = Data0 e.g. Memory Address 10 (hex) = 2 x 8 + 0 = Block 2: Byte-0 = Data8 #please refer to the Jewel and Topaz specification for more detailed information.
ACR122L-USB-ACS 8.0. Basic Program Flow for SAM Applications Step 0. Start the application. The reader will do the PICC Polling and scan for tags continuously. Once the tag is found and detected, the corresponding ATR will be sent to the PC. Step 1. Connect the “ACR122L SAM Interface N( N = 0, 1, 2 )” with T=0 or T=1protocol. Step 2. Access the PICC by exchanging APDUs. .. Step N. Disconnect the “ACR122L SAM Interface N( N = 0, 1, 2 )”. Shut down the application.
8.1.
<<80 A4 00 00 02 55 55 >>91 00[$9000] File name is 55 55 4)Write a date to the file in 3)step <<80 d2 00 00 08 01 02 03 04 05 06 07 08 >>90 00[$9000] 5) Read a date from a file <<80 b2 00 00 08 >>01 02 03 04 05 06 07 08 90 00[$9000] ACR122L-USB-ACS
9.0.
10.0. Technical Specification ACR122L-USB-ACS Universal Serial Bus Interface Power source ....................................... From USB Speed................................................... 12 Mbps (Full Speed) Supply Voltage ..................................... Regulated 5V DC Supply Current ..................................... 250mA (max); 150mA (normal) Contactless Smart Card Interface Standard............................................... ISO 14443 A & B Parts 1-4 Protocol ..................
FCC Caution: Any Changes or modifications not expressly approved by the party responsible for compliance could void the user’s authority to operate the equipment. This device complies with part 15 of the FCC Rules. Operation is subject to the following two conditions: (1) This device may not cause harmful interference, and (2) this device must accept any interference received, including interference that may cause undesired operation.