Android 手机 (Nexus S) 和 NFC 读卡器之间的 P2P NFC 通信?
我需要在 Nexus S 和连接到我的桌面的 NFC 读取器之间建立 P2P 连接。谁能告诉我该怎么做。我什至不知道如何开始。
请尽快回复。
谢谢&问候, 拉胡尔
I need to establish a P2P connection between my Nexus S and a NFC Reader which is attached to my desktop. Can anybody tell me how to do that. I do not even know how to start.
Please Reply Soon.
Thanks & Regards,
Rahul
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要先建立LLCP通道,然后使用NPP协议来实际发送/接收NDEF消息。
LLCP和NDEF是NFC论坛发布的标准,NPP是Google发布的开放标准。所有这些都可以在线获取。
根据您的桌面阅读器,某些工作可能已经完成。如果“nfcpy”支持它,如果它有pn5xx芯片,那么你已经实现了LLCP协议,你只需要NPP。我为我的一个项目做到了这一点,而且非常简单。
如果“nfcpy”不支持它,您可以尝试“libnfc”,它开始支持 LLCP。同样,您需要在 LLCP 之上实现 NPP 协议。
解决这些问题后,您应该观看来自 Google 人员的 YouTube 视频“如何 NFC”,并研究 Android 开发人员网站上的示例 NFC 应用程序。
You need to establish a LLCP channel first, and then use the NPP protocol to actually send/receive the NDEF messages.
LLCP and NDEF are standards published by the NFC forum, NPP is an open standard published by Google. All are available online.
Depending on your desktop reader, some work may already be done. If "nfcpy" supports it, if it has a pn5xx chip, then you already have the LLCP protocol implemented and you just need NPP. I did that for a project of mine and it's pretty easy.
If "nfcpy" does not support it you can try "libnfc" which is starting to support LLCP. Again, you would need to implement the NPP protocol on top of LLCP.
After working out these issues you should watch the youtube video "how to NFC" from the Google guys and study the sample NFC applications on the Android developer site.