如何使用 Android 从 NFC 标签中检测制造商? [英] How to detect manufacturer from NFC tag using Android?

查看:22
本文介绍了如何使用 Android 从 NFC 标签中检测制造商?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试检测 NFC 标签的制造商名称.我在这里找到了制造商代码.但我只能使用这些 ID 检测到 Mifare Ultralight C 标签.Ultralight C 标签 ID 的第一个字节代表制造商代码.但其他标签不包含此属性.这个应用可以检测IC厂商.是否可以检测其他NFC标签的制造商?

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?

推荐答案

当然没有万能的方法.NFC 标签的指纹识别(猜测制造商甚至是确切的标签类型)相当困难,您可能需要获取您想要检测的不同标签类型的各种数据表/用户手册.即使这样,大多数标签也不只是告诉你我是由 Z 开发的 XY".在某些应用程序用例中,甚至不希望透露制造商或产品代码(通常出于安全原因).

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 标签具有 7 字节 UID(通过 Tag.getId() 获取)编码制造商的 ISO 7816-6 注册芯片制造商代码(参见 您已经找到的列表,一个 更新列表,或 JTC1/SC17 文档库) 作为该 UID 的第一个字节.例如.0x02 用于 STMicroelectronics,0x04 用于 NXP,0x05 用于英飞凌等

  • 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 标签有一个 8 字节 UID,其中制造商的 ISO 7816-6 注册芯片制造商代码(与 7 字节 UID NfcA 标签相同)) 被编码为 UID 的第二个字节(注意 NfcV 的不同字节顺序导致该字节是通过 Tag.getId() 获得的倒数第二个字节).

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 标签通常有一个来自 Sony 的 RF 前端(至少我不知道任何其他制造商).不过,该前端可能会集成到其他制造商的产品中.Sony 提供 系列数据表/用户手册为您提供足够的信息来区分不同的 FeliCa 标签.

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.

一些 IsoDep 标签(特别是那些在 GlobalPlatform 规格)可能会通过其卡片生产生命周期数据 (CPLC) 揭示制造商信息.请参阅 Nikolay 的博文 和 GP 规范了解如何从典型的 GP 兼容卡中获取.请参阅 CPLC.java 关于如何解释这些信息.

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.

这篇关于如何使用 Android 从 NFC 标签中检测制造商?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