Support for passive tag -and- SNEP peer communication

Asked by Pelle Nielsen


I'm working on a system intended to communicate with an Android Beam (SNEP) device using the SCL3711. I also want the system to recognize and read passive Type2 tags. Is there a way to do both? That is, depending on what tag/device is in proximity, it either communicates via SNEP with a Beam device or reads a passive target?

I'm having success with doing both individually, but not in the same application - because once I have a clf (nfc.ContactlessFrontend), I either have to poll for a passive tag or llcp-connect to a device. There doesn't seem to be a way to check the type of peer/tag before executing either of these commands.

Any tips (or confirmation that this isn't possible) would be great.

Question information

English Edit question
nfcpy Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Stephen Tiedemann (stephen-tiedemann) said :

This should be no problem. If you look into the llcp_connect() function, which both snep_server and snep_client have, you'll note that it is just a convinience wrapper around alternatingly calling clf.listen() and clf.poll(). The call to clf.poll() does actually return objects of either class nfc.DEP or nfc.TAG and for the tag case it will be even more specifically an object of class Type1Tag, Type2Tag or Type3Tag (type 4 tags are not yet supported). In the SNEP examples thise tag objects are just not accepted as a valid peer but you can simply expand that.

Revision history for this message
Pelle Nielsen (09539-8) said :

Great, I'll give that a try and let you know if I run into trouble.

Can you help with this problem?

Provide an answer of your own, or ask Pelle Nielsen for more information if necessary.

To post a message you must log in.