Android和Symbian NFC移动开发问题与解答(FAQ) [英] Android and Symbian NFC mobile development questions and answers (FAQ)

查看:186
本文介绍了Android和Symbian NFC移动开发问题与解答(FAQ)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

让我们在一个共同的地方思路对NFC开发,技术入股......我热烈欢迎,你可能有任何意见 - 无论是关于Android或Symbian的SDK或有关NFC一般

从我的角度来看,一般的问题是什么,我们可以开发,也就是说,我们可以给市场带来什么样的应用程序与NFC技术?而如何才能,开发商赚钱,从NFC受益?

我觉得这是一种期待的NFC将打开大门,无数的服务和可能性开发商 - 但是是真的吗?在NFC和其它无线技术(BT,无线网络)之间的区别是,它已经自带了主要的用例 - 付款,运输票证和密钥(楼宇门禁)。但对于所有这些用例需要一个安全的元素,它是

  • 或者通过电话制造商控制,如:谷歌 - 看到谷歌钱包,它使用专门的内置NXP SecureMX 的在Nexus S(这是值得它可以非常难以改变,如果我们不想妥协的安全性),
  • 或通过的 UICC 的访问SIM卡(在Android和Symbian /和MeeGo /手机为好);在这里交易,必须与运营商进行。

但有一个国家3或4的运营商,怎么可能这将是一个中等规模的公司,他们将允许SIM卡运行自己的小程序?又是怎么回事更多的全球解决方案?上述所有服务/用例需要大量的协调所有的球员和一个完善的生态系统(银行,MNO,NFC芯片制造商,手机制造商,TSM ...)。

他们仍是P2P应用程序选项,标记读 - 但很多功能会被已经内置在手机中,所以这看起来并不像金矿...

我觉得机会可能更大,如果手机将包括 NFC-WI(S2C) - 有这个接口(由ECMA指定)和微型SD卡的NFC-WI支持(已指定由SD卡协会)将可能允许购买SD卡的任意一个公司的安全元素......但它不是在市场上,并没有看任何东西很快就会出现。

什么是你的视野和经验与NFC和移动电话的发展?

解决方案

为了更有点实用,不仅有理论,我已经张贴在的xda-developers 启用卡模拟模式在目前唯一的android手机支持NFC(的的Nexus S)。你和其他人可能有兴趣通过自己玩弄卡模拟模式。考虑到,这仅是为了实验目的

它们适用于的AOSP源姜饼版本2.3.4_r1。它们允许:

  • 在的Nexus S.启用NFC卡模拟模式,这种模式始终处于启用状态。
  • 禁用阅读器模式,让卡模拟是唯一一个工作。
  • 选择而不是嵌入之一的外部安全元件(在UICC)(以SmartMX芯片)。
  • 虽然不相关,解除时间限制蓝牙可发现性选项。

我已经找到了有关Android的NFC卡模拟至今:

  • 在卡仿真默认情况下,对库存图片禁用,需要固件修改。 NFC系统的应用和libnfc-NXP系统库的改造是看的地方。
  • 在嵌入式SmartMX芯片内部的Nexus S presents本身作为双智能卡。基于一个可编程一(允许在它cardlets的安装)和一个4K的Mifare之一。
  • 的4K Mifare卡具有缺省键,因此它可以被写入/读从外部读取器。
  • 的可编程卡应该是 GP 兼容,但任何人,除非谷歌能与它拨弄因为快捷键都没有公开。
  • 的Nexus S确实支持SWP,并允许与位于一个UICC内的安全元件进行操作。
  • 在应用程序的不能直接访问到安全元件的任意内容。一方面嵌入式SE是不可访问,因为我们不知道的密钥。另一方面该外部元件是由SWP的装置入店外部(连接到NFC控制器)但不会在内部,因为AFAIK SIM插槽没有被其它装置向NFC控制器相连。这将仅剩下一条路径,基带处理器。不过BB固件propietary由制造商控制。三星一直没有实施 3GPP TS 27.007技​​术规范与它进行交互在其BB固件
  • OTA访问外部SE应该是可能的,这在于移动网络运营商的手中。一些可能提供TSM服务,以允许SE第三方接入内部UICC。

通过你提到的技术(NFC-WI)已经用在Nexus S的互连NFC控制器与嵌入式安全元件的方式。

Upate

要总结我的回答斯登的问题:

  

由于的Mifare 4K地区有默认的按键,任何与外部   NFC读取器可以更改键和安全地储存的值存在 - 是   这是否正确?你尝试了吗?这是否附带任何困难?

简短的回答,我做访问的Mifare 4K从外部读卡器。我可以修改默认的按键了。这些困难来自于修改系统资源,并建立一个自定义固件自己。

  

在使用外部NFC阅读器的唯一途径如何访问   MIFARE空间?

从理论上讲没有。另一种方法将被发送的APDU到SIM卡,包含的Mifare命令的Mifare卡上执行。

  

例如可安装在Android手机应用程序读取/写入一些   使用一些API(超过NFC控制器和NFC-WI数据的Mifare 4K   路径)?例如可寻求换机器人的帮助呢?

有关暂时还没有。虽然你修改与寻求换安卓补丁AOSP源(我做到了我自己),你的应用程序将刚刚崩溃,股票手机。原因是,他们没有实施 3GPP TS 27.007技​​术规范,允许应用处理器直接发送的APDU到SIM卡(UICC)。

