2010/4/17 Xiaofan Chen <xiaof...@gmail.com>: > On Sun, Apr 18, 2010 at 3:31 AM, Wander Lairson > <wander.lair...@gmail.com> wrote: >> 2010/4/17 Xiaofan Chen <xiaof...@gmail.com>: >>> On Fri, Apr 16, 2010 at 11:14 PM, Wander Lairson >>> <wander.lair...@gmail.com> wrote: >>> >>>> Known issues >>>> ----------------- >>>> >>>> - 'reset' method fails under FreeUSB (libusb 1.0 backend). >>> >>> 'reset' method fails under FreeUSB 8.0 (libusb 1.0 backend). I am >>> not so sure about the older system. >>> >>> One more: libusb 0.1 backend does not seem to work under FreeBSD 8.0. >> Is there any error messages when running the tests? (with >> PYUSB_DEBUG_LEVEL=debug). > > The issue is that with libusb 0.1 backend, it can not find the device. > > [mc...@myfreebsd ~/Desktop/build/pyusb/pyusb-1.0.0-a0/tests]$ export > PYUSB_DEBUG_LEVEL=debug > [mc...@myfreebsd ~/Desktop/build/pyusb/pyusb-1.0.0-a0/tests]$ sudo > python testall.py > .F.......E... > ====================================================================== > ERROR: runTest (test_integration.DeviceTest) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/usr/home/mcuee/Desktop/build/pyusb/pyusb-1.0.0-a0/tests/test_integration.py", > line 57, in runTest > self.test_set_configuration() > File > "/usr/home/mcuee/Desktop/build/pyusb/pyusb-1.0.0-a0/tests/test_integration.py", > line 94, in test_set_configuration > self.dev.set_configuration(cfg) > File "/usr/home/mcuee/Desktop/build/pyusb/pyusb-1.0.0-a0/usb/core.py", > line 514, in set_configuration > self._ctx.managed_set_configuration(self, configuration) > File "/usr/home/mcuee/Desktop/build/pyusb/pyusb-1.0.0-a0/usb/core.py", > line 85, in managed_set_configuration > self.backend.set_configuration(self.handle, cfg.bConfigurationValue) > File "/usr/home/mcuee/Desktop/build/pyusb/pyusb-1.0.0-a0/usb/_debug.py", > line 53, in do_trace > return f(*args, **named_args) > File > "/usr/home/mcuee/Desktop/build/pyusb/pyusb-1.0.0-a0/usb/backend/libusb10.py", > line 451, in set_configuration > _check(_lib.libusb_set_configuration(dev_handle, config_value)) > File > "/usr/home/mcuee/Desktop/build/pyusb/pyusb-1.0.0-a0/usb/backend/libusb10.py", > line 353, in _check > raise USBError(_str_error[retval.value]) > USBError: Invalid parameter
Wow! This is new one! > > ====================================================================== > FAIL: runTest (test_backend.BackendTest) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/usr/home/mcuee/Desktop/build/pyusb/pyusb-1.0.0-a0/tests/test_backend.py", > line 44, in runTest > self.test_enumerate_devices() > File > "/usr/home/mcuee/Desktop/build/pyusb/pyusb-1.0.0-a0/tests/test_backend.py", > line 67, in test_enumerate_devices > self.fail('PyUSB test device not found') > AssertionError: PyUSB test device not found > > ---------------------------------------------------------------------- > Ran 13 tests in 3.847s > > FAILED (failures=1, errors=1) > > > [mc...@myfreebsd ~]$ 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) > 2010-04-18 09:19:26,231 DEBUG:usb.backend.libusb01:_LibUSB.enumerate_devices() >>>> assert dev is not None > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > AssertionError >>>> But you said some time ago that with 0.4 version it works, right? Kind of strange... > >>>> - 'reset' method hangs under Windows (libusb 1.0 backend). >>>> - Sometimes occurs `read` timeout on Windows (libusb 1.0 backend). >>>> - Test cases fail to run under cygwin. >>> >>> You can probably remove "reset" from the test cases as it is >>> problematic anyway. Normally it is only used as a last resort >>> (often only under Linux). >> >> Actually I do it to have known device state when changing the backend >> in the tests. >> > > I see. That is a problem. Normally you have to wait quite some time, > then re-enumerate the device (under Windows and FreeBSD at least) > as the file handle becomes invalid. > > > -- > 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 > ------------------------------------------------------------------------------ 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