FrameError

Asked by Daniel

Hi,

I am using the llcp test client and server codes. When I run both codes, everything is ok the first time. However, if i tried to run again the code, I get the following error.

dany@ubuntu:~/Downloads/nfcpy/examples$ sudo ./llcp-test-client.py --device usb:2:4 --test 3
searching for reader with path 'usb:2:4'
searching for a usb bus reader
Traceback (most recent call last):
  File "./llcp-test-client.py", line 891, in <module>
    main()
  File "./llcp-test-client.py", line 763, in main
    try: clf = nfc.ContactlessFrontend(device); break
  File "/home/dany/Downloads/nfcpy/nfc/clf.py", line 53, in __init__
    self.dev = dev.connect(path)
  File "/home/dany/Downloads/nfcpy/nfc/dev/__init__.py", line 95, in connect
    device = driver.init(dev)
  File "/home/dany/Downloads/nfcpy/nfc/dev/pn53x_usb.py", line 104, in init
    dev = pn53x.pn53x(bus)
  File "/home/dany/Downloads/nfcpy/nfc/dev/pn53x.py", line 113, in __init__
    ic, ver, rev, support = self.get_firmware_version()
  File "/home/dany/Downloads/nfcpy/nfc/dev/pn53x.py", line 186, in get_firmware_version
    rsp = self.command(0x02)
  File "/home/dany/Downloads/nfcpy/nfc/dev/pn53x.py", line 144, in command
    if frame[0:3] != pn53x.SOF: raise FrameError("invalid start of frame")
nfc.dev.pn53x.FrameError: [Errno -1] invalid start of frame

Can anyone help me to solve this problem? (more details about me test --> Im using two SCL 3711)

Thank you so much!!
Dany

Question information

Language:
English Edit question
Status:
Answered
For:
nfcpy Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Stephen Tiedemann (stephen-tiedemann) said :
#1

These devices have quite bizarre behaviour on usb. I could not exactly reproduce the error you've got but saw lock-out situations after first run. This problem disappeared completely with an additional acknowledge frame sent on close. Please try again with the latest source (rev 138).

Note that I've also added proper handling of busy readers, so it's no longer necessary to specify the device to use.

Can you help with this problem?

Provide an answer of your own, or ask Daniel for more information if necessary.

To post a message you must log in.