Akira1912
Posts: 4
Joined: Sat Feb 27, 2016 11:50 pm

Adafruit pn532 NFC breakout

Tue Jan 31, 2017 5:52 am

i used the adafruit pn532 breakout to read nfc but everytime i try to use it i get this error:

/home/pi/libnfc/libnfc-master/examples/.libs/lt-nfc-poll uses libnfc 1.7.1
error libnfc.driver.pn532_uart
pn53x_check_communication error
error libnfc.driver.pn532_uart
Unable to transmit data. (TX)
lt-nfc-poll: ERROR: Unable to open NFC device.

I used this guide to install everything and have tried with both libnfc 1.7.1 and 1.7.0:https://learn.adafruit.com/adafruit-nfc ... spberry-pi

User avatar
topguy
Posts: 7240
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Adafruit pn532 NFC breakout

Tue Jan 31, 2017 1:28 pm

The guide is a little old, the method for freeing up the serialport and also the name of the serial-device has changed for RPi3 and newer versions of Raspbian Jessie.

That means that the name of the serialport that you set in "/etc/nfc/devices.d/pn532_uart_on_rpi.conf" has changed, most probably to "/dev/ttyS0".

Do a "ls -l /dev/ttyACM0" and "ls -l /dev/ttyS0" and check which one you have.

Akira1912
Posts: 4
Joined: Sat Feb 27, 2016 11:50 pm

Re: Adafruit pn532 NFC breakout

Thu Feb 02, 2017 2:07 am

thanks it worked

lordvos
Posts: 1
Joined: Tue Jul 11, 2017 3:21 am

Re: Adafruit pn532 NFC breakout

Tue Jul 11, 2017 3:24 am

Thanks, mate - that was a quick fix (that I wish I had found an hour ago).

LV

SoftwareElec
Posts: 4
Joined: Wed Aug 05, 2020 3:49 pm

Re: Adafruit pn532 NFC breakout

Thu Aug 06, 2020 3:52 pm

I had a similar issue as to the one above:

Code: Select all

pi@raspberrypi:~/libnfc/libnfc-1.7.0/examples $ sudo ./nfc-poll
/home/pi/libnfc/libnfc-1.7.0/examples/.libs/nfc-poll uses libnfc 1.7.0
nfc-poll: ERROR: Unable to open NFC device.
I changed the port from ttyACM0 to ttyS0 in the /etc/nfc/devices.d/pn532_uart_on_rpi.conf and rebooted the PI but i still get the same error as above.

Return to “HATs and other add-ons”