-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi
On 01/24/2012 12:04 PM, bibek chitrakar wrote:
> Hello, =============================== The output of program :
>
> $ sudo python hardware_monitor_printer.py Traceback (most recent
> call last): File "hardware_monitor_printer.py", line 15, in
> <module> dh.setConfiguration(conf) usb.USBError: could not set
> config 1: Device or resource busy
- From what I can remember when I did my first test, this is because a
linux kernel module is still using the device.
So what you want to do, is try and tell the kernel to release the device:
if device.is_kernel_driver_active(interface):
try:
device.detach_kernel_driver(interface)
detached = True
except Exception as e:
print "ERROR: Could not detach device from kernel:", e
You could also try and make sure the kernel doesn't load a module for
the device, or use rmmod to remove the module associated with the device.
Kind regards
- --
Robert von Burg <[email protected]>
dipl. Informatiker in Softwareentwicklung HF / pBac-Eng ODEC
software development
system & network administration
http://eitchnet.ch
http://gsinet.ch
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk8emCkACgkQFnSXY2eHI21AcgCgvq2G/5lqfWNhehmQJRC7nbzF
0BQAoIhqbV+Jjiai2mhsx0QlLxhdTxeH
=tuoK
-----END PGP SIGNATURE-----
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
pyusb-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyusb-users