简体   繁体   中英

Receive NFC/NDEF message from Android phone to Raspberry Pi

I have an Android app which sends an NDEF message only containing a few words. I can receive that message on another Android device but I would like to be able to receive the message on a Raspberry Pi. Or is NDEF message exchange only an Android to Android thing?

I have searched this on Google and found a possible way that requires you to install Android on the Raspberry Pi but I'm not 100% sure that would work. Also I have the Raspberry Pi model B+.

No, NFC is not limited to Android devices. You can implement NFC communication with pretty much any device that has an NFC front-end. The Raspberry Pi does not have one by default. However, there exist various add-on tools that you could use to add NFC to an RPi, eg

Instead, you could also use some USB NFC reader, like the ACR122U, together with the RPi.

In order to get softwre support for NFC, you would use the libraries provided with those boards or possibly libnfc .

Once you have NFC support on your RPi, there are various ways to exchange NDEF messages with an Android device (which of them could work depend on what NFC front-end you chose):

  • Implement the peer-to-peer protocol stack and the SNEP protocol to exchange an NDEF message through Android Beam.
  • Implement a card emulator that emulates an NFC tag that can be accessed by an Android device that is in reader/writer mode.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM