On Mon, Apr 5, 2010 at 9:52 PM, Xiaofan Chen <xiaof...@gmail.com> wrote: > On Mon, Apr 5, 2010 at 9:22 PM, Wander Lairson <wander.lair...@gmail.com> > wrote: >> Maybe it is bug in the libusb01 backend. Please, try one more test >> when you have some time: >> >> import usb.core >> import usb.backend.libusb01 >> >> b = usb.backend.libusb01.get_backend() >> assert b is not None >> dev = usb.core.find(idVendor=0xFFFE, backend = b) >> assert dev is not None >> > > You are right. There seems to be a problem with the libusb01 > backend under FreeBSD 8. > > [mc...@myfreebsd /usr/home/mcuee]$ python > Python 2.6.4 (r264:75706, Feb 21 2010, 13:01:16) > [GCC 4.2.1 20070719 [FreeBSD]] on freebsd8 > Type "help", "copyright", "credits" or "license" for more information. >>>> import usb.core >>>> import usb.backend.libusb01 >>>> b = usb.backend.libusb01.get_backend() >>>> assert b is not None >>>> dev = usb.core.find(idVendor=0xFFFE,backend=b) >>>> assert dev is not None > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > AssertionError >>>> import usb.backend.libusb10 >>>> a = usb.backend.libusb10.get_backend() >>>> assert a is not None >>>> dev=usb.core.find(idVendor=0xFFFE,backend=a) >>>> dev1=usb.core.find(idVendor=0xFFFE,backend=a) >>>> assert dev1 is not None >>>> import usb.backend.openusb >>>> c = usb.backend.openusb.get_backend() >>>> assert c is not None > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > AssertionError >>>> >
Just one more data point. The legacy usbenum.py example (from 0.4.2) seems to run fine. But I am not sure which backend it is using. [mc...@myfreebsd ~/Desktop/build/pyusb/pyusb-0.4.2/samples]$ python usbenum.py ... Device: Device class: 0 Device sub class: 0 Device protocol: 0 Max packet size: 64 idVendor: 65534 (0xfffe) idProduct: 1 (0x0001) Device Version: 1 Configuration: 1 Total length: 60 selfPowered: 1 remoteWakeup: 0 maxPower: 200 Interface: 0 Alternate Setting: 0 Interface class: 255 Interface sub class: 255 Interface protocol: 255 Endpoint: 0x1 Type: 2 Max packet size: 64 Interval: 32 Endpoint: 0x81 Type: 2 Max packet size: 64 Interval: 32 Endpoint: 0x2 Type: 3 Max packet size: 64 Interval: 32 Endpoint: 0x82 Type: 3 Max packet size: 64 Interval: 32 Endpoint: 0x3 Type: 1 Max packet size: 64 Interval: 32 Endpoint: 0x83 Type: 1 Max packet size: 64 Interval: 32 -- Xiaofan http://mcuee.blogspot.com ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ pyusb-users mailing list pyusb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pyusb-users