当读卡器连接到我的主机卡仿真服务时出现此错误

时间:2014-06-28 09:52:26

标签: android nfc smartcard hce acr122

我写了基于主机的卡仿真(HCE)应用程序来在我的智能手机上进行移动支付。我还使用nfc-tools库来帮助我编写手机和阅读器上的应用程序。当我尝试在这两个设备上运行代码时,它们都可以连接在一起,但它给出了如下所示的错误:

org.nfctools.scio.TerminalHandler getAvailableTerminal
INFO: Checking terminal: ACS ACR122 0
DEBUG: org.nfctools.spi.acs.AcsDirectChannelTag - command: FF00000004D44A0100
DEBUG: org.nfctools.spi.acs.AcsDirectChannelTag - response: D54B009000
javax.smartcardio.CardException: Cannot connect using direct, connection already established using Unknown protocol 0
     at sun.security.smartcardio.TerminalImpl.connect(Unknown Source)
     at HCECardScanner.run(HostCardEmulationCardScanner.java:18)
     at Reader.run(Reader.java:622)
     at Reader$11.actionPerformed(Reader.java:565)

此外,当我在应用程序的日志中看到时,我发现My Application在启动和运行基于主机的卡仿真服务方面存在问题。

06-28 14:18:30.083: I/ActivityManager(974): Start proc com.example.nfchcepayment for service com.example.nfchcepayment/.FirstApplet: pid=6068 uid=10268 gids={50268}
06-28 14:18:30.093: E/jdwp(6068): Failed sending reply to debugger: Broken pipe
06-28 14:18:30.093: D/dalvikvm(6068): Debugger has detached; object registry had 1 entries
06-28 14:18:30.103: I/dalvikvm(6068): Could not find method javacard.framework.ISOException.throwIt, referenced from method com.example.nfchcepayment.FirstApplet.processCommandApdu

两个错误都有关系吗?

0 个答案:

没有答案