【发布时间】:2014-12-09 17:28:14
【问题描述】:
HCE 是在 Android 4.4 中实现的,但关于如何在模拟卡中写入的信息很少。
- 我有 CPR 40.30 阅读器
- 此读卡器随附一些示例 NFC 卡。我使用 NFC 读卡应用读取这些卡片。
与 CPR 40.30 兼容的 NFC 卡详细信息
IC制造商: 恩智浦半导体
IC type: MIFARE Ultralight (MF0ICU1) -- NDEF ------------------------------ NFC data set storage not present: Maximum NDEF storage size after format: 46 bytes -- EXTRA ------------------------------ Memory size: 64 bytes total memory * 16 pages, with 4 bytes per page * 48 bytes user memory (12 pages) -- TECH ------------------------------ Technologies supported: ISO/IEC 14443-3 (Type A) compatible ISO/IEC 14443-2 (Type A) compatible Android technology information: Tag description: * TAG: Tech [android.nfc.tech.NfcA, android.nfc.tech.MifareUltralight, android.nfc.tech.NdefFormatable] android.nfc.tech.NdefFormatable android.nfc.tech.MifareUltralight android.nfc.tech.NfcA * Maximum transceive length: 253 bytes * Default maximum transceive time-out: 2000 ms Detailed protocol information: ID: 04:AC:91:52:CB:29:80 ATQA: 0x4400 SAK: 0x00
我想编写 HCE 代码并希望我的 Android 手机像一张卡片一样可以被 CPR 40.30 读卡器读取。我假设 HCE 代码应该模拟具有上述规格的卡,因为读卡器可以读取上述 NFC 卡。
到目前为止,我发现的唯一有用的 HCE 示例代码是 this,但它使用 ISO-DEP。我想改用NFC-A(ISO/IEC 14443 type A)。
如何编写代码来模拟 NFC-A 卡?
参考链接:
【问题讨论】:
-
您好,我正在尝试在 Android 应用程序中模拟 Mifare Card。你是如何解决这个问题的?谢谢
标签: android nfc android-4.4-kitkat hce