On Sat, Nov 14, 2009 at 6:46 AM, Philip Pemberton wrote: > Marcel Birthelmer wrote: >> Not sure about the stack you're using etc., but from lots of >> experience with USB device code in my previous job, I'd suggest making >> sure you're closing all your endpoints and cancelling any pending >> transactions when you're closing the connection (if applicable), and >> making sure any state machines are reset to the point where endpoints >> can be re-opened when the PC sets the configuration again. > > I'm starting to think "libusb bug" now. > > My test suite works fine with libusb-win32 0.1.12.2 on Windows XP, but > won't work with the Linux version of libusb on either Ubuntu 9.04 or > 9.10 (both of which use an Ubuntu-hacked version of libusb 0.1.12). > This may tend to be a firmware bug or your libusb program bug. Which Microchip stack are your firmware based on? One potential issue is wrong Data Toggle in the firmware. You can always try the following sequence when closing the usb handle. usb_release_interface(devh, 0); usb_reset_device(devh); (adding this one often helps). usb_close(devh); usb_exit(); You can also try to call usb_set_configuration() before claiming the interface. I think you have it since libusb-win32 requires it. You may also try to remove it to see if that helps under Linux. One example I tried before. http://www.microchip.com/forums/tm.aspx?m=340892 -- Xiaofan http://mcuee.blogspot.com -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist