User Tools

Site Tools


tutorials:products:rfidnfc:faqs.html

This is an old revision of the document!


Frequently Asked Questions

Blah blah blah

Can I set a delay calling readPassiveTargetID() ?

readPassiveTargetID() intentionally waits around in a blocking delay until a card enters the magnetic field. The reason for this blocking delay is to ensure a well-understood command/response flow. Once the magnetic field is activated and a read request is sent via readPassiveTargetID, you can keep sending new commands to the PN532, but the moment a card or tag enters the field, the PN532 will send a response to the initial read request, even if it's in the middle of some other response or activity. To avoid having to debug this in SW, a blocking delay was implemented to keep the command/response pattern as clear as possible.

As a workaround to this blocking-delay limitation, an optional programmable delay was recently added to the NFC libraries to allow you to set a specific timeout after read requests. By default, the PN532 will wait forever for a card to enter the field, but specifying an optional 8-bit timeout delay will cause the read request to be aborted after the specified delay, and you can safely send new commands without worrying about mixing up response frames.

Example Code:

ToDo

/home/ladyada/public_html/wiki/data/attic/tutorials/products/rfidnfc/faqs.html.1343067208.txt.gz · Last modified: 2016/01/28 18:05 (external edit)