但是可能会有一些提前的光隧道,因为在法国citizy 项目已经使用NFC技术与安全元件模式Android手机,走的是UICC安全元件的方法。事实上,有一个修改<一个href="http://androidmac.com/news/samsung-galaxy-s-ii-citizy-nfc-gt-i9101-is-available-from-orange.html">Samsung GALAXY SII 模型的使用和新的<一个href="http://www.frandroid.com/test/84261_prise-en-main-de-lacer-liquid-ex$p$pss-sous-android-2-3/">Acer液体防爆preSS 也将很快提供给集成到citizy。这些手机都必然有其基带处理器固件中实现所需的TS 27.007规范。当涉及到应用处理器,我不知道他们是否采取了SEEK换机器人给G和D路径或OpenNFC的不安全。作为法国人我敢打赌全为最后一个。

Let’s share on a common place ideas about the NFC development, technology… I warmly welcome any comments you might have – either about the Android or Symbian SDK or about the NFC in general.

From my point of view the general question is what we can develop, i.e. what kinds of applications can we bring to the market with the NFC technology? And how can we, developers, earn money and benefit from the NFC?

I think there is an expectation the NFC will open the door for numerous services and possibilities for developers – but is that true? The difference between the NFC and other wireless technologies (BT, WiFi) is that it already comes with major use cases – payment, transportation tickets and keys (building access). But for all these use cases you need a secure element, which is

  • either controlled by the phone manufacturer, e.g. Google – see Google Wallet which uses exclusively the built-in NXP SecureMX on Nexus S (and this is something which can be very hardly changed if we do not want to compromise the security),
  • or accessible via UICC on SIM card (on Android and Symbian /and MeeGO/ phone as well); here the deal has to be made with operators.

But having 3 or 4 operators in a country, how probable it will be for a middle-sized company that they will allow running their applets on SIM cards? And what about more worldwide solutions? All above mentioned services/use cases need a lot of coordination of all the players and a well established ecosystem (banks, MNO, NFC chip producers, phone manufacturers, TSM…).

They are still options for p2p applications, tags reading – but many functionality will be already built-in in the phone, so this does not look like goldmine…

I think the chances can be bigger if the phone will include the NFC-WI(S2C) – having this interface (specified by ECMA) and micro SD cards with the NFC-WI support (already specified by the SD card association) will possibly allow purchasing the SD cards with secure elements for an arbitrary company… But it is not on the market and it does not look anything will appear soon.

What is your vision and experience with NFC and mobile phone development?

解决方案

In order to be a little bit more practical, and not only theoretical, I have posted some patches on xda-developers to enable card emulation mode on the currently unique android phone supporting NFC (the Nexus S). You and others might be interested in playing around with card emulation mode by yourselves. Take into consideration that this is only for experimental purposes.

They apply to gingerbread versión 2.3.4_r1 of the AOSP sources. They allow:

  • Enabling NFC card emulation mode on the Nexus S. This mode is always enabled.
  • Disabling reader mode, letting the card emulation being the only one working.
  • Selecting an external secure element (in UICC) instead of the embedded one (in SmartMX chip).
  • Although not related, removing time-limit to bluetooth discoverability option.

What I have found out about NFC card emulation on Android so far:

  • Card emulation is disabled by default on stock images and require a firmware modification. Alteration of Nfc system application and libnfc-nxp system library are the places to look at.
  • Embedded SmartMX chip inside Nexus S presents itself as a dual smartcard. A programable one (allowing installing of cardlets on it) based and a 4K Mifare one.
  • The 4K Mifare card has default keys, so it can be written/read from an external reader.
  • The programable card is supposed to be GP compatible, but no one except Google can fiddle with it since access keys are not public.
  • Nexus S does support SWP and allows to operate with a secure element located inside an UICC.
  • Applications can not access directly to any contents of secure elements. On one hand the embedded SE is unaccessible because we do not know the keys. On the other hand the external element is accesible externally by means of SWP (that connects to NFC controller) but not internally because AFAIK the SIM slot is not connected by other means to the NFC controller. This leaves us with only one path, the baseband processor. However BB firmware is propietary and controlled by manufacturers. Samsung has not implemented the 3GPP TS 27.007 Technical Specification to interact with it in its BB firmware.
  • OTA access to external SE should be possible, this lies in hands of MNOs. Some of the might offer TSM services to allow 3rd party access to SE inside UICC.

By the way the technology you mention (NFC-WI) is already used in the Nexus S to interconnect the NFC controller with the embedded secure element.

Upate

To summarize I answer Sten's questions:

Since the Mifare 4K area has default keys, anybody with the external NFC reader can change the keys and securely store values there – is that correct? Did you try it? Does this come with any difficulties?

Short answer yes, I did access Mifare 4K from an external reader. I was able to modify default keys too. The difficulties come from modifying system sources and building a custom firmware yourself.

Is use of the external NFC reader the only way how to access the Mifare space?

Theoretically no. The other alternative would be sending APDUs to the SIM, containing the Mifare commands to execute on the Mifare card.

Can e.g. application installed on the Android phone read/write some data to Mifare 4K using some API (over NFC controller and NFC-WI path)? Can e.g. seek-for-android help there?

For the time being no. Though you modify the AOSP sources with seek-for-android patches (I did it myself) your application will just crash with stock phones. The reason is that they have not implemented the 3GPP TS 27.007 Technical Specification, that allows the application processor to send APDUs directly to the SIM (UICC).

However there could be some light ahead of the tunnel, since citizy project in France are already using secure element mode of NFC technology with Android phones, taking the UICC secure element approach. In fact there is a modified Samsung Galaxy SII model in use and the new Acer Liquid Express will also be soon available to integrate into citizy. Those phones are bound to have the required TS 27.007 specification implemented in their baseband processor firmware. When it comes to application processor I do not know if they took the SEEK-for-android from G&D path or the OpenNFC from Insecure. Being french I would bet all-in for the last one.

这篇关于Android和Symbian NFC移动开发问题与解答(FAQ)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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