NFC tag information

后端 未结 2 1737
眼角桃花
眼角桃花 2021-01-29 15:21

I have a question, it is possible know the code source of explain th type of tag NFC that I read? If is a Mifare 1k or Ntag203 or another else?

protected void on         


        
2条回答
  •  面向向阳花
    2021-01-29 16:11

    Fingerprinting of NFC tags is not quite easy. Most tags don't just tell you "I am XY". Moreover, for certain tag technologies there exist many different tags from several different manufacturers. E.g. NFC Forum Type 2 tags are made by NXP, Infineon, Kovio and others.

    Finding out if a tag is MIFARE Classic is rather simple on devices with NXP's NFC chipset. On those devices you will see android.nfc.tech.MifareClassic listed in the tech-list (result of Tag.getTechList()method). For other NfcA tags, you could start by doing the following:

    1. If the tag has a 7-byte UID (get it via Tag.getId()), the first byte indicates the tag manufacturer's ISO 7816-6 registered chip manufacturer code. E.g. 0x04 for NXP, 0x05 for Infineon, etc.

    2. Once you know the chip manufacturer, you could try to send manufacturer-specific commands to the tag (e.g. for NXP tags you could send a GET_VERSION command to check if the tag is an NTAG/MF Ultralight EV1 tag or an authentication command to check if it is Ultralight C) . Some manufacturers also code further chip information into the UID.

    3. You can scan the tags memory to find the memory size and decide upon that value what chip type it is.

提交回复
热议问题