Search code examples
androidnfcuid

How to decode the IC type of an NFC tag using Android?


I am developing an Android NFC application.

This application can scan an NFC tag (here I have an NXP NTAG 5 boost tag, which is an NFC Forum Type 5 tag).

From the UID, I already know how to decode the IC manufacturer using this document, which is the second byte.

For now, I'd like to decode the IC type, like NXP's TagInfo application does, to find out if the scanned tag is more of a NTAG 5 boost or an NTAG I2C plus for example.

Here is an image of what the NXP TagInfo application displays:

enter image description here

Do you know where I can find the IC type register so I can decode this part of the UID?


Solution

  • Only the Manufacturer is encoded in to the UID, nothing else is encode in the UID.

    How the IC type is determined by that App could be a number of possible ways.

    Some NFC chip provide some data at the lower level protocol like the ATQA and SAK for NfcA that are used to identify the Family of Tag type and the size, this is mostly on the Mifare Classic series of chips.

    Most likely is that for the NXP chips you have identified that most NXP chips have an originality signature command e.g. in https://www.nxp.com/docs/en/data-sheet/NTA5332.pdf section 8.2.4.7 and this signature is used to check the IC type.

    Unfortunately how to decode and check the originality signature is kept behind a Non disclosure agreement. Of course the App you show is written by NXP so they will have access to the data needed to decode this signature and know what it contains. (There is a hint that different keys are used on different chips, so if you know the process and how the keys are mapped to IC's this would tell you the IC type).