How to detect manufacturer from NFC tag using Android?

最后都变了- 提交于 2019-12-01 07:38:07

问题


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.



来源:https://stackoverflow.com/questions/31233652/how-to-detect-manufacturer-from-nfc-tag-using-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!