I started reading into the topic of NFC/Smartcard-Communication and I found many different standards and commands depending on the Tag type (for example see here)
I also came across the APDU-commands which seem universal to the communication of nfc/smartcards?
Does this mean, that these higher level protocols are all based on apdu and can be translated?
As an example, I found NFC 14443-A commands implemented with the android.nfc.tech.NfcA
library, such as:
Action | Byte |
---|---|
Read | 0x30 |
Write | 0xA2 |
And APDU commands like these:
Action | CLA | INS | P1 | P2 | LC |
---|---|---|---|---|---|
READ BINARY | 0xFF | 0xB0 | ... | ... | ... |
UPDATE BINARY | 0xFF | 0xD6 | ... | ... | ... |
GET DATA | 0xFF | 0xCA | ... | ... | ... |
MIFARE CLASSIC READ | 0xFF | 0xF3 | ... | ... | ... |
MIFARE CLASSIC WRITE | 0xFF | 0xF4 | ... | ... | ... |
The commands seem to be completely different.
It would also help alot, if someone could point to good documentation on the topic
Documentation I have found so far:
The Android documentation on nfca (Link)
APDU description on wikipedia Link (The german version contains some return codes)
APDU commands (by a card-reader manufacturer) Link