|
From: <dai...@al...> - 2007-07-12 11:38:24
|
hello,
while running this program (from the README file, into the package =
pyusb-0.3.5)..
#____program____
import usb # import the usb module
bus =3D usb.busses() # get a list of all available busses
dev =3D bus[4].devices[0] # choose the first device on the first bus
handle =3D dev.open() # open the device
for alt in dev.configurations[0].interfaces[0]:
print alt # look at the alternate settings.
handle.setConfiguration(0) # choose the first configuration
handle.claimInterface(0) # choose the first interface
### Use the device here. ###
handle.releaseInterface() # also called automatically on __del__
#____end____
..i got the following error:
Traceback (most recent call last):
File "progreadme.py", line 13, in ?
handle.setConfiguration(0) # choose the first configuration
usb.USBError: could not set config 0: Device or resource busy
every bus number i fill in, i got the error, and if i comment the error =
line, error in the next line: still "device or resource busy".
i have to run it as a Super User, or i'm told "operation not permitted", =
but i think that's normal.
can someone help me?
i'm using debian 4.0 etch
thank you -and sorry for my bad english-
stefano
|