问题标签 [hce]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
3 回答
20679 浏览

android - 通过软件 NFC 进行卡模拟

在阅读了很多问题后,我决定发布这个。我读到 android 的股票版本不支持用于卡模拟的 API。此外,由于 google/samsung 管理的密钥,我们无法编写自定义应用程序来保护嵌入在 nfc 控制器中的元素。

我需要模拟一张卡片(mifare 或 desfire 等)。我可以看到的选项是通过软件进行。我有一个 ACR122U 阅读器,并且我已经测试了 NFC P2P 模式在我拥有的 Nexus-S 上运行良好。

1)我看到一个网站说nexus s的NFC控制器(pn532)可以模拟mifare 4k卡。如果这是真的,我可以向这个模拟卡写入/读取 apdu 命令吗?(可能如果我使用像 cyanogenmod 这样的改装 rom)

2)我可以编写一个android应用程序来读取从阅读器发送的apdu命令并生成适当的响应(如果不完全,那么仅在某种程度上)。为此,我搜索了我们需要用 cynagenmod 修补 nexus 。有人试过通过这种方法模拟卡吗?

我认为这是可能的,因为我们有来自门禁控制公司的产品,它们提供移动应用程序,人们可以通过这些产品打开门,例如http://www.assaabloy.com/en/com/Products/seos-mobile-access/

0 投票
1 回答
3540 浏览

android - 卡模拟 Mifare

根据这篇文章,我正在尝试在 android 上模拟管理 APDU 的 mifare 卡。根据 APDU 接收,我的应用程序应该回答正确的 APDU,从而模拟 mifare 行为。

使用 rfidiot.py,阅读 mifare 卡给我:

通过我的应用程序模拟卡片,我得到了一个错误的说法:

FF B0 00 01 01 APDU 命令出现错误。而且我不知道6981 APDU命令来自哪里..

有人可以帮助我解决这个“错误”吗?

0 投票
2 回答
1053 浏览

android - 三星 Galaxy S4 是否与 CyanogenMod 的智能卡仿真 (NFC) 兼容?

我有三星 Galaxy S4 和 SCM SDI010 读卡器。我的目标是让 S4 模拟智能卡,然后可以被读卡器读取。

我尝试应用此处描述的 PKI 小程序示例(安装 CyanogenMod 10.2,在 S4 上启动 se-emulator 并在我的 Linux PC 上启动 se-pki-client)。但是连接建立失败,读取器端出现“SCARD_W_UNRESPONSIVE_CARD”或“SCARD_W_UNPOWERED_CARD”异常。

  1. 有谁知道 CyanogeMod 是否支持 S4 上的 NFC 芯片进行卡模拟?
  2. 我是否需要在上面教程中没有直接描述的 S4 上显式激活卡模拟?

此致

0 投票
2 回答
6115 浏览

android - 从 NFC 应用程序到 PN532 读卡器的数据传输

我正在从事基于 NFC 的支付的最后一年项目,我被困在这里,因为我在网上看到你不能将数据(比如信用卡详细信息)从 NFC 手机传输到 PN532 读卡器..我读到了 P2P 模式来传输数据,但我没有得到一个确切的想法如何做到这一点..有什么方法可以将卡详细信息从电话应用程序传输到 NFC 读卡器?我刚开始项目,目前正在收集有关我的项目的所有信息!但我无法将数据从手机传输到阅读器,那么我的项目就会失败!

希望有人能帮忙!

0 投票
1 回答
11223 浏览

android - 哪些带 NFC 的手机全面支持 Mifare Classic(1K 和 4K)卡?

Google 已在最新的 Nexus 4 中停止支持此类标签,但哪些手机仍有读取/写入 Mifare Classic 卡的可能性?对具有强大处理器的高端型号特别感兴趣。

任何人都可以提供一些关于用您的手机模拟此类 nfc 标签的信息吗?

提前致谢

0 投票
1 回答
5320 浏览

android - Android 和 ACR122U 读卡器中的 NFC 编程

我需要将一些数据写入 NFC 标签,我需要的标签不是物理 NFC 标签,但我需要以编程方式制作标签并将我的数据写入其中(卡仿真或点对点模式)。我在手机中制作的这个标签必须能够被 ACR122u 阅读器读取。如何在 Android 中进行编程?

0 投票
4 回答
19429 浏览

android - 具有固定卡 ID 的基于主机的卡仿真

Android 4.4 引入了基于主机的卡仿真 (HCE)。如您所知,所有 NFC 卡都带有一个固定的卡 ID ( NfcAdapter.EXTRA_ID)。

我的办公室门禁通常会检测 NFC 卡 ID 以进行授权。将手机刷到 KitKat 后,我​​尝试使用访问阅读器扫描手机。但是每当屏幕关闭并再次打开时,我都会得到一个不同的卡 ID。

我确实尝试保持手机屏幕打开,并将模拟卡 ID 注册到门禁系统。它设法授予打开门的权限。但这在屏幕关闭并再次打开后将不起作用。

自从 KitKat 引入 HCE 模式以来,我一直在尝试使用手机模拟我的门禁卡。

修复手机模拟卡 ID 的任何想法?

0 投票
1 回答
561 浏览

android - 创建和发送类似于护照芯片的 NDEFMessage

我正在使用和测试这个库http://jmrtd.org/,这是一项很棒的工作。我学会了如何读取和处理护照芯片上的所有数据。现在我的下一步将是创建一个简单的 android 应用程序,用于发送我必须使用同一个库读取的 NdefMessage。我想最简单的方法是创建一个模拟护照芯片结构的 NdefMessage 。这可能吗?您对此有什么建议或经验吗?谢谢

0 投票
2 回答
2778 浏览

android - 获取基于 NFC 的识别系统的应用程序 ID

我正在研究基于 nfc 的识别系统。我在 android 设备上存储数据,并且在识别时 nfc 读取器从 android 设备读取数据,android 设备应该在基于 ISO/IEC 14443-3 的基于 HOST 的卡仿真中运行,并部署 nfc 读取器根据 Google Developer NFC 文档发送应用程序 ID 以识别服务,因此我如何获取自定义应用程序的应用程序 ID

0 投票
5 回答
8562 浏览

android - Making Host Card Emulation work for payment

I've been using StackOverflow for years now, always finding answers to my questions before even asking them, but today I'm stuck.

As I happen to have a working POS terminal (the EMV Chip&Pin kind), I wanted to look into host card emulation.

The terminal works with the latest version of Tapp, so I know that the terminal is good and that my N7 with Kitkat can actually do payment (or at least the terminal do a series of good sounding bleeps and bloops, and the tablet launch Tapp's enrollment screen). So I've read the manual(s) and written a bunch of lines with the objective of seeing something arrive on my HostApduService. It partially works as I can find my dummy "card" in the Tap&Pay settings of the tablet.

But the "payment" part doesn't work: just two high-pitched bleeps from the POS terminal and nothing on the tablet. My HostApduService is not called.

I've tried all kind of different AIDs: real ones and silly ones, short and long, but nothing works.

When using Tapp, the LogCat says :

And with my code, the LogCat is :

Obviously with my code, the OS doesn't bind the HCE intent to my service. But why?

You'll find below my manifest :

my apduservice.xml :

And for good measure, the service (as you can see at the moment, it does nothing except Logging) :

If you have ideas on why it doesn't work, I'll be forever grateful. For now, I'm stumped.

Regards

Philippe