Hey,
Just bought a a PN532 Board (ID:364) and hooked it up (Order # 321110). It doesn't seem to be communicating with the host computer. I can confirm that I am using a 3v FTDI, that the FTDI functions correctly and that the host system is able to enumerate the device, that the board is powered, and that the jumpers are set correctly to UART. I have compiled the libnfc drivers and examples on my linux box, mac, and RPi, and can confirm that the nfc-poll app is accessing the correct device (the TX light briefly flashes). Nevertheless, the app times out with:
pn53x_check_communication: Timeout
lt-nfc-poll: ERROR: Unable to open NFC device.
I'm wondering if I got a bad board and if there's any way I can go about exchanging this?
Thanks!
Josh.
EDIT: I got it to poll intermittently (about 1 in every 20 attempts). I'm now sure it's a bad board.
PN532 Board UART Problem
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: PN532 Board UART Problem
What kind of Arduino are you using it with? There's a known issue with some of the older ones not having enough memory to run the driver code properly.
-
- Posts: 4
- Joined: Fri Aug 16, 2013 4:27 pm
Re: PN532 Board UART Problem
Sorry - it's not the Arduino shield but the PN532 breakout board (http://www.adafruit.com/products/364).
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: PN532 Board UART Problem
My mistake. What are you using as the control device, and how are you making the connections?
-
- Posts: 4
- Joined: Fri Aug 16, 2013 4:27 pm
Re: PN532 Board UART Problem
I have tried three different devices - a Linux box, a Macbook Pro, and a Raspberry Pi, all of which used libnfc. Connection to the PN532 breakout is being made with a Sparkfun 3v3 FTDI Basic board (https://www.sparkfun.com/products/9873) which I can confirm works with other applications unrelated to the PN532. Libnfc is configured to use this device as it enumerates (/dev/ttyUSB0 on my Linux box / RPi and /dev/tty.usbserial-BANNED on my Mac).
Like I mentioned earlier, it can connect periodically, but other times fails to connect with a timeout error. I can confirm by the TX / RX lights on the FTDI Basic that it is indeed transmitting to, but not receiving from the PN532.
Edit: This is the response that I will get periodically from the board. Notice the first attempt failed and the second succeeded. There is only one success per 10 attempts (just a guess).
Like I mentioned earlier, it can connect periodically, but other times fails to connect with a timeout error. I can confirm by the TX / RX lights on the FTDI Basic that it is indeed transmitting to, but not receiving from the PN532.
Edit: This is the response that I will get periodically from the board. Notice the first attempt failed and the second succeeded. There is only one success per 10 attempts (just a guess).
Code: Select all
$ sudo ./nfc-poll
/home/josh/Desktop/libnfc/libnfc-1.7.0-rc7/examples/.libs/lt-nfc-poll uses libnfc 1.7.0-rc7
pn53x_check_communication: Timeout
lt-nfc-poll: ERROR: Unable to open NFC device.
$ sudo ./nfc-poll
/home/josh/Desktop/libnfc/libnfc-1.7.0-rc7/examples/.libs/lt-nfc-poll uses libnfc 1.7.0-rc7
NFC reader: pn532_uart:/dev/ttyUSB0 opened
NFC device will poll during 30000 ms (20 pollings of 300 ms for 5 modulations)
ISO/IEC 14443A (106 kbps) target:
ATQA (SENS_RES): 00 04
UID (NFCID1): 12 b9 df c3
SAK (SEL_RES): 08
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: PN532 Board UART Problem
It runs in my mind there was an issue between the PN532 and libnfc-1.7.. let me pass this along to one of our NFC gurus to see if that's still true.
- ktownsend
- Posts: 1447
- Joined: Thu Nov 05, 2009 2:18 am
Re: PN532 Board UART Problem
I believe this is an issue with the current release candidate of libnfc, since I have several known good boards here and sometimes see the same issue myself with 1.7.0-RC7, using two different USB/UART adapters.
The current build is still a release candidate, and I know there have been some changes to the underlying UART code and structure.
The current build is still a release candidate, and I know there have been some changes to the underlying UART code and structure.
-
- Posts: 4
- Joined: Fri Aug 16, 2013 4:27 pm
Re: PN532 Board UART Problem
Thanks both for the replies. I have also tried the latest dev build and pre-RC7 builds to no avail. I have also tried multiple baud rates from 9600 up to 250000 with no success. Attached is the debug output from the most recent dev.
Out of curiosity, is the FTDICABLE header on this board tolerant of a 5v FTDI cable?
Thx again,
Josh.
In the interim, I've ordered a second board to try it out. If the second one is successful will Adafruit be willing to do a return / refund?/Users/Josh/Desktop/libnfc/examples/.libs/nfc-poll uses libnfc libnfc-1.7.0-rc7-42-g8fe13ec
debug libnfc.general log_level is set to 3
debug libnfc.general allow_autoscan is set to false
debug libnfc.general allow_intrusive_scan is set to false
debug libnfc.general 1 device(s) defined by user
debug libnfc.general #0 name: "PN532 Board via FTDI UART", connstring: "pn532_uart:/dev/tty.usbserial-AD01SUB0"
debug libnfc.driver.pn532_uart Attempt to open: /dev/tty.usbserial-AD01SUB0 at 115200 bauds.
debug libnfc.bus.uart Serial port speed requested to be set to 115200 bauds.
debug libnfc.chip.pn53x Diagnose
debug libnfc.chip.pn53x Timeout values: 500
debug libnfc.bus.uart TX: 55 55 00 00 00
debug libnfc.chip.pn53x SAMConfiguration
debug libnfc.chip.pn53x Timeout values: 1000
debug libnfc.bus.uart TX: 00 00 ff 03 fd d4 14 01 17 00
debug libnfc.bus.uart Timeout!
debug libnfc.driver.pn532_uart Unable to read ACK
pn53x_check_communication: Timeout
debug libnfc.chip.pn53x InRelease
debug libnfc.bus.uart TX: 00 00 ff 03 fd d4 52 00 da 00
debug libnfc.bus.uart Timeout!
debug libnfc.driver.pn532_uart Unable to read ACK
debug libnfc.general Unable to open "pn532_uart:/dev/tty.usbserial-AD01SUB0".
nfc-poll: ERROR: Unable to open NFC device.
Out of curiosity, is the FTDICABLE header on this board tolerant of a 5v FTDI cable?
Thx again,
Josh.
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: PN532 Board UART Problem
I don't think the board can handle 5v FTDI signals directly, but will check on that. We have several FTDI adaptors/cables/breakouts that work with the PN532 in the store though.
We'll certainly replace the board if testing shows a hardware failure. It's just that those are rare compared to software and interface issues.
We'll certainly replace the board if testing shows a hardware failure. It's just that those are rare compared to software and interface issues.
-
- Posts: 2
- Joined: Fri Jul 18, 2014 10:08 am
Re: PN532 Board UART Problem
Hi Josh,
Wondering if you ended up having a resolution to this?
I'm thinking of purchasing some PN532 breakouts to play with from Win7 using libnfc via FTDI. Do you have any FTDI/libnfc/cabling tips that could prevent headaches? ;)
Thanks!
Nathan
Wondering if you ended up having a resolution to this?
I'm thinking of purchasing some PN532 breakouts to play with from Win7 using libnfc via FTDI. Do you have any FTDI/libnfc/cabling tips that could prevent headaches? ;)
Thanks!
Nathan
- matin47
- Posts: 1
- Joined: Wed Jan 28, 2015 6:58 pm
Re: PN532 Board UART Problem
Hi, did you make any progress on this?
I've working a few days, just to get into the subject, and here is my work (cannot get it work yet tought): http://www.elecfreaks.com/forum/viewtop ... f=4&t=2299
Note that I use NFC bridge from elecfreaks (which is Arduino Leonardo I2C with Pn532).
Thanks
I've working a few days, just to get into the subject, and here is my work (cannot get it work yet tought): http://www.elecfreaks.com/forum/viewtop ... f=4&t=2299
Note that I use NFC bridge from elecfreaks (which is Arduino Leonardo I2C with Pn532).
Thanks
- EmilioC1
- Posts: 1
- Joined: Sat May 28, 2016 1:24 pm
Re: PN532 Board UART Problem
How can i send data from my android to a adafruit PN532 card reader via NFC?
Im new on this about working with arduino cards and i have a problem, because i have done an application on android to send a "STRING" from my android phone to another via NFC, and that worked very well... but the thing is when i started to work with a NFC card adafruit pn532, it can't recieve anything and i'd like to know if i have to change something from arduino or android to make the communication successfully, line of code.. library.. something.. if you have done this before i hope you can help me! Thanks!
Im new on this about working with arduino cards and i have a problem, because i have done an application on android to send a "STRING" from my android phone to another via NFC, and that worked very well... but the thing is when i started to work with a NFC card adafruit pn532, it can't recieve anything and i'd like to know if i have to change something from arduino or android to make the communication successfully, line of code.. library.. something.. if you have done this before i hope you can help me! Thanks!
Please be positive and constructive with your questions and comments.