Roverok / libnfc

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

Remove PN532 UART transceive delay #50

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently, the PN532 UART driver seems to be very slow compared with a
Nokia NFC phone (read and write actions on Mifare tags).

The main cause seems to be the 50ms delay added to the "transceive"
function for stability needs. So, I've tried to remove it and...surprise!
It works! :)

With the delay I need 18~20s to read/write a Mifare Classic 1K tag. Without
it the tag is written/read in ~10s. It's still slower than the Nokia phone
(which reads a vCard from a Mifare 1K in only 1~2s), but surely more
acceptable.

Probably the magic is done by recent changes to UART read/write functions
(r183, r184).

So, in my opinion, we can remove it if the situation is confirmed by more
accurate tests and benchmarks.

Original issue reported on code.google.com by emanuele.bertoldi on 8 Dec 2009 at 3:53

GoogleCodeExporter commented 9 years ago
What readers have the pn532?

Original comment by fnargwibble on 8 Dec 2009 at 7:27

GoogleCodeExporter commented 9 years ago
Hi Adam,
I have a PN532 UART on Arygon OEM Reader (Ref: APDB1UA33N). Its a "pn532 only" 
board
with integrated antenna.
You can view it on top-right picture of
http://www.arygon.de/images/stories/produkte-oem-reader/HF-Reader/Mobile/NFC_MIF
ARE_MOBILE_MODULE_APDAB_13.pdf

Original comment by romu...@libnfc.org on 9 Dec 2009 at 9:12

GoogleCodeExporter commented 9 years ago
I'm using the official NXP PN532 Demo Board.

Original comment by emanuele.bertoldi on 9 Dec 2009 at 10:10

GoogleCodeExporter commented 9 years ago
Hi Zuck,
I just try to remove delay in PN532_UART and you're right, it now works fine.

I have tried to replay each situation that make me add some delay (mainly using
nfc-eventd) and I can confirm that each previously wrong case now works great 
(and
speedy).

Fixed in r242.

Many thanks Zuck.

Original comment by romu...@libnfc.org on 9 Dec 2009 at 10:38