Adafruit PN532 RPi 3B+ USB FTDi timeout

Asked by Alexandre Joris

Hi,
I'm trying to use an Adafruit PN532 with nfcpy on a RPi 3b+ . I'm using a FTDi USB cable.

Here's what happens :

Code :
  print "Starting up NFC Beacon."
    with nfc.ContactlessFrontend("tty:USB0:pn532") as clf:
        clf.connect(llcp={'on-startup': on_startup_as_router, 'on-connect': on_connect_as_router})

Results & stacktrace :
 Starting up NFC Beacon.

 Traceback (most recent call last):
File "Octave/service.py", line 113, in <module>
     NFCEmitter()
File "Octave/service.py", line 101, in NFCEmitter
   with nfc.ContactlessFrontend("tty:USB0:pn532") as clf:
File "/usr/local/lib/python2.7/site-packages/nfc/clf/__init__.py", line 74, in __init__
if path and not self.open(path):
File "/usr/local/lib/python2.7/site-packages/nfc/clf/__init__.py", line 148, in open
self.device = device.connect(path)
File "/usr/local/lib/python2.7/site-packages/nfc/clf/device.py", line 111, in connect
    device = driver.init(tty)
  File "/usr/local/lib/python2.7/site-packages/nfc/clf/pn532.py", line 406, in init
     if not transport.read(timeout=initial_timeout) == Chipset.ACK:
 File "/usr/local/lib/python2.7/site-packages/nfc/clf/transport.py",line 153, in read
      raise IOError(errno.ETIMEDOUT, os.strerror(errno.ETIMEDOUT))
 IOError: [Errno 110] Connection timed out

This bug happens 80% of the times. When I insist on plug/unplug the USB cable it sometimes work. Is there a known fix for that ?
Thanks
Alex

Question information

Language:
English Edit question
Status:
Expired
For:
nfcpy Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.