I'm using Galaxy A5, Android 5.0.2, SDK 21 with Android Studio 1.1.0
Android as PCD, and Mifare DESFire as PICC. Native DESFire APDU Framing didn't work, but ISO 7816-4 worked.
Example:
MIFARE DESFire SelectApplication with AID equal to 000000h
(PICC level)
Command: 90 5a 00 00 03 00 00 00 00
.
Expected response: 91 00
.
Currently the response is 68 00
.
Document reference: AN11004.pdf (page 33)
void SelectApp() {
_isoDep.connect();
byte[] reqSelectApp = new byte[]{(byte) 0x90, (byte) 0x5A, (byte) 0x00, (byte) 0x00, (byte) 0x03, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00};
byte[] resSelectApp = _isoDep.transceive(reqSelectApp);
_responseTextView.append(String.format("reqSelectApp: %s length:%d\n", BytesToHexStr(reqSelectApp), reqSelectApp.length));
_responseTextView.append(String.format("resSelectApp: %s length:%d\n", BytesToHexStr(resSelectApp), resSelectApp.length));
}
String BytesToHexStr(byte[] items) {
StringBuilder builder = new StringBuilder();
for (byte item : items) {
builder.append(String.format("%02X", item));
}
return builder.toString();
}
INFO
NDEF
EXTRA
TECH
ISO/IEC 14443-2 (Type A) compatible
Android technology information: Tag description:
No MIFARE Classic support present in Android
Detailed protocol information:
While the ATQA/SAK looks as if the card was DESFire (that's why my NFC TagInfo app detects it as such, but should give you either a read error or does indicate availability of a DESFire master application), the remaining parameters (particularly the historical bytes) clearly indicate that this is something other than a DESFire card.
Hence, don't expect the card to respond to DESFire commands (native or wrapped native). This also matches the behavior of the card as it responds with 68 00
(which indicates that the coding of the CLA byte (0x90
in your case) is not supported).