0

I am new to NFC protocol. Can someone let me know whether it is possible to exchange NDEF/SNEP messages BOTH ways in one session? I mean from NFC protocol point of view.

I know using Beam feature you can send one-way message [e.g. Phone->PC] but to send other way [e.g. PC->Phone] using Beam you need to tap phone again [i.e. trigger another session]. I want to exchange messages withing one session.

Michael Roland
  • 39,663
  • 10
  • 99
  • 206

2 Answers2

1

With SNEP under Android this is currently not possible. Android offers no way for applications to send or receive a second message. From the SNEP and LLCP (basis of SNEP) protocol point of view this would be possible. (That said: Android should really open up LLCP for everyone!).

If you want to communicate back and forth and you have control over the PC side your only option is to switch from SNEP to card emulation on the PC side.

If your hardware allows you to run a ISO14443-A or ISO14443-B card emulation on the PC you can just emulate a tag containing the NDEF message and then do any bidirectional data-exchange using the IsoDep Tag interface.

Nils Pipenbrinck
  • 83,631
  • 31
  • 151
  • 221
0

As an alternative to using software card emulation on the PC side, you could also use a library like ISMB-SNEP. This library enables somewhat(*) bi-directional data exchange over LLCP/SNEP on Android.

(*) somewhat: It automates the tapping by turning the reader on the PC side off and on for every message exchange so that the user does not need to re-tap.

Michael Roland
  • 39,663
  • 10
  • 99
  • 206