Home > other >  Read NDEF Message from Android/IOS using NFC Reader
Read NDEF Message from Android/IOS using NFC Reader

Time:05-08

I want to transfer a tiny bit of data from my phone to an NFC reader (max 256 chars). It seems that IOS and Android can read/write tags, is there any way I can read these NDEF messages using an NFC reader and then process them?

Minimal experience with NFC stuff, so I apologise if I've completely misunderstood the function.

Cheers, Peter

CodePudding user response:

First off yes what you want to do is possible with the right hardware and software.

The NFC specification does have a peer to peer specification but forget about using that as this is not available on iOS and on Android it has been removed from Android 10 onwards.

In NFC there are 2 types of devices NFC initiator and NFC targets.

An initiator always starts the comms process and the target responds.

A lot of NFC reader type chips can be an initiator as well as a target, while Apple hardware can be both initiator and a target, Only Apple themselves can make it a target. On Android normal developers can make the hardware behave as both initiator and a target.

So this means the phone side can only be the initiator (which is used when reading and writing to NFC Tags).

Therefore the NFC reader has to be the target, this is mostly done by a process call Host Card Emulation (HCE) but some NFC readers can handle this in hardware without the Host CPU being involved.

A lot of this can be done with anything based on the PN532 chip with it's "ISO/IEC14443-4 Type A PICC" mode, where is behaves like a Type 4A Tag with the help of it's Host CPU

I would ignore the other emulation modes like Mifare Classic and Felica emulation as these are less supported on reader hardware.

Once you have the reader setup in the right mode and software written to respond in the right fashion, then on the phone side you just write to what looks like a Type 4 tag to send data and read to receive data.

  • Related