Setup a MacOSX for the SCL3711

Asked by Augusto Esteves

I running MacOSX 10.6.8 with an SCL3711 reader (showing correctly in the System Profiler, under USB Bus). I've installed libusb 1.0.9 (with MacPorts) and pyusb-1.0.0a3, and I'm running Python 2.7.3.

When I run helloworld.py (with or without sudo), I get this message:

Traceback (most recent call last):
  File "helloworld.py", line 66, in <module>
    main()
  File "helloworld.py", line 34, in main
    clf = nfc.ContactlessFrontend()
  File "/Users/augustoesteves/Dropbox/apps/touchcloud/nfcpy/nfc/clf.py", line 53, in __init__
    self.dev = dev.connect(path)
  File "/Users/augustoesteves/Dropbox/apps/touchcloud/nfcpy/nfc/dev/__init__.py", line 110, in connect
    for bus in usb.busses():
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/usb/legacy.py", line 343, in busses
    return (Bus(),)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/usb/legacy.py", line 339, in __init__
    self.devices = [Device(d) for d in core.find(find_all=True)]
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/usb/core.py", line 856, in find
    raise ValueError('No backend available')
ValueError: No backend available

Not sure what I'm doing wrong.

Question information

Language:
English Edit question
Status:
Solved
For:
nfcpy Edit question
Assignee:
No assignee Edit question
Solved by:
Stephen Tiedemann
Solved:
Last query:
Last reply:
Revision history for this message
Augusto Esteves (augustoeae) said :
#1

Solved this by installing libusb 1.0.9 without using MacPorts. The problem is now that I get this:

localhost:examples augustoesteves$ sudo python helloworld.py
Traceback (most recent call last):
  File "helloworld.py", line 66, in <module>
    main()
  File "helloworld.py", line 34, in main
    clf = nfc.ContactlessFrontend()
  File "/Users/augustoesteves/Dropbox/apps/touchcloud/nfcpy/nfc/clf.py", line 53, in __init__
    self.dev = dev.connect(path)
  File "/Users/augustoesteves/Dropbox/apps/touchcloud/nfcpy/nfc/dev/__init__.py", line 119, in connect
    device = driver.init(dev)
  File "/Users/augustoesteves/Dropbox/apps/touchcloud/nfcpy/nfc/dev/pn53x_usb.py", line 108, in init
    bus = pn53x_usb(usb_dev)
  File "/Users/augustoesteves/Dropbox/apps/touchcloud/nfcpy/nfc/dev/pn53x_usb.py", line 39, in __init__
    self.dh.setConfiguration(dev.configurations[0])
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/usb/legacy.py", line 257, in setConfiguration
    self.dev.set_configuration(configuration)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/usb/core.py", line 554, in set_configuration
    self._ctx.managed_set_configuration(self, configuration)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/usb/core.py", line 92, in managed_set_configuration
    self.backend.set_configuration(self.handle, cfg.bConfigurationValue)
AttributeError: 'NoneType' object has no attribute 'bConfigurationValue'

Revision history for this message
Best Stephen Tiedemann (stephen-tiedemann) said :
#2

Please try the version on branch 'dev-pyusb'. I've modified the current trunk version for PyUSB 1.x, seems to work fine on my Linux machine, please let me know if that's true also for Mac OSX.

Revision history for this message
Augusto Esteves (augustoeae) said :
#4

Thanks Stephen Tiedemann, that solved my question.