ACR89U-A2 – Reference Manual
Version 1.01
www.acs.com.hk
Page 53 of 57
Appendix B. Access MIFARE DESFire Tags (ISO
14443-4)
The MIFARE DESFire supports ISO 7816-4 APDU Wrapping and Native modes.
Once the MIFARE
DESFire Tag is activated, the first APDU sent to the MIFARE 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 “ISO 7816-4 APDU Wrapping Mode,” the rest of the APDUs must
be in “ISO 7816-4 APDU Wrapping Mode” format.
Example 1
: MIFARE DESFire ISO 7816-4 APDU Wrapping.
To read 8 bytes random number from an ISO 14443-4 Type A PICC (MIFARE DESFire)
APDU = {90 0A 00 00 01 00 00h}
Class = 90h; INS = 0Ah (MIFARE DESFire Instruction); P1 = 00h; P2 = 00h
Lc = 01h; Data In = 00h; Le = 00h (Le = 00h for maximum length)
Answer: 7B 18 92 9D 9A 25 05 21h [$91AF]
Note: Status Code {91 AFh} is defined in MIFARE DESFire specification. Please refer to the MIFARE
DESFire specification for more details.
Example 2
: MIFARE 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 MIFARE DESFire card.
Step 1:
Send an APDU {90 60 00 00 00h} to get the first frame. INS=60h
Answer: 04 01 01 00 02 18 05 91 AFh [$91AF]
Step 2:
Send an APDU {90 AF 00 00 00h} to get the second frame. INS=AFh
Answer: 04 01 01 00 06 18 05 91 AFh [$91AF]
Step 3: Send an APDU {90 AF 00 00 00h} to get the last frame. INS=AFh
Answer: 04 52 5A 19 B2 1B 80 8E 36 54 4D 40 26 04 91 00h [$9100]
Example 3
: MIFARE 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 (MIFARE DESFire)
APDU = {0A 00h}
Answer: AF 25 9C 65 0C 87 65 1D D7h [$1DD7]
In which, the first byte “AFh” is the status code returned by the MIFARE DESFire Card.