Appendix B...31APDU Command and Response Flow for ISO 14443-Compliant Tags
Appendix C...32APDU Command and Response Flow for ISO 18092-Compliant Tags
.............................................................................................20Current LED State (1 Byte)
............................................................................................20Command Format (5 Bytes)
...........................................................................................20Response Format (10 bytes)
............................................................................................20Command Format (5 Bytes)
...............................................................................................21Response Format (1 byte)
............................................................................................21Command Format (5 Bytes)
...............................................................................................21Response Format (1 byte)
.............................................................21PICC Operating Parameter. Default Value = FF
...............................................................................................23ISO 7816-4 APDU Format
.............................................................23ISO 7816-4 Response Format (Data + 2 Bytes)
..........................................................................23Common ISO 7816-4 Response Codes
AET62 Reference Manual
Document Title Here
Document Title Here
Version 1.00
Document Title Here
Page 4 of 35
info@acs.com.hk
www.acs.com.hk
Page 5
1.0. Introduction
The AET62 is a composite device, consisting ACS’ ACR122U NFC Reader’s core and UPEK’s swipe
fingerprint sensor. The NFC contactless smart card reader and the fingerprint sensor can be used
independently, but combining the two technologies provide a higher level of security in applications.
The AET62’s system diagram is shown below:
Figure 1: AET62 System Block Diagram
The purpose of this document is to describe the architecture and interface of AET62’s contactless
smart card reader module, which is based on the ACR122U core. For information on the architecture
and programming interface of the fingerprint module, please refer to the AET62 Fingerprint Reader
Application Programming Interface document (API_AET62_v1.0).
AET62 Reference Manual
Document Title Here
Document Title Here
Version 1.00
Document Title Here
Page 5 of 35
info@acs.com.hk
www.acs.com.hk
Page 6
2.0. AET62 Contactless Smart Card Reader
The AET62 is a PC-linked contactless smart card reader/writer used for accessing ISO14443-4 Type
A and B, Mifare, ISO 18092 or NFC, and FeliCa tags. The AET62 Smart Card Reader is PCSCcompliant so it is compatible with existing PCSC applications. Furthermore, the standard Microsoft
CCID driver is used to simplify driver installation.
The AET62 serves as the mediating device between the personal computer and the contactless tag
via the USB interface. The reader carries out the command issued from the PC, whether the
command is used in order to communicate with a contactless tag or control the device peripherals (i.e.
bi-color LED).
The AET62 uses the PCSC APDUs for contactless tags following the PCSC Specification and makes
use of pseudo APDUs in sending commands for ISO 18092 tags and controlling the device
peripherals. This document will discuss how you can use the AET62 in your smart card system.
2.1. USB Interface
The AET62 is connected to a computer through USB as specified in the USB Specification 1.1. The
AET62 is working in Full speed mode, i.e. 12 Mbps.
Pin Signal Function
1 V
2 D3 D+
4 GND
BUS
+5V power supply for the reader (Max 200 mA, Normal 100 mA)
Differential signal transmits data between AET62 and PC.
Differential signal transmits data between AET62 and PC.
Reference voltage level for power supply
Table 1: USB Interface
AET62 Reference Manual
Document Title Here
Document Title Here
Version 1.00
Document Title Here
Page 6 of 35
info@acs.com.hk
www.acs.com.hk
Page 7
3.0. Implementation
3.1. Communication Flow Chart of AET62
The Standard Microsoft CCID and PCSC drivers are used. Therefore, no ACS drivers are required
because the drivers are already built inside the windows operating system. You need to modify your
computer’s registry settings to be able to use the full capabilities of the AET62 NFC Reader. See
AET62 PCSC Escape
Command for more details.
3.2. Smart Card Reader Interface Overview
Just click the “Device Manager” to find out the “AET62 PICC Interface”. The standard Microsoft USB
CCID Driver is used.
AET62 Reference Manual
Document Title Here
Document Title Here
Version 1.00
Figure 2: Communication Flow Chart of AET62
Document Title Here
Page 7 of 35
info@acs.com.hk
www.acs.com.hk
Page 8
4.0. PICC Interface Description
4.1. ATR Generation
If the reader detects a PICC, an ATR will be sent to the PCSC driver to identify the PICC.
This ATR has 6 bytes of ATS which is: [06 75 77 81 02 80]
Note: Use the APDU “FF CA 01 00 00” to distinguish the ISO14443A-4 and ISO14443B-4
PICCs, and retrieve the full ATS if available. The ATS is returned for ISO14443A-3 or
ISO14443B-3/4 PICCs.
Another example would be the ATR for ST19XRC8E which is:
ST19XRC8E (ATR) = 3B 8C 80 01 50 12 23 45 56 12 53 54 4E 33 81 C3 55
Since this card follows ISO 14443 Type B, the response would be ATQB which is 50 12 23 45 56 12
53 54 4E 33 81 C3 is12 bytes long with no CRC-B
Note: You can refer to the ISO7816, ISO14443 and PCSC standards for more details.
Page 9 of 35
AET62 Reference Manual
Document Title Here
Document Title Here
Version 1.00
Document Title Here
info@acs.com.hk
www.acs.com.hk
Page 10
5.0. PICC Commands for General Purposes
5.1. Get Data
The “Get Data command” will return the serial number or ATS of the “connected PICC”.
Command Class INS P1 P2 Le
Get Data FF CA
Table 4: Get UID APDU Format (5 Bytes)
Response Data Out
Result UID
(LSB)
Table 5: Get UID Response Format (UID + 2 Bytes) if P1 = 0x00
Response Data Out
Result ATS SW1 SW2
00
01
00
UID
(MSB)
(Full Length)
SW1SW2
00
Table 6: Get ATS of a ISO 14443 A card (ATS + 2 Bytes) if P1 = 0x01
Results SW1 SW2 Meaning
Success 90 00
Error 63 00
Error 6A 81
Example:
1. To get the serial number of the “connected PICC”
UINT8 GET_UID[5]={0xFF, 0xCA, 0x00, 0x00, 0x04};
2. To get the ATS of the “connected ISO 14443 A PICC”
UINT8 GET_ATS[5]={0xFF, 0xCA, 0x01, 0x00, 0x04};
The operation is completed successfully.
The operation is failed.
Function not supported.
Table 7: Response Codes
AET62 Reference Manual
Document Title Here
Document Title Here
Version 1.00
Document Title Here
Page 10 of 35
info@acs.com.hk
www.acs.com.hk
Page 11
6.0. PICC Commands (T=CL Emulation) for Mifare Classic
Memory Cards
6.1. Load Authentication Keys
The “Load Authentication Keys command” will load the authentication keys into the reader. The
authentication keys are used to authenticate the particular sector of the Mifare 1K/4K Memory Card.
Two kinds of authentication key locations are provided, volatile and non-volatile key locations
respectively.
Command Class INSP1 P2 Lc Data In
Load
Authentication
Keys
Table 8: Load Authentication Keys APDU Format (11 Bytes)
Key Structure (1 Byte):
0x00 = Key is loaded into the reader volatile memory.
Other = Reserved.
Key Number (1 Byte):
0x00 ~ 0x01 = Key Location. The keys will disappear once the reader is disconnected from the
PC.
Key (6 Bytes):
The key value loaded into the reader. E.g. {FF FF FF FF FF FF}
Table 9: Load Authentication Keys Response Format (2 Bytes)
Results SW1 SW2Meaning
Success 90 00
Error 63 00
Table 10: Load Authentication Keys Response Codes
Example:
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}
FF 82
Response Data Out
Result SW1 SW2
The operation is completed successfully.
The operation is failed.
Key
Structure
Key
Number
06
Key
(6
bytes)
AET62 Reference Manual
Document Title Here
Document Title Here
Version 1.00
Document Title Here
Page 11 of 35
info@acs.com.hk
www.acs.com.hk
Page 12
6.2. Authentication
The “Authentication command” uses the keys stored in the reader to execute authentication with the
Mifare 1K/4K card (PICC). Two types of authentication keys are used: TYPE_A and TYPE_B.
Command Class INSP1P2 P3 Data In
Authentication FF 88 00Block Number
Table 11: Load Authentication Keys APDU Format (6 Bytes) [Obsolete]
Command Class INSP1P2LcData In
Authentication FF 86 000005Authenticate Data Bytes
Table 12: Load Authentication Keys APDU Format (10 Bytes)
Byte1 Byte 2Byte 3 Byte 4 Byte 5
Version
0x01
0x00
Block
Number
Key TypeKey Number
Table 13: Authenticate Data Bytes (5 Byte)
Key
Type
Key Number
Block Number: 1 Byte. This is the memory block to be authenticated.
Key Type: 1 Byte
0x60 = Key is used as a TYPE A key for authentication.
0x61 = Key is used as a TYPE B key for authentication.
Key Number: 1 Byte
0x00 ~ 0x1F = Key Location.
Note: For Mifare 1K Card, there are 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}.
Once the authentication is executed successfully, there is no need to execute the authentication again
provided that the blocks to be accessed are belonging to the same sector. Please refer to the Mifare
1K/4K specification for more details.
Response Data Out
Result SW1 SW2
Table 14: Load Authentication Keys Response Format (2 Bytes)
Results SW1 SW2Meaning
Success 90 00
Error 63 00
Table 15: Load Authentication Keys Response Codes
The operation is completed successfully.
The operation is failed.
The data block can be used as value block for implementing value-based applications.
6.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.
Block Number (1 Byte): The value block to be manipulated.
VB_OP (1 Byte):
AET62 Reference Manual
Document Title Here
Document Title Here
Version 1.00
Command
Value
Block
Operation
Class INS P1P2 LcData In
FF D7 00Block
Number
Table 21: Value Block Operation APDU Format (10 Bytes)
Document Title Here
05VB_OPVB_Value
(4 Bytes)
{MSB .. LSB}
Page 16 of 35
info@acs.com.hk
www.acs.com.hk
Page 17
0x00 = Store the VB_Value into the block. The block will then be converted to a value
block.
0x01 = Increment the value of the value block by the VB_Value. This command is
only valid for value block.
0x02 = Decrement the value of the value block by the VB_Value. This command is
only valid for value block.
VB_Value (4 Bytes): The value used for value manipulation. The value is a signed long
integer (4 bytes).
Example 1: Decimal –4 = {0xFF, 0xFF, 0xFF, 0xFC}
VB_Value
MSB
LSB
FF FF FF FC
Example 2: Decimal 1 = {0x00, 0x00, 0x00, 0x01}
VB_Value
MSB LSB
00 00 00 01
ResponseData Out
Result SW1SW2
Table 22: Value Block Operation Response Format (2 Bytes)
Results SW1 SW2Meaning
Success 90 00
Error 63 00
The operation completed successfully.
The operation failed.
Table 23: Value Block Operation Response Codes
6.5.2. 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.
Command ClassINSP1P2 Le
Read Value BlockFF B1 00Block Number04
Table 24: Read Value Block APDU Format (5 Bytes)
Block Number (1 Byte): The value block to be accessed.
ResponseData Out
Result
Table 25: Read Value Block Response Format (4 + 2 Bytes)
Value (4 Bytes): The value returned from the card. The value is a signed long integer (4
bytes).
Example 1: Decimal –4 = {0xFF, 0xFF, 0xFF, 0xFC}
Value
MSB LSB
FF FF FFFC
Example 2: Decimal 1 = {0x00, 0x00, 0x00, 0x01}
Value
MSB LSB
00 00 0001
Value
{MSB ..
LSB}
SW1 SW2
AET62 Reference Manual
Document Title Here
Document Title Here
Version 1.00
Document Title Here
Page 17 of 35
info@acs.com.hk
www.acs.com.hk
Page 18
Results SW1 SW2Meaning
Success 90 00
Error 63 00
The operation is completed successfully.
The operation is failed.
Table 26: Read Value Block Response Codes
6.5.3. Restore Value Block
The “Restore Value Block command” is used to copy a value from a value block to another value
block.
Command Class INSP1P2 LcData In
Value Block
Operation
Source Block Number (1 Byte): The value of the source value block will be copied to the
Target Block Number (1 Byte): The value block to be restored. The source and target value
Table 28: Restore Value Block Response Format (2 Bytes)
FF D7 00Source
Block
Number
0203Target
Block
Number
Table 27: Restore Value Block APDU Format (7 Bytes)
target value block.
blocks must be in the same sector.
ResponseData Out
Result SW1SW2
Results SW1 SW2Meaning
Success 90 00
Error 63 00
The operation is completed successfully.
The operation is failed.
Table 29: Restore Value Block Response Codes
Example:
1. Store a value “1” into block 0x05
APDU = {FF D7 00 05 05 00 00 00 00 01}
Answer: 90 00
3. Copy the value from value block 0x05 to value block 0x06
APDU = {FF D7 00 05 02 0306}
Answer: 90 00 [9000]
4. Increment the value block 0x05 by “5”
APDU = {FF D7 00 05 05 01 00 00 00 05}
Answer: 90 00 [9000]
AET62 Reference Manual
Document Title Here
Document Title Here
Version 1.00
Document Title Here
Page 18 of 35
info@acs.com.hk
www.acs.com.hk
Page 19
7.0. Pseudo-APDUs
Pseudo-APDUs are used for the following:
Exchanging Data with Non-PCSC Compliant Tags.
Retrieving and setting the reader parameters.
The Pseudo-APDUs can be sent through the “AET62 PICC Interface” if the tag is already
connected.
Or the Pseudo-APDUs can be sent by using “Escape Command ” if the tag is not presented
yet.
7.1. Direct Transmit
This is the Payload to be sent to the tag or reader.
Command Class INS P1 P2 Lc Data In
Direct
Transmit
Table 30: Direct Transmit Command Format (Length of the Payload + 5 Bytes)
Lc: Number of Bytes to Send (1 Byte)
Maximum 255 bytes
Data In: Response
0xFF 0x00 0x00 0x00
Response Data Out
Direct Transmit Response Data
Table 31: Direct Transmit Response Format
Number
of Bytes
to send
Payload
7.2. Bi-Color LED Control
This APDU is used to control the states of the Bi-Color LED.
Command Class INS P1 P2 Lc
Bi-Color
LED
Control
P2: LED State Control
CMD Item Description
Bit 0 Final Red LED State 1 = On; 0 = Off
Bit 1 Final Green LED State 1 = On; 0 = Off
Bit 2 Red LED State Mask
Bit 3 Green LED State Mask
Bit 4 Initial Red LED Blinking State 1 = On; 0 = Off
Bit 5 Initial Green LED Blinking State 1 = On; 0 = Off
Bit 6 Red LED Blinking Mask
Bit 7 Green LED Blinking Mask
0xFF 0x00 0x40 LED
State
Control
Table 32: Bi-Color LED Control Command Format (9 Bytes)
Table 33: Bi-Color LED Control Format (1 Byte)
Data In
(4 Bytes)
0x04 Blinking
Duration
Control
1 = Update the State
0 = No change
1 = Update the State
0 = No change
1 = Blink
0 = Not Blink
1 = Blink
0 = Not Blink
AET62 Reference Manual
Document Title Here
Document Title Here
Version 1.00
Document Title Here
Page 19 of 35
info@acs.com.hk
www.acs.com.hk
Page 20
Data In: Blinking Duration Control
Byte 0 Byte 1 Byte 2 Byte 3
T1 Duration
Initial Blinking State
(Unit = 100ms)
Table 34: Bi-Color LED Blinking Duration Control Format (4 Bytes)
Data Out: SW1 SW2. Status Code returned by the reader.
Results SW1 SW2 Meaning
Success 90
Error
Status Item Description
Bit 0 Current Red LED 1 = On; 0 = Off
Bit 1 Current Green LED 1 = On; 0 = Off
Bits 2 – 7 Re served
63 00
T2 Duration
Toggle Blinking State
(Unit = 100ms)
Current LED
State
Table 35: Status Code
Table 36: Current LED State (1 Byte)
Number of
repetition
The operation is completed successfully.
The operation is failed.
0x00
Note:
The LED State operation will be performed after the LED Blinking operation is completed.
The LED will not be changed if the corresponding LED Mask is not enabled.
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.
T1 and T2 duration parameters are used for controlling the duty cycle of LED blinking. For
example, if T1=1 and T2=1, the duty cycle = 50%. #Duty Cycle = T1 / (T1 + T2).
7.3. Get the Firmware Version of the reader
This is used to retrieve the firmware version of the reader.
8.0. Basic Program Flow for Contactless 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. You must
make sure that the PCSC Escape Command has been set. See AET62 PCSC Esc
Command for more details.
Step 1. The first thing i
Step 2. Access the PICC by sending APDU commands.
:
:
Step N. Disconnect the “AET62 PICC Interface”. Shut down the application.
NOTE:
1. The antenna can be switched off in order to save the power.
Turn off the antenna power: FF 00 00 00 04 D4 32 01 00
Turn on the antenna power: FF 00 00 00 04 D4 32 01 01
2. Standard and Non-Standard APDUs Handling.
PICCs that use Standard APDUs: ISO14443-4 Type A and B, Mifare .. etc
PICCs that use Non-Standard APDUs: FeliCa, Topaz .. etc.
s to connect the “AET62 PICC Interface”.
ape
1) For the AET62 PICC Interface, ISO7816 T=1 protocol is used.
o PC Reader: Issue an APDU to the reader.
o Reader PC: The response data is returned.
AET62 Reference Manual
Document Title Here
Document Title Here
Version 1.00
Figure 3: Basic Program Flow for Contactless Applications
Document Title Here
Page 22 of 35
info@acs.com.hk
www.acs.com.hk
Page 23
8.1. How to Access PCSC-Compliant Tags (ISO 14443-4)?
Basically, all ISO 14443-4 compliant cards (PICCs) would understand the ISO 7816-4 APDUs. The
AET62 Reader just has to communicate with the ISO 14443-4 compliant cards through exchanging
ISO 7816-4 APDUs and Responses. AET62 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 ISO 14443-4 tags. For more information, please refer to topic “PICC
Commands for Mifare Classic Memory Tags”.
Command Class INS P1 P2 Lc
ISO 7816
Part 4
Command
Response Data Out
Result Response Data SW1 SW2
Results SW1 SW2 Meaning
Success 90 00
Error
Typical sequence may be:
- Present the Tag and Connect the PICC Interface
- Read / Update the memory of the tag
Step 1) Connect the Tag
Step 2) Send an APDU, Get Challenge.
Hint:
For ISO14443-4 Type A tags, the ATS can be obtained by using the APDU “FF CA 00 00 01”
Table 44: ISO 7816-4 APDU Format
Table 45: ISO 7816-4 Response Format (Data + 2 Bytes)
The operation is completed successfully.
63 00
Table 46: Common ISO 7816-4 Response Codes
The operation is failed.
Length
of the
Data
In
Data
In
Le
Expected
length
of the
Response
Data
AET62 Reference Manual
Document Title Here
Document Title Here
Version 1.00
Document Title Here
Page 23 of 35
info@acs.com.hk
www.acs.com.hk
Page 24
8.2. How to Access DESFire Tags (ISO 14443-4)?
DESFire supports ISO 7816-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 in “Native Mode”, the rest of the APDUs must be in “Native Mode” format. Similarly, if the first
APDU is in “ISO 7816-4 APDU Wrapping Mode”, the rest of the APDUs must be in “ISO 7816-4
APDU Wrapping Mode” format.
Example 1: DESFire ISO 7816-4 APDU Wrapping
To read 8 bytes random number from an ISO 14443-4 Type A PICC (DESFire)
APDU = {90 0A 00 00 01 00 00}
Class = 0x90; INS = 0x0A (DESFire Instruction); P1 = 0x00; P2 = 0x00
Lc = 0x01; Data In = 0x00; Le = 0x00 (Le = 0x00 for maximum length)
Answer: 7B 18 92 9D 9A 25 05 21 [$91AF]
The Status Code [91 AF] is defined in DESFire specification. Please refer to the DESFire
specification for more details.
Example 2: DESFire Frame Level Chaining (ISO 7816 wrapping mode)
In this example, the application has to do the “Frame Level Chaining”. To get the version of
the DESFire card.
Step 1: Send an APDU {90 60 00 00 00} to get the first frame. INS=0x60
Answer: 04 01 01 00 02 18 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 00 06 18 05 91 AF [$91AF]
Step 3: Send an APDU {90 AF 00 00 00} to get the last frame. INS=0xAF
Answer: 04 52 5A 19 B2 1B 80 8E 36 54 4D 40 26 04 91 00 [$9100]
Example 3: DESFire Native Command
We can send Native DESFire Commands to the reader without ISO 7816 wrapping if we find
that the Native DESFire Commands are easier to handle.
To read 8 bytes random number from an ISO 14443-4 Type A PICC (DESFire)
APDU = {0A 00}
Answer: AF 25 9C 65 0C 87 65 1D D7[$1DD7]
In which, the first byte “AF” is the status code returned by the DESFire Card.
The Data inside the blanket [$1DD7] can simply be ignored by the application.
Example 4: DESFire Frame Level Chaining (Native Mode)
In this example, the application has to do the “Frame Level Chaining”.
To get the version of the DESFire card.
Step 1: Send an APDU {60} to get the first frame. INS=
wer: AF 04 01 01 00 02 18 05[$1805]
Ans
Step 2: Send an APDU {AF} to get the second frame. INS=0xAF
Answer: AF 04 01 01 00 06 18 05[$1805]
Step 3: Send an APDU {AF} to get the last frame. INS=0xAF
Or if no tag is in the field
>> D5 05 00 00 00 80 90 00
[Err] is an error code corresponding to the latest error detected.
Field indicates if an external RF field is present and detected (Field = 0x01) or not (Field = 0x00).
[NbTg] is the number of targets. The default value is 1.
[Tg]: logical number
[BrRx] : bit rate in reception
0x00 : ISO14443 or Mifare®
0x10 : FeliCa™
0x01 : Active mode
0x02 : Innovision Jewel® tag
AET62 Reference Manual
Document Title Here
Document Title Here
Version 1.00
Document Title Here
Page 27 of 35
info@acs.com.hk
www.acs.com.hk
Page 28
Appendix A. AET62 PCSC Escape Command
1. Select the “ACS AET62 PICC Interface 0”
2. Select the “Shared Mode” if the “AET62 PICC Interface” is already connected or “Direct Mode if
the “AET62 PICC Interface” is not connected.
3. Press the “Connect” button to establish a connection between the PC and the AET62 reader.
4. Enter “3500” in the Command text box
5. Enter the PCSC Escape Command, e.g. “FF 00 48 00 00” and press the “Send” button to send
the command to the reader. #Get the firmware version
6. Press the “Disconnect” button to break the connection.
7. In order to send or receive Escape commands to a reader, follow the instructions below
8. The vendor IOCTL for the Escape command is defined as follows:
#define IOCTL_CCID_ESCAPE SCARD_CTL_CODE(3500)
The following instructions enumerate the steps to enable the PCSC Escape command:
Execute the “RegEdit” in the “Run Command
Menu” of Windows
AET62 Reference Manual
Document Title Here
Document Title Here
Version 1.00
Document Title Here
Page 28 of 35
info@acs.com.hk
www.acs.com.hk
Page 29
Add a DWORD “EscapeCommandEnable” under
HKLM\SYSTEM\CCS\Enum\USB\Vid_072F&Pid_0
102\Device Parameters
For Vista, the path is:
Computer\HKEY_LOCAL_MACHINE\SYSTEMS\C
urrentControlSet\Enum\USB
Look for: VID_072F&PID_0102
Then expand the node. Look under Device
parameters
Create a DWORD entry (32-bit) with the name:
EscapeCommandEnable
AET62 Reference Manual
Document Title Here
Document Title Here
Version 1.00
Document Title Here
Page 29 of 35
info@acs.com.hk
www.acs.com.hk
Page 30
To Modify the value of the EscapeCommandEnable
double click on the entry and input 1 in the Value
data with the base set in Hexadecimal.
AET62 Reference Manual
Document Title Here
Document Title Here
Version 1.00
Document Title Here
Page 30 of 35
info@acs.com.hk
www.acs.com.hk
Page 31
Appendix B. APDU Command and Response Flow
for ISO 14443-Compliant Tags
Assume an ISO14443-4 Type B tag is used.
<< Typical APDU Command and Response Flow >>
PC
Reader
Tag
Sequences
1. The
command is
sent
USB Interface
(12Mbps)
Contactless
Related
Command
[APDU
Command]
e.g. [00 84
00 00 08]
(Get
Challenge)
RF Interface
(13.56MHz)
Tag-specific
Command
Frame
[APDU
Command]
embedded in
ISO14443
Frame
2. The
response is
received
Contactless
Related
Response
[APDU
Response]
e.g. [11 22
33 44 55 66
77 88] (90
00)
Tag-specific
Response
Frame
[APDU
Response]
embedded in
ISO14443
Frame
Page 31 of 35
AET62 Reference Manual
Document Title Here
Document Title Here
Version 1.00
Document Title Here
info@acs.com.hk
www.acs.com.hk
Page 32
Appendix C. APDU Command and Response Flow
for ISO 18092-Compliant Tags
Assume a TOPAZ tag is used.
<< Typical APDU Command and Response Flow >>
PC
Sequences
1. The command
is sent
Contactless Related
e.g. FF 00 00 00 05
D4 40 01 [01 08]
Reader
USB Interface
(12Mbps)
Command
[Native Command]
e.g. [01 08] (read
memory address 08)
or
Pseudo APDU
Command
+ [Native Command]
Tag-specific Command Frame
[Native Command] embedded in
Tag
RF Interface
(13.56MHz)
ISO18092 Frame
2. The response
is received
Contactless Related
Response
[Native Response]
e.g. 00 (90 00)
or
Pseudo APDU
Response
+ [Native Response]
e.g. D5 41 00 [00]
(90 00)
Tag-specific Response Frame
e.g. [Native Response]
embedded in
ISO18092 Frame
AET62 Reference Manual
Document Title Here
Document Title Here
Version 1.00
Document Title Here
Page 32 of 35
info@acs.com.hk
www.acs.com.hk
Page 33
Appendix D. Error Codes
Error Error Code
No Error 0x00
Time Out, the target has not answered
A CRC error has been detected by the contactless UART
A Parity error has been detected by the contactless UART
During a Mifare anti-collision/select operation, an erroneous Bit Count has been
detected
Framing error during Mifare operation
An abnormal bit-collision has been detected during bit wise anti-collision at 106
kbps
Communication buffer size insufficient
RF Buffer overflow has been detected by the contactless UART (bit BufferOvfl of
the register CL_ERROR)
In active communication mode, the RF field has not been switched on in time by the
counterpart (as defined in NFCIP-1 standard)
RF Protocol error (cf. reference [4], description of the CL_ERROR register)
Temperature error: the internal temperature sensor has detected overheating, and
therefore has automatically switched off the antenna drivers
Internal buffer overflow
Invalid parameter (range, format, …)
DEP Protocol: The chip configured in target mode does not support the command
received from the initiator (the command received is not one of the following:
ATR_REQ, WUP_REQ, PSL_REQ, DEP_REQ, DSL_REQ, RLS_REQ, ref. [1]).
DEP Protocol / Mifare / ISO/IEC 14443-4: The data format does not match to the
specification. Depending on the RF protocol used, it can be:
• Bad length of RF received frame,
• Incorrect value of PCB or PFB,
• Invalid or unexpected RF received frame,
• NAD or DID incoherence.
Mifare: Authentication error
ISO/IEC 14443-3: UID Check byte is wrong
DEP Protocol: Invalid device state, the system is in a state which does not allow the
operation
Operation not allowed in this configuration (host controller interface)
This command is not acceptable due to the current context of the chip (Initiator vs.
Target, unknown target number, Target not in the good state, …)
The chip configured as target has been released by its initiator
ISO/IEC 14443-3B only: the ID of the card does not match, meaning that the
expected card has been exchanged with another one.
ISO/IEC 14443-3B only: the card previously activated has disappeared.
Mismatch between the NFCID3 initiator and the NFCID3 target in DEP 212/424
kbps passive.
An over-current event has been detected
NAD missing in DEP frame
0x01
0x02
0x03
0x04
0x05
0x06
0x07
0x08
0x0A
0x0B
0x0D
0x0E
0x10
0x12
0x13
0x14
0x23
0x25
0x26
0x27
0x29
0x2A
0x2B
0x2C
0x2D
0x2E
AET62 Reference Manual
Document Title Here
Document Title Here
Version 1.00
Document Title Here
Page 33 of 35
info@acs.com.hk
www.acs.com.hk
Page 34
Appendix E. Sample Codes for Setting the LED
Example 1: To read the existing LED State
// Assume both Red and Green LEDs are OFF initially //
APDU = “FF 00 40 00 04 00 00 00 00”
Response = “90 00”. RED and Green LEDs are OFF.
Example 2: To turn on RED and Green Color LEDs
// Assume both Red and Green LEDs are OFF initially //
APDU = “FF 00 40 0F 04 00 00 00 00”
Response = “90 03”. RED and Green LEDs are ON,
To turn off both RED and Green LEDs, APDU = “FF 00 40 0C 04 00 00 00 00”
Example 3: To turn off the RED Color LED only, and leave the Green Color LED unchanged
// Assume both Red and Green LEDs are ON initially //
APDU = “FF 00 40 04 04 00 00 00 00”
Response = “90 02”. Green LED is not changed (ON); Red LED is OFF,
Red LED On
Red LED Off
Green LED On
Green LED Off
AET62 Reference Manual
Document Title Here
Document Title Here
Version 1.00
Document Title Here
Page 34 of 35
info@acs.com.hk
www.acs.com.hk
Page 35
Example 4: To turn on the Red LED for 2 sec. After that, resume to the initial state
// Assume the Red LED is initially OFF, while the Green LED is initially ON. //
// The Red LED will turn on during the T1 duration, while the Green LED will turn off during the T1
duration. //
T1 = 2000ms
T2 = 0ms
Red LED On
Red LE
D Off
Green LED On
1Hz = 1000ms Time Interval = 500ms ON + 500 ms OFF
T1 Duration = 2000ms = 0x14
Green LED Off
T2 Duration = 0ms = 0x00
Number of repetition = 0x01
Example 5: To blink the Red LED of 1Hz for 3 times. After that, resume to initial state
// Assume the Red LED is initially OFF, while the Green LED is initially ON. //
// The Initial Red LED Blinking State is ON. Only the Red LED will be blinking.
// The Green LED will turn off during both the T1 and T2 duration.
// After the blinking, the Green LED will turn ON. The Red LED will resume to the initial state after the
blinking //
Red LED On
T1 =
500ms
T2 =
500ms
Red LE
Green LED On
Green LED Off
D Off
1Hz = 1000ms Time Interval = 500ms ON + 500 ms OFF
T1 Duration = 500ms = 0x05
T2 Duration = 500ms = 0x05
Number of repetition = 0x03
APDU = “FF 00 40 50 04 05 05 03 01”
Response = “90 02”
AET62 Reference Manual
Document Title Here
Document Title Here
Version 1.00
Document Title Here
Page 35 of 35
info@acs.com.hk
www.acs.com.hk
Page 36
Example 6: To blink the Red and Green LEDs of 1Hz for 3 times
// Assume both the Red and Green LEDs are initially OFF. //
// Both Initial Red and Green Blinking States are ON //
T1 =
500ms
T2 =
500ms
1Hz = 1000ms Time Interval = 500ms ON + 500 ms OFF
T1 Duration = 500ms = 0x05
T2 Duration = 500ms = 0x05
Number of repetition = 0x03