2011/10/20 Mac Ryan <quasipe...@gmail.com>:
> On Thu, 20 Oct 2011 13:14:34 -0200
> Wander Lairson Costa <wander.lair...@gmail.com> wrote:
>
>> Try to run the script with sudo.
>
> Thank you very much for the lightning fast reply! I just had the same
> idea and was going to post the result, which is:
>
>    >>> dev.set_configuration()
>    Traceback (most recent call last):
>      File "<stdin>", line 1, in <module>
>      File "/usr/local/lib/python2.7/dist-packages/usb/core.py", line
>    530, in set_configuration self._ctx.managed_set_configuration(self,
>    configuration) File
>    "/usr/local/lib/python2.7/dist-packages/usb/core.py", line 92, in
>    managed_set_configuration
>    self.backend.set_configuration(self.handle,
>    cfg.bConfigurationValue) File
>    "/usr/local/lib/python2.7/dist-packages/usb/_debug.py", line 52, in
>    do_trace return f(*args, **named_args) File
>    "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb10.py",
>    line 455, in set_configuration
>    _check(_lib.libusb_set_configuration(dev_handle, config_value))
>    File
>    "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb10.py",
>    line 357, in _check raise USBError(_str_error[retval.value])
>    usb.core.USBError: Resource busy
>
> I tried to both plug the device before and after starting the python
> shell with "sudo python", but the result does not change: "resource
> busy" is all I get... :-/
>

This probably means you have a device driver attached to your device.
Use the detach_kernel_driver method to unload it..


-- 
Best Regards,
Wander Lairson Costa
https://github.com/walac
https://gitorious.org/~walac

------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Ciosco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to