-
Notifications
You must be signed in to change notification settings - Fork 436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to connect to PN532 via USB=>UART converter #479
Comments
After much digging, I discovered the libnfc/contrib/libnfc/pn532_uart_on_rpi_3.conf.sample, and saw the lack of double quotes around the connstring value. I removed the double quotes on my system, and got this trace: Now I have a new problem. libnfc finds the board on the initial probe, but on second and subsequent probes...nothing.. Timeouts, and eventually, no response. is there some type of specific configuration required on the USB => UART /dev/ttyUSB0 required? Baud rates, or something? stty -F /dev/ttyUSB0 -a Here is /dev/TTYS0: |
I also have got those timeout errors and my Ubuntu 16.04 does not detect the board. I am testing a nfc cheap pn532 board thru "Cygnal Integrated Products, Inc. CP210x UART Bridge". |
After deleting the libnfc ubuntu package and compiled the master branch, I get the same results: debug libnfc.config key: [device.name], value: [Adafruit PN532 board via UART] |
I googled a lot, and finally found that it was due to the power supply. Try another one. |
@cpeppler01 | @alfem | @sanbrother did you manage to get the PN532 working using the USB => UART converter? |
After many headaches, what worked for me was allowing the intrusive scan. In Debian, it is as simple as changing the file in /etc/nfc/ libnfc.conf, removing the # to un-comment the (ninth) line and replace false with true. I hope that it works for you too so that you don't have to endure the pain that it was to figure it out!! :) (running libnfc's latest version, 1.8.0) |
I cannot find that file in that directory. What should I do? I would heavily appreciate not having to pull my own hair |
I have purchased an Adafruit PN532 board (https://www.adafruit.com/product/364).
I have no problem connecting via libnfc using the internal UART /dev/ttys0. Works great.
I would like to use this board without using GPIO pins (conflict with another application
that needs the pins).
I then purchased a USB=> UART converter (https://www.adafruit.com/product/954).
I tested the converter using Rpi/minicom connected to a PC, and it works fine. I can see characters going back and forth, no problem.
I can see the converter from the Rpi:
lsusb
[...]
Bus 001 Device 005: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light
[...]
I can see it in dmesg
[...]
[78053.972607] usb 1-1.2: cp210x converter now attached to ttyUSB0
[...]
pi@raspi:/etc/nfc/devices.d $ ls -l /dev/tty[ASU]* /dev/serial?
lrwxrwxrwx 1 root root 5 Mar 17 17:59 /dev/serial0 -> ttyS0
lrwxrwxrwx 1 root root 7 Mar 17 17:59 /dev/serial1 -> ttyAMA0
crw-rw---- 1 root dialout 204, 64 Mar 17 17:59 /dev/ttyAMA0
crw-rw---- 1 root dialout 4, 64 Mar 18 16:35 /dev/ttyS0
crw-rw---- 1 root dialout 188, 0 Mar 18 15:44 /dev/ttyUSB0
pi@raspi:/etc/nfc/devices.d $ ls
device1.conf device2.conf
pi@raspi:/etc/nfc/devices.d $ cat device1.conf
name = "Capnetix Adafruit - ttyS0"
connstring = "pn532_uart:/dev/ttyS0"
allow_intrusive_scan = true
optional = true
pi@raspi:/etc/nfc/devices.d $ cat device2.conf
name = "Capnetix Adafruit - ttyUSB0"
connstring = "pn532_uart:/dev/ttyUSB0"
#connstring = "pn53x_usb:/dev/ttyUSB0"
allow_intrusive_scan = true
optional = true
The internal UART works great.
I've tried everything to get libnfc to talk to the board through this USB=>UART bridge. It just will not recognize it.
Any help or guidance would be appreciated.
Environment: Raspberry Pi 3, Model B, Hardware BCM2835, Revision a02082
The text was updated successfully, but these errors were encountered: