Search code examples
c#.netnfcpcsc

Read NTAG NFC Tag via PCSC on Windows - NTAG APDU commands not working


I'm trying to read/write an NDEF Message from/to my NTAG216 Tag.

As a base for this development I'm using the PcscSdk from the Microsoft NFC sample: https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/Nfc

I am successfully able to connect to the card. It gets identified as Mifare Ultralight, and I can read/write the first 16 blocks on it. If I request a later sector, I get a File Not Found error in return.

The card definitely is an NTAG216 with plenty more space than those 64 bytes. My phone identifies it as NfcA compliant Tag, and is able to read/write the whole storage just fine.

After some research on the Net I found various specifications for How to read/write those Type 2 Tags in the "Type 2 Tag Operation Specification Technical Specification T2TOP 1.1". And also some remarks to send the GET_VERSION(0x60) command to identify the specific type of Tag I have here. But no matter how I try to send these to my card, I always get various error messages back.

The reader I'm using is a Cherry TC1200. It claims supports for ISO14443A, ISO14443B and ISO15693 in its very short documentation.

The whole situation is just very confusing, there are so many standards, and nothing clearly states what command I have to send to treat my card as NfcA/NTAG and get its data and write it.


Solution

  • As it turns out, the issue was the reader all along. That cheap little Cherry reader just lacks support for anything beyond the basic Mifare Ultralight cards.

    I got myself an ACS ACR122 reader and now the same code just works. This one advertises explicit support for the various types of NFC tags.