nfc-tools / libnfc

Platform independent Near Field Communication (NFC) library
http://nfc-tools.org
GNU Lesser General Public License v3.0
1.71k stars 442 forks source link

Receiving bytes as tag with long timeout yields error #203

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

I am using an ACR122U-A9.
Emulate a tag or a plain uid using nfc-emulate-* (see also attached debug 
output).
Put the ACR122U-A9 on a SCM SCL011 and wait.

What is the expected output? What do you see instead?

The timeout for receiving bytes is set to 0. But instead of waiting for some 
bytes, I get an unexpected "Too small reply" error. Effectively there is only 
someting like two seconds before the program aborts. Note that transeiving data 
before the two second "timeout" is fine.

What version of the product are you using? On what operating system?

libnfc r1447, debian testing

Original issue reported on code.google.com by frankmor...@googlemail.com on 2 Aug 2012 at 11:32

Attachments:

GoogleCodeExporter commented 9 years ago
As described in source code, nfc-emulate-forum-tag2 is not able to work on many 
context:

" * This example allow to emulate an NFC Forum Tag Type 2 that contains a 
read-only NDEF message.
 *
 * It have been developed using PN533 USB hardware as target and Google Nexus S phone as initiator.
 *
 * This is know to NOT work with Nokia 6212 Classic and could not work with
 * several NFC Forum compliant devices due to these reasons:
 *  - The emulated target only have a 4 bytes UID where 7 bytes UID (as a real
 *  Mifare Ultralight tag) are usually attempted;
 *  - The chip is emulating a ISO/IEC 14443-3 tag, without any hardware helper.
 *  If the initiator have too short timeouts for software-based emulation
 *  (which is usually the case), this example will failed, this is not a bug
 *  and we can't do anything using this kind of hardware (PN531/PN533).
"

Do you think we have to put a warning during runtime ?

Original comment by romu...@libnfc.org on 17 Sep 2012 at 3:16

GoogleCodeExporter commented 9 years ago
I've added a man page in r1454 as this example was still missing a man page.
The man page repeats the warnings presented above.

Original comment by yob...@gmail.com on 19 Sep 2012 at 10:27