Did you install libusb-win32?

Wander

2010/4/11 Kevin Kilroy <kevkil...@googlemail.com>:
> Hi all,
>
> I'm now using windows XP, however, when I now run the code, the app hangs
> after the call to set_configuration()
>
> Any ideas?
>
> Thanks in advance,
>
> Kevin.
>
> On Sun, Apr 11, 2010 at 12:57 PM, Xiaofan Chen <xiaof...@gmail.com> wrote:
>>
>> On Sun, Apr 11, 2010 at 6:43 PM, Kevin Kilroy <kevkil...@googlemail.com>
>> wrote:
>> > I'm now trying on Ubuntu (8.04 64bit) & I'm now receiving this error:
>> >
>> >
>> >  File "test.py", line 13, in <module>
>> >     dev.set_configuration()
>> >   File "/usr/lib/python2.5/site-packages/usb/core.py", line 511, in
>> > set_configuration
>> >     self._ctx.managed_set_configuration(self, configuration)
>> >   File "/usr/lib/python2.5/site-packages/usb/core.py", line 82, in
>> > managed_set_configuration
>> >     self.backend.set_configuration(self.handle, cfg.bConfigurationValue)
>> >   File "/usr/lib/python2.5/site-packages/usb/backend/libusb01.py", line
>> > 399,
>> > in set_configuration
>> >     _check(_lib.usb_set_configuration(dev_handle, config_value))
>> >   File "/usr/lib/python2.5/site-packages/usb/backend/libusb01.py", line
>> > 352,
>> > in _check
>> >     raise USBError(errmsg)
>> > usb.core.USBError: could not set config 1: Device or resource busy
>> >
>>
>> Again you have to detach the kernel HID driver to make libusb/pyusb
>> working for USB device.
>>
>> For libusb01 backend, pyusb has this. You need to call it before
>> setting the configuration.
>>    def detach_kernel_driver(self, dev_handle, intf):
>>        _check(_lib.usb_detach_kernel_driver_np(dev_handle, intf))
>>
>> For libusb10, pyusb has the following.
>>    # int libusb_detach_kernel_driver(libusb_device_handle *dev,
>>    #                                 int interface)
>>    lib.libusb_detach_kernel_driver.argtypes = [
>>            _libusb_device_handle,
>>            c_int
>>        ]
>>
>> --
>> Xiaofan http://mcuee.blogspot.com
>>
>>
>> ------------------------------------------------------------------------------
>> Download Intel&#174; 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&#174; 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&#174; 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

Reply via email to