如何模拟一个NFC标签在Android手机上 [英] How to emulate a nfc-tag on an android phone

查看:575
本文介绍了如何模拟一个NFC标签在Android手机上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Android手机(Nexus S的,SDK V15),这将发送一个字符串,通过使用标签仿真的NFC读取器/写入器模式运行的开发板。我知道这是不是正式的Andr​​oid的支持,所以我能做到这一点本身通过直接访问驱动程序(?)。

I have an android phone (nexus s, sdk v15) which shall send a string to a development board running in nfc-reader/writer-mode by using tag-emulation. I know this is not officially supported by android, so I could do it natively by accessing the driver directly(?).

有任何实际的例子在那里,任何人都已经这样做之前,或一个应用程序做到这一点(和preferably是开源?)

Is there any example out there where anyone has done this before or an app which does this (and preferably is open source?)

我发现谷歌的一些东西,它通常建议不要这样做,或在人们谈论怎么会是可能的或者他们怎么样了(很一般)做这件事,但我无法找到任何code或precise建议。

I found some stuff on google where it is generally advised not to do this, or where people talk about how it would be possible or how they've (very generally) done it, but I couldn't find any code or precise advice.

我不希望访问安全元件或做任何智能卡的东西,需要由供应商/供应商的批准。我只是要转移的字符串。我也知道这可以通过通过P2P Android的API方法来完成,但这并不用板正常工作,所以我给这个方法一试。

I don't want to access the secure element or do any smartcard stuff that needs to be approved by the vendor/provider. I just want to transfer the string. I also know this could be done by the android api methods via p2p, but this doesn't work well with the board, so I give this approach a try.

推荐答案

对于设备运行的股票奇巧4.4

使用 Android的奇巧4.4 ,可让手机充当一个NFC的卡的能力的是<一个HREF =htt​​p://developer.android.com/guide/topics/connectivity/nfc/hce.html>内置到操作系统让您不再需要依靠的CyanogenMod或自定义ROM。它不会让手机充当本身MIFARE经典标记,但我已经在得到我的电话了很大的成效具有的 ACR122读写器所以我肯定会推荐这个选项,如果你能得到4.4设备上。

With Android KitKat 4.4 the ability to have the phone act as an NFC card is built into the operating system so you no longer have to rely on Cyanogenmod or a custom ROM. It won't let the phone act as a Mifare Classic tag per se but I've had great results in getting my phone to communicate with an ACR122 reader so I'd definitely recommend this option if you can get 4.4 on your device.

如果你想在下面跑4.4和愿意使用的CyanogenMod

这是可能的负载应用到您的设备,让他们通过NFC读取器很容易,但是你必须运行的CyanogenMod ,这个功能的 $ P $与CM 9.1 psent

It is possible to load applications onto your device and have them communicate with a reader via NFC quite easily however you must be running Cyanogenmod, this feature is present from CM 9.1.

婉婷的姜饼运行 (旧的答案)

是的,它是可能的,还有的是放在那里的2.3.4启用它的补丁,我会发布几个链接对你有一个读。

Yes it is possible and there's been a patch put out there for 2.3.4 to enable it, I'll post a few links for you to have a read of.

他们确实需要一个闪烁2.3.4姜饼ROM到您的设备以及其他一些补丁,使卡模拟功能,所以,如果你不愿意这样做,那么他们将没有多大用,但据我知道这是得到它的工作的唯一途径。我还没有实际测试过这个自己,但用户评论暗示它的工作原理。

They do require flashing a 2.3.4 Gingerbread ROM to your device along with some other patches to enable the card emulation features so if you're not willing to do that then they won't be of much use but as far as I'm aware it's the only way to get it working. I haven't actually tested this myself but user comments suggest it works.

下面是一个链接到一个博客,描述了整个过程:<一href="http://techshek4u.blogspot.co.uk/2012/01/applying-card-emulation-patch-to_03.html">http://techshek4u.blogspot.co.uk/2012/01/applying-card-emulation-patch-to_03.html

Here is a link to a blog describing the whole process: http://techshek4u.blogspot.co.uk/2012/01/applying-card-emulation-patch-to_03.html

下面是一个链接到原来的论坛帖子的补丁2.3.4来启用它:
<一href="http://forum.xda-developers.com/showthread.php?t=1281946">http://forum.xda-developers.com/showthread.php?t=1281946

Here is a link to the original forum post with the patch for 2.3.4 to enable it:
http://forum.xda-developers.com/showthread.php?t=1281946

和一个链接到原来的讨论,其中众多的开发者正在努力得到它的工作,这取决于Android和NFC你的技术知识,这可能是或多或少有意思:<一href="https://groups.google.com/forum/#!msg/android-developers/1fw1qfFqpGc/6dlzvTqExN4J">https://groups.google.com/forum/#!msg/android-developers/1fw1qfFqpGc/6dlzvTqExN4J

And a link to the original discussion where various developers are trying to get it working, depending on your technical knowledge of Android and NFC this could be more or less interesting: https://groups.google.com/forum/#!msg/android-developers/1fw1qfFqpGc/6dlzvTqExN4J

注意:根据NFCGuy从他的回答:不要打扰降级您的手机GB如果运行ICS不能符合GB降级NFC固件兼容了,所以如果你闪NFC根本不起作用。将设备与GB。

Caution: According to NFCGuy from his answer "Don't bother with downgrading your phone to GB if it is running ICS. You cannot downgrade the NFC firmware to be compatible again with GB, so NFC will simply not work if you flash your device with GB."

这篇关于如何模拟一个NFC标签在Android手机上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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