marcus905 / libnfc

Automatically exported from code.google.com/p/libnfc
GNU Lesser General Public License v3.0
0 stars 0 forks source link

nfc_emulate_target target release priority over timeout #268

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
nfc_emulate_target blocks indefinitely when you set timeout to 0. It only 
continues when an error occurs or when function ends (i.e. target is released). 
On the other hand, when you set a timeout, nfc_emulate_target goes on no matter 
there is a target or not.

Is it possible to code something in order that, if it detects a target, the 
timeout value becomes 0 so emulate_target only goes on when the user releases 
the target?

Why am I using a timeout value?

I'm emulating a tag type 4 in order to be read by Android devices but I also 
want to be able to read mifare tags so I'm alternating between 
nfc_emulate_target and nfc_initiator_poll_target with timeout set. 

If there is an alternative way (tag emulation in the smartphone is not possible 
because I want to cover the widest range) to cover this case I'm open.

thanks,

blck

Original issue reported on code.google.com by manu.mir...@gmail.com on 17 Feb 2014 at 5:20