NFC P2P Mode with Android

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

NFC P2P Mode with Android

2,934 次查看
christiantasche
Contributor I

I use the NXP NFC Libary with a CLRC663 frontend. I can act as client and send a NDEF Message to an Android phone with put. I can act as server and receive a NDEF message from an Android phone.

Since the default nfc server only accept messages, how do i get a bidirectional connection between CLRC663 and android devices?

Do i have to configure my own server (non default) to use put and get. Or do i have to be client and server at the same time on the clrc663?

I have read Simple NDEF Exchange Protocol specification. "The default server SHALL NOT accept Get requests. The appropriate response for a Get requestmessage is Not Implemented."
So only act as client and try tu use GET to receive on the CLRC side is not possible.

Has anyone made a realy P2P application whre i can communicate back and forth?

标签 (1)
0 项奖励
4 回复数

2,207 次查看
Kan_Li
NXP TechSupport
NXP TechSupport

You may configure the server to accept both put and get requests, it is not possible to make clrc663 work as client and server in the same time.

Hope that helps,


Have a great day,
Kan

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励

2,207 次查看
christiantasche
Contributor I

Since my CLRC663 should be Client and my Server should run on Android i don't know if it's possible to use any other server than "urn:nfc:sn:snep".
Do you have any code examples on android to set up a server with GET and PUT functionality?

0 项奖励

2,207 次查看
Kan_Li
NXP TechSupport
NXP TechSupport

Maybe you can try with the TagWriter App:NFC TagWriter by NXP - Apps on Google Play 


Have a great day,
Kan

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励

2,207 次查看
christiantasche
Contributor I

Hello Kan,

I don't want to write Tags. I can do that with my device.
I want a bidirctional data transfer between my mikrocontroller with clrc 663 frontend and an Android NFC device.

Something like a asynchronous serial connection. In the moment i could only send data from one side to the other. But i would like to build an app wich could be send data over nfc and get the reply over the clrc 663.

In the NXP Library documents there are this parts in the faq:

12.2 Is it mandatory to use SNEP protocol for the P2P data exchange?
According to the protocol stack defined by the Peer-to-Peer operating mode, it is not mandatory to use the application-level SNEP protocol. A developer could implement its own communication logic on top of LLCP link-level protocol.
However, we strongly recommend to use the SNEP protocol. Firstly, because it is already implemented as part of the NFC Reader Library. Secondly, to ensure interoperability when communicating with other NFC-enabled devices such as smartphones, tablets, laptops, infrastructure readers, and other devices.

12.3 Why my Android phone does not respond to SNEP GET requests?
The current Android Operating System implementation is compliant with the SNEP Default Server defined by the NFC Forum. The SNEP protocol specification mandates the SNEP Default Server to only implement PUT requests and to return “NOT_IMPLEMENTED” response code to GET requests.

So it recommend to use SNEP but it only works one way... Anyone could help me where i found informatiosn to get this solved?

0 项奖励