marcus905 / libnfc

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

PN532 frame preamble parsing shortcoming #289

Open GoogleCodeExporter opened 9 years ago

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

1. PICC emulation using pn532_uart driver and Adafruit PN532 board.
2. Communication interrupts with "Frame preamble+start code mismatch"

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

According to NXP PN532 user manual rev 0.2, frame preamble can be longer than 
one zero byte - see chapter 6.2.1.6. Currently, libnfc hardcodes 0x00, 0x00, 
0xFF as preamble, failing on 0x00, 0x00, 0x00, 0xFF (for example).
Instead, you should skip leading zeroes up to first 0xFF byte.

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

libncf-1.7.1, the same issue is in git master branch, commit 108de27c1b45.

Original issue reported on code.google.com by ro...@jikos.cz on 24 Feb 2015 at 5:10