基于主机卡仿真,任何指导吗? [英] Host-based Card Emulation, any guidance please?

查看:228
本文介绍了基于主机卡仿真,任何指导吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的这个领域,我得到了一台Nexus S(CyanogenMod11 =安卓4.4.2奇巧) 而我需要使用HCE(基于主机卡仿真)模式,以模拟非接触式卡。

I'm new to this field, I got a Nexus S ( CyanogenMod11 = Android Kitkat 4.4.2) And I need to use HCE (Host-Based Card Emulation) mode in order to emulate a contactless card.

在台阶上,我需要为了做到这一点遵循提示任何指导? (? - ?我需要编程模拟安全元素把它放在云)

Any guidance on the steps and the tips I need to follow in order to accomplish this? ( - Do I need to program the simulated Secure Element? put it on cloud? )

PS:我一定要使用新的阅读模式还,因为我的应用程序将会被其他Android的NFC功能的手机,而不是通过一个NFC读取器读取

P.S: I have to use the new Reader Mode also, because my app is going to be read by another Android NfC-enabled phone and not by an NFC reader.

感谢你。

推荐答案

的CyanogenMod 11之前,的CyanogenMod支持它自己的基于主机的卡模拟功能。你可以注册一个<一个href="http://developer.android.com/guide/topics/connectivity/nfc/advanced-nfc.html#foreground-dispatch"相对=nofollow>前景派遣为 android.nfc.tech.IsoPcdA 技术,然后可以通过模拟一个智能卡的 IsoPcdA.transceive()方法。见尼古拉Elenkov的博客文章关于如何使用此API。

Before CyanogenMod 11, CyanogenMod supported its own host-based card emulation functionality. You could register a foreground dispatch for the android.nfc.tech.IsoPcdA technology and could then emulate a smartcard by using the IsoPcdA.transceive() method. See Nikolay Elenkov's blog post on how to use this API.

不过,href="https://github.com/CyanogenMod/android_packages_apps_Nfc/tree/cm-11.0" rel="nofollow">的CyanogenMod 11源(THT的NFC服务的具体)浏览通过似乎这个功能,取而代之的Andr​​oid 4.4系统的官方HCE API已下降11版本。

However, browsing through the CyanogenMod 11 source (specifically tht of the NFC service) it seems that this functionality has been dropped in version 11 in favor of Android 4.4's official HCE API.

官方Android 4.4 HCE API允许应用程序来模拟接触式智能卡(ISO 14443-4 + ISO 7816-4的APDU)在Android的服务。这项服务将处理所有传入的APDU命令为一个应用程序,并生成适当的响应APDU的。见href="http://developer.android.com/guide/topics/connectivity/nfc/hce.html" rel="nofollow">官方API用户指南有关如何注册的详细信息,如何在您的HCE服务处理传入的APDU命令这个答案。

The official Android 4.4 HCE API permits apps to emulate a contactless smartcard (ISO 14443-4 + ISO 7816-4 APDUs) in an Android service. That service would handle all incoming command APDUs for an application and generate proper response APDUs. See the official API user guide for further information on how to register such a HCE service and this answer on how to handle incoming command APDUs within your HCE service.

不幸的是此API不可或者在使用libnfc-NXP作为低级别的NFC堆叠设备(见 routeAid() 和<一href="https://github.com/CyanogenMod/android_packages_apps_Nfc/blob/cm-11.0/nxp/src/com/android/nfc/dhimpl/NativeNfcManager.java#L195-L198"相对=nofollow> enableRoutingToHost() 中的CyanogenMod 11源$ C ​​$ C)。

Unfortunately this API is not available either on devices that use libnfc-nxp as the low-level NFC stack (see the empty implementation of routeAid() and enableRoutingToHost() in the CyanogenMod 11 source code).

总结一下这一点,它好像的它目前的不可以可以做到基于主机的模拟卡片上的Nexus S采用CM 11 的。

So to summarize this, it seems as if it's currently not possible to do host-based card emulation on a Nexus S with CM 11.

这篇关于基于主机卡仿真,任何指导吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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