1
votes

I want to do the following:

  1. Hold iPhone in front of my device's NFC tag
  2. Read the tag's NDEF messages
    • After reading, the tag's NDEF messages will be overwritten by my device (not by the iPhone). Go to 2.
    • After reading a "no more data" message, stop reading and go to 3.
  3. Finish

Is it possible to do this with CoreNFC without having to move the iPhone back and forth to recognize the "new" NFC tag again?

1
Thanks to iOS 13, I have no longer go the NDEF way. :) - pinki

1 Answers

0
votes

I understand your setup consists of
- An NFC Tag emulated by your device (not necessarily an iPhone)
- iPhone acting as a reader
- my device acting as a writer

Sequence of operations
1) Device is in CE mode with NDEF content
2) Device is proximated to iPhone which then reads the tag
3) Device re-writes the tag with a fresh NDEF message
4) iPhone reads the tag
5) Steps 3 and 4 repeat until step 3 is replaced with 'erase tag'

Answers to your query:
First of all, you need a synchronization mechanism between iPhone and your device to serialise step 3 and 4.
Secondly, after reading is complete iPhone needs to deselect the card so that it can select it after the new data is written. Usually, this will not be a standard behavior of iPhone since it expects the tag to move away and be brought back. So, you need to tweak iPhone.

Note: Device for subsequent discussions can be considered as an MCU connected to an N-TAG. In this case, its not in CE-mode, but is a physical Tag.