Re: [Pyusb-users] Release Interface and Detach Kernel Questions

2009-05-17 Thread ed
Thanks, that did it, I also added error message checking. FINAL PROGRAM class DelcomUSBDevice(object): ''' Class for talking to Delcom Products generation 2 USB device 902670/902770 the 16 GPIO device ''' # Device Constants VENDOR_ID = 0x0FC5#: Delcom Product

Re: [Pyusb-users] Release Interface and Detach Kernel Questions

2009-05-17 Thread Thomas Reitmayr
Ed, what happens if you just catch the exception from your detach command? Eg. try: self.handle.detachKernelDriver(0) except usb.USBError, err: print >> sys.stderr, err Otherwise, if the kernel driver is already detached, you will not claim the interface. Regards, -Thomas

[Pyusb-users] Release Interface and Detach Kernel Questions

2009-05-16 Thread ed
When I first run my program everything is OK. That is I can detach the kernel interface and then claim the interface and then release the interface. TERMINAL OUTPUT e...@ed-desktop:~/Desktop$ sudo ./DelcomUSBDevice.py Found Delcom Device