简体   繁体   中英

How to find NXP type of NFC Tag in flutter nfc_manager

I am using Flutter nfc_manager to read, write, and protect operations.

Now I need to find the type. For example, I need to know that the scanned tag is NTAG213 or NTAG216.

Any possibilities to check that using nfc_manager.

There is no standard method to identify exactly a NFC Tag, there are some methods that can be used to help deduce which Tag you are dealing with but some of these are family specific methods to identify which member of a family of Tags it is.

As these methods are a lower level type of access how to use them on iOS and Android are different.

At the low level the different Tag technologies have different methods getting more details about the Tag.

From the Flutter side you can use the from method at least narrow down which Tag Technology you are working with. This from method will return null if the Tag is not the right type.

Then for example if it was an NfcA Tag hardware (as the NTAX21x Tags are) different NFC Tag families will quite often give different low level ATQA and SAK responses (This data is actually used work out some of the Tag Technologies but not all eg Mifare, etc). This ATQA and SAK responses are available in different method in Android and iOS

Then from the Tag's UID the first byte is supposed to be Manufacturer identifier, so for NXP all UID's should begin with 04h

Then there is things specific to a family of Tags, for example for the NTAX21x series you can transceive or sendMiFareCommand the "GET_VERSION" 60h command to get back product information and decode it as per the datasheet

But is knowing the exact Tag type off any use? , are you just wanting to find out how much data you can store on it?

So as well as using he NTAX21x "GET_VERSION" command there is the more generic method of using the NDEF size method to get this more useful info on how much data can this tag store. This NDEF size should work on any Tag that conforms to one of the NFC Forum Tag Standards eg Type 2 in the NTAX21x case.

(Also the size of any Type 2 Tag is stored in the capability container at page 03h in byte 02 and you can transceive or sendMiFareCommand a READ 03h command to any Type 2 tag to get this data)

NXP provides a library called TapLinx , which provides simple APIs to interact with NXP manufactured tags. You can use that if you don't wanna get into the details.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM