From the docs:
This APDU selects an ISO application according to its ISO Identifier Application (AID). ISO AID DESFire - "0xD2 76 00 00 85 01 00". Full ISO identification must be passed; partial selection is NOT supported. Other ISO AIDs not supported by DESFire
This, apparently, contradicts the fact that you have AID 0xA0 0xA1 0xA2 .
It looks like you need to send:
[CLA] [INS] [P1] [P2] [Len(AID)] [AID]
Thus:
0x00 0xA4 0x04 0x00 0x07 0xD2 0x76 0x00 0x00 0x85 0x01 0x00
** EDIT **
Try the ISO SELECT DIRECTORY instead:
This APDU selects a DESFire application with its three-byte DESFire Application Identifier (DESFire AID) ....
The functionality of the ISO SELECT DIRECTORY command is compatible with the DESFire Select Application command.
So:
0x00 0xA4 0x04 0x00 0x03 0xA0 0xA1 0xA2
(This was on the next page, and probably exactly what you wanted in the first place.)
I think this is identical to what you had, minus NUL at the end.
Lynn crumbling
source share