简体   繁体   English

带有 Galaxy S3 的 MIFARE Classic 1K 和 Android NFC 阅读器

[英]MIFARE Classic 1K and Android NFC reader with Galaxy S3

I have an ACR122U NFC reader and I am writing data to block 1 of a MIFARE Classic 1K tag with a simple text "test".我有一个 ACR122U NFC 阅读器,我正在使用简单的文本“测试”将数据写入 MIFARE Classic 1K 标签的块 1。

All works works well in my Windows app using Delphi Xe8/Win 8.1.在我使用 Delphi Xe8/Win 8.1 的 Windows 应用程序中一切正常。 I can write and read back without problems.我可以毫无问题地写和读。

I downloaded several NFC tag reader apps from Google Play on my Samsung Galaxy S3 Android device.我在三星 Galaxy S3 Android 设备上从 Google Play 下载了几个 NFC 标签阅读器应用程序。

I tried to read the NFC tag I just wrote with the simple text "test".我试图阅读我刚刚用简单文本“test”写的 NFC 标签。 However, none of them is working.但是,它们都不起作用。

Is possible read NFC tags with Android using a Samsung Galaxy S3?是否可以使用三星 Galaxy S3 通过 Android 读取 NFC 标签? Is there some app to do it?有什么应用程序可以做到吗?

This is the log output from my Windows app when reading the tag:这是我的 Windows 应用程序读取标签时的日志输出:

SCardEstablishContext succeeded.
Card State changed in ACS ACR122U PICC Interface 0 to available
New reader found: ACS ACR122U PICC Interface 0
Card inserted in ACS ACR122U PICC Interface 0
ATR = 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 01 00 00 00 00 6A
SCardConnect (shared) succeeded.
Active Protocol: T=1
ISO 14443 A, Part3 Card Type: Mifare Standard 1K is detected
Sending APDU to card: FF 82 00 01 06 FF FF FF FF FF FF
SCardTransmit succeeded.
Card response status word: 9000 (OK)
Sending APDU to card: FF 86 00 00 05 01 00 01 60 01
SCardTransmit succeeded.
Card response status word: 9000 (OK)
Sending APDU to card: FF B0 00 01 10
SCardTransmit succeeded.
Card response status word: 9000 (OK)
Card response data: 74 65 73 74 65 00 00 00 00 00 00 00 00 00 00 00(teste)
Card State changed in ACS ACR122U PICC Interface 0 to no card
Card removed from ACS ACR122U PICC Interface 0

Yes, you can read MIFARE Classic tags on the Galaxy S3.是的,您可以在 Galaxy S3 上阅读 MIFARE Classic 标签。

The main problem is how your data on the tag is/should be interpreted.主要问题是如何/应该如何解释标签上的数据。 Most available Android apps will expect the tag to contain data in NFC Data Exchange Format (NDEF), a standardized data format for exchange over the NFC link.大多数可用的 Android 应用程序都希望标签包含 NFC 数据交换格式 (NDEF) 中的数据,这是一种通过 NFC 链接进行交换的标准化数据格式。 However, there is also some NFC tag analyzer tools (such as my NFC TagInfo app and NXP's TagInfo app) that can read abritrary raw data from tags.但是,也有一些 NFC 标签分析器工具(例如我的 NFC TagInfo 应用程序和 NXP 的 TagInfo 应用程序)可以从标签中读取 abritrary 原始数据。 Since you use the default key ( FF FF FF FF FF FF ) as key A, these apps should be able to read the data.由于您使用默认密钥 ( FF FF FF FF FF FF ) 作为密钥 A,因此这些应用程序应该能够读取数据。

You can also implement reading raw data in your own app using the MifareClassic tag technology class.您还可以使用MifareClassic标签技术类在您自己的应用程序中实现读取原始数据。

If you want to use the tag as NDEF tag, you would need format the data on your tag according to NXP's application notes如果要将标签用作 NDEF 标签,则需要根据 NXP 的应用说明格式化标签上的数据

However, note that today many Android devices use NFC chipsets that do not support MIFARE Classic.但是,请注意,如今许多 Android 设备使用支持 MIFARE Classic 的 NFC 芯片组。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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