2011/3/14 Brendan Simon (eTRIX) <[email protected]>:
[snip]
>
> but is not found by libusb sample program 'lsusb'
>
> $ ./lsusb
> 05ac:8005 (bus 4, device 1)
> 05ac:0236 (bus 4, device 2)
> 05ac:8242 (bus 4, device 3)
> 05ac:8006 (bus 36, device 1)
> 05ac:8507 (bus 36, device 2)
> 05ac:8005 (bus 6, device 1)
> 05ac:8006 (bus 38, device 1)
> 05ac:8403 (bus 38, device 2)
>
This might be a bug in libusb. You should ask in libusb mailing.
Anyway, if libusb can't find your device, neither PyUSB.
> Notice that the VendorIDs are all 05ac (Apple). Also, some of the
> ProductIDs are not is the list provided by the System Profiler.
>
> So there seems to be either a bug in the libusb-1.0.8 code. It could be
> OS X specific, or could be a build/compiler issue.
>
I guess so.
[snip]
>
> **** Python 2.7 results (on my system) ****
>
> $ export PYUSB_DEBUG_LEVEL=debug
>
> $ python2.7
> Python 2.7.1 (r271:86882M, Nov 30 2010, 10:35:34)
> [GCC 4.2.1 (Apple Inc. build 5664)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
>>>>
>>>> import usb.core as UC
>>>> dev = UC.find(find_all=True)
> 2011-03-14 20:33:28,932 INFO:usb.core:find(): using backend
> "usb.backend.libusb10"
> 2011-03-14 20:33:28,932
> DEBUG:usb.backend.libusb10:_LibUSB.enumerate_devices()
> 2011-03-14 20:33:29,841
> DEBUG:usb.backend.libusb10:_LibUSB.get_device_descriptor(<usb.backend.libusb10._Device
> object at 0x100722ad0>)
> 2011-03-14 20:33:29,841
> DEBUG:usb.backend.libusb10:_LibUSB.get_device_descriptor(<usb.backend.libusb10._Device
> object at 0x100722c10>)
> 2011-03-14 20:33:29,841
> DEBUG:usb.backend.libusb10:_LibUSB.get_device_descriptor(<usb.backend.libusb10._Device
> object at 0x100722cd0>)
> 2011-03-14 20:33:29,842
> DEBUG:usb.backend.libusb10:_LibUSB.get_device_descriptor(<usb.backend.libusb10._Device
> object at 0x100722d90>)
> 2011-03-14 20:33:29,842
> DEBUG:usb.backend.libusb10:_LibUSB.get_device_descriptor(<usb.backend.libusb10._Device
> object at 0x100722e50>)
> 2011-03-14 20:33:29,842
> DEBUG:usb.backend.libusb10:_LibUSB.get_device_descriptor(<usb.backend.libusb10._Device
> object at 0x100722f10>)
> 2011-03-14 20:33:29,842
> DEBUG:usb.backend.libusb10:_LibUSB.get_device_descriptor(<usb.backend.libusb10._Device
> object at 0x100722fd0>)
> 2011-03-14 20:33:29,842
> DEBUG:usb.backend.libusb10:_LibUSB.get_device_descriptor(<usb.backend.libusb10._Device
> object at 0x10072d0d0>)
>>>>
>>>> dev
> [<usb.core.Device object at 0x100722b10>, <usb.core.Device object at
> 0x100722b90>, <usb.core.Device object at 0x100722c50>, <usb.core.Device
> object at 0x100722d10>, <usb.core.Device object at 0x100722dd0>,
> <usb.core.Device object at 0x100722e90>, <usb.core.Device object at
> 0x100722f50>, <usb.core.Device object at 0x10072d050>]
>>>>
>
>
>
> **** Python 2.6 results (on my system) ****
>
> $ export PYUSB_DEBUG_LEVEL=debug
>
> $ python2.6
> Python 2.6.6 (r266:84374, Aug 31 2010, 11:00:51)
> [GCC 4.0.1 (Apple Inc. build 5493)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
>>>>
>>>> import usb.core as UC
>>>> devs = UC.find(find_all=True)
> 2011-03-14 20:33:12,649 ERROR:usb.backend.libusb10:Error loading libusb
> 1.0 backend
> Traceback (most recent call last):
> File
> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/usb/backend/libusb10.py",
> line 600, in get_backend
> _lib = _load_library()
> File
> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/usb/backend/libusb10.py",
> line 165, in _load_library
> l = CDLL(libname)
> File
> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ctypes/__init__.py",
> line 353, in __init__
> self._handle = _dlopen(self._name, mode)
> OSError: dlopen(/usr/local/lib/libusb-1.0.dylib, 6): no suitable image
> found. Did find:
> /usr/local/lib/libusb-1.0.dylib: mach-o, but wrong architecture
> 2011-03-14 20:33:12,778 ERROR:usb.backend.openusb:Error loading OpenUSB
> backend
> Traceback (most recent call last):
> File
> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/usb/backend/openusb.py",
> line 598, in get_backend
> _lib = _load_library()
> File
> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/usb/backend/openusb.py",
> line 148, in _load_library
> raise OSError('USB library could not be found')
> OSError: USB library could not be found
> 2011-03-14 20:33:12,839 ERROR:usb.backend.libusb01:Error loading libusb
> 0.1 backend
> Traceback (most recent call last):
> File
> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/usb/backend/libusb01.py",
> line 558, in get_backend
> _lib = _load_library()
> File
> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/usb/backend/libusb01.py",
> line 180, in _load_library
> raise OSError('USB library could not be found')
> OSError: USB library could not be found
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File
> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/usb/core.py",
> line 829, in find
> raise ValueError('No backend available')
> ValueError: No backend available
>>>>
>>>> dev
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> NameError: name 'dev' is not defined
>>>>
>
>
This might be a problem with your Python installation, because the
problem comes from ctypes.
--
Best Regards,
Wander Lairson Costa
LCoN - Laboratório de Computação Natural - Natural Computing Laboratory
(http://www.mackenzie.com.br/lcon.html)
Programa de Pós-Graduação em Engenharia Elétrica (PPGEE)
Faculdade de Computação e Informática (FCI)
Universidade Presbiteriana Mackenzie - SP - Brazil
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
pyusb-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyusb-users