On Wed, Jul 11, 2012 at 8:03 PM, Debapratim Ghosh <deba21pra...@gmail.com> wrote: > I am working with python in Ubuntu 11.10. I'm able to detect a USB device, > access its properties etc. Now I want to establish USB communication. As > given in the pyusb tutorial webpage, I gave a command > > pingu = usb.core.find(idVendor = 0x04D8, idProduct = 0xFEAA) #this is > working fine now, and then.... > > pingu.set_configuration() #this gives the following error > > Traceback (most recent call last): > File "testui1007.py", line 78, in startHandler > pingu.set_configuration() > File "/usr/local/lib/python2.7/ > dist-packages/usb/core.py", line 547, 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/backend/libusb10.py", > line 503, in set_configuration > _check(_lib.libusb_set_configuration(dev_handle, config_value))
I wonder what config_value is at this point. You can always add a little "print" in the above libusb10.py file to see. If the device was already configured and is reconfigured with the same value, it will typically perform a reset*. This might give an unknown error. Just a guess. Maybe you can give more information on the version of your pyusb and libusb-1.0, and even a lsusb -v dump of your device? Regards, Tormod *) See http://libusb.sourceforge.net/api-1.0/caveats.html > File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb10.py", > line 403, in _check > raise USBError(_str_error[ret], ret, _libusb_errno[ret]) > usb.core.USBError: [Errno None] Unknown error > > I am logged in as root, so authentication cannot be an issue right? > > Please give some idea why this is happening? I tried making a debug log > file, but the log file doesn't get created. > > > -- > Regards, > > Debapratim Ghosh > IIT Bombay ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ pyusb-users mailing list pyusb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pyusb-users