NFC ACR122U (reader/writer mode) and Nexus 5(HCE mode) example

1.4k views Asked by At

i am developing an application where users can transfer files from phone to desktop using NFC technology. As i found in this post there is an option to use ACR122U in reader/writer mode and Nexus 5 phone in HCE mode. Can anyone please suggest some samples of such application as it is difficult for me to understand how it works. Your help will be so appreciated, thanks in advance.

2

There are 2 answers

5
S.Pols On

When you use HCE on your Nexus 5 the Nexus will emulate a NFC tag. The ACR122U can read this tag in reader/writer mode, so that makes the communication possible. Study this example, it will help you farther. For more general information about HCE on Android you can read this.

0
Prithiviraj Damodaran On

I have worked in this exact use case. I used P2P mode. I didn't have to treat one partner as a tag, infact data transfer worked both ways.

In my experiment- Smart phone side I tried Samsung S4, HTC One, Nexus 3, Nokia LUMIA etc.. worked like a charm. There is some limitation in the APDU/payload size. For Reader to Phone case. For your case P2P mode with attachments works fine.

  1. I downloaded this NFC library and tweaked it to my needs. I used it in WP7 along with ACCR122U.
  2. I wrote a simple Android app to receive/send data to ACCR122U.

if your ok to try P2P mode with SNEP as opposed to NPP, do let me know.I can help you.