2013/2/19 Marcos Anzorena <anzoren...@gmail.com>: > Hi: > > I'm working on a project comunicating a Tektronix scope MSO2024 using PyUSB, > libusb 1.0 and Fedora 16. So far i can only find the scope, but when i try > to "set_configuration()" it sends me error. This is the code that i'm using: > > > tek=usb.core.find(idVendor=0x0699,idProduct=0x03A4) > if tek is None: > raise ValueError('No se encontro el osciloscopio') > > if tek.is_kernel_driver_active(0): > tek.detach_kernel_driver(0) > tek.set_configuration(0) > usb.util.claim_interface(tek,0) > > The result is: > > Traceback (most recent call last): > File "osctek.py", line 22, in <module> > usb.util.claim_interface(tek,0) > File "/usr/lib/python2.7/site-packages/usb/util.py", line 191, in > claim_interface > device._ctx.managed_claim_interface(device, interface) > File "/usr/lib/python2.7/site-packages/usb/core.py", line 112, in > managed_claim_interface > self.backend.claim_interface(self.handle, i) > File "/usr/lib/python2.7/site-packages/usb/_debug.py", line 52, in > do_trace > return f(*args, **named_args) > File "/usr/lib/python2.7/site-packages/usb/backend/libusb10.py", line 471, > in claim_interface > _check(_lib.libusb_claim_interface(dev_handle, intf)) > File "/usr/lib/python2.7/site-packages/usb/backend/libusb10.py", line 357, > in _check > raise USBError(_str_error[retval.value]) > usb.core.USBError: Entity not found > > Any idea where is the problem?? >
Configuration "0" is a "non-configured" state. Generally devices comes with just one configuration, and if it is the case, calling set_configuration with no parameters will pick up the right value automatically. -- Best Regards, Wander Lairson Costa ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb _______________________________________________ pyusb-users mailing list pyusb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pyusb-users