On Sat, September 21, 2013 12:47 pm, Xiaofan Chen wrote: > On Sat, Sep 21, 2013 at 7:21 AM, Kano <libu...@iporg.org> wrote: >> Hi, ... >> The code is basically: >> For a single interface chip (that always works on many linux/windows) it >> is: >> libusb_get_device_list >> libusb_get_device_descriptor >> libusb_open >> libusb_claim_interface 0 >> >> Instead for a chip with multiple interfaces I am: >> libusb_get_device_list >> libusb_get_device_descriptor >> libusb_open >> libusb_claim_interface 0 >> libusb_get_device(interface 0 handle) > Why?
To create a 2nd handle I must have the device. Since a handle is only associated with a single interface, I must have multiple handles. >> libusb_open > Why? > > What if you remove the above two? I need to talk to both interfaces, not just one (4 actually - each will have their own thread) If I change the order, open interface 1 first: Interface 1 opens OK but fails on opening interface 0 after it. i.e. same as before Again with the same error [ 1.015625] [00000580] libusbx: error [winusbx_open] could not open device \\.\USB#VID_0403&PID_8350&MI_00#6&2CE4DD9F&0&0000#{C8D1AB34-4B5C-488A-8194-08C26C1A05DA} (interface 0): [5] Access is denied. >> (libusb_claim_interface 1) <- never gets here >> >> This works on linux but fails on windows on the 2nd open (before >> claiming >> the 2nd interface) with: >> [ 1.209821] [00000f94] libusbx: debug [libusb_open] open 2.2 >> [ 1.209821] [00000f94] libusbx: error [winusbx_open] could not open >> device >> \\.\USB#VID_0403&PID_8350&MI_00#6&2CE4DD9F&0&0000#{C8D1AB34-4B5C-488A-8194-08C26C1A05DA} >> (interface 0): [5] Access is denied. >> >> The code is in a github git and the pull request that has the changes >> for >> multiple interfaces is: >> https://github.com/ckolivas/cgminer/pull/492/ >> >> I've tried this with libusbx-1.0.17.tar.bz2 >> (and also with libusb-1.0.16-rc10.tar.bz2 that is in that git) >> Both give the same open fail - working on linux but failing on windows >> >> A full log up to the failures (at the bottom) can be seen here: >> pastebin.com/Rx9jmMnU >> > -- > Xiaofan -Kano ------------------------------------------------------------------------------ LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/22/13. http://pubads.g.doubleclick.net/gampad/clk?id=64545871&iu=/4140/ostg.clktrk _______________________________________________ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel