How to detect manufacturer from NFC tag using Andr

2019-02-19 09:02发布

问题:

I am trying to detect the manufacturer name for an NFC tag. I found manufacturer codes here. But I can detect only Mifare Ultralight C tags using these IDs. The first byte of Ultralight C tag ID represents the manufacturer code. But other tags do not contain this property. This app can detect the IC manufacturer. Is it possible to detect the manufacturer for other NFC tags?

回答1:

There is certainly no one-catches-all approach to this. Fingerprinting of NFC tags (to guess the manufacturer or even the exact tag type) is rather difficult and you will probably need to obtain the various datasheet/user manuals for the different tag types that you want to detect. Even then, most tags don't just tell you "I am XY developed by Z". In some application use-cases it is even considered undesirable (typically for security-by-obscurity reasons) to reveal the manufacturer or product code.

For certain tag types, however, there are well-established mechanisms to obtain a manufacturer identifier:

  • NfcA tags that have a 7-byte UID (get it via Tag.getId()) encode the manufacturer's ISO 7816-6 registered chip manufacturer code (cf. the list that you already found, a newer list, or the JTC1/SC17 document library) as the first byte of that UID. E.g. 0x02 for STMicroelectronics, 0x04 for NXP, 0x05 for Infineon, etc.

  • NfcV tags have an 8-byte UID where the manufacturer's ISO 7816-6 registered chip manufacturer code (same as for 7-byte-UID NfcA tags) is encoded as the second byte of the UID (note the different byte order for NfcV which results in that byte being the second last byte obtained through Tag.getId()).

  • NfcF tags typically have an RF front-end that comes from Sony (at least I'm not aware of any other manufacturers). That front-end may be integrated into products by other manufacturers though. Sony provides a series of datasheet/user manuals that give you sufficient information to distinuguish between different FeliCa tags.

  • Some IsoDep tags (specifically those that are smartcards following GlobalPlatform specifications) may reveals manufacturer information through their card production life-cycle data (CPLC). See Nikolay's blog post and the GP specifications on how to get that from typical GP compliant cards. See CPLC.java on how to interpret that information.