|
From: Stephan M. <ste...@we...> - 2007-04-09 09:41:46
|
This is most likely cause by the fact that you have installed libusb's kernel driver as a filter. This doesn't work properly with some HID devices. Uninstall the filter and install the kernel driver as a normal device driver through an .inf file (use inf-wizard.exe to create one). It should work then. Stephan Using the bulk.c example, if I try with my mouse (MY_VID 0x04b3, MY_PID > 0x310b) I can successfully bulk_read. > > When I set MY_VID/PID to that of my djconsole I get the same process hang as my djconsole port test program --> "usb_set_configuration" freezes the process everytime... :( > > > Here is what SysInternals ProcessExplorer shows for the process stack: > ntoskrnl.exe+0x584d > ntoskrnl.exe!KeQueryRuntimeThread+0x5e8 > ntoskrnl.exe!CcPurgeCacheSection+0x240 > USBPORT.SYS+0x20378 > USBPORT.SYS+0x13d5c > > USBPORT.SYS+0x18dfe > USBPORT.SYS+0x21e2 > ntoskrnl.exe!Kei386EoiHelper+0x237d > usbhub.sys+0x4afa > usbhub.sys+0x21d8 > ntoskrnl.exe!Kei386EoiHelper+0x237d > libusb0.sys+0x32ad > libusb0.sys+0x1f0a > libusb0.sys+0x140f > > ntoskrnl.exe!Kei386EoiHelper+0x237d > ntoskrnl.exe!RtlIntegerToUnicode+0x66 > ntoskrnl.exe!RtlRemoveUnicodePrefix+0x10e4 > ntoskrnl.exe!ZwSetSystemInformation+0x23 > ntdll.dll!KiFastSystemCallRet > libusb0.dll!usb_submit_async+0x1d8 > > libusb0.dll!usb_set_configuration+0x63 > Test5.exe!main+0x8f > Test5.exe!__tmainCRTStartup+0x1a6 > Test5.exe!mainCRTStartup+0xd > kernel32.dll!RegisterWaitForInputIdle+0x49 > > Suggestions? > > > > On 4/7/07, Garth Dahlstrom <iro...@gm...> wrote: > I think hdev1 was correct in my case, since that's the handle returned by usb_open call (looking at other examples), however it looks like my test program gets hung when it calls > usb_set_configuration, here is the output: > > LIBUSB_DLL: info: usb_os_init: dll version: 0.1.12.1 > > LIBUSB_DLL: info: usb_os_init: driver version: 0.1.12.1 > > LIBUSB_DLL: info: usb_os_find_busses: found bus-0 > LIBUSB_DLL: info: usb_os_find_devices: found \\.\libusb0-0001--0x04b3-0x310b on bus-0 > LIBUSB_DLL: info: usb_os_find_devices: found \\.\libusb0-0002--0x15c2-0xffdc on bus-0 > > LIBUSB_DLL: info: usb_os_find_devices: found \\.\libusb0-0003--0x06f8-0xb100 on bus-0 > Hercules Console found at libusb:bus-0:\\.\libusb0-0003--0x06f8-0xb100 (0x06f8-0xb100) > No error > No error > ---- > > I had this happen before and I can't kill the app through taskmgr or pskill when it goes like this. > > > hrm... > > > > On 4/7/07, Garth Dahlstrom < > iro...@gm...> wrote: > Tried that before but hit an error message like this: > 1> libdjconsole-0.1.2\djconsole.cpp(142) : error C2664: 'usb_set_configuration' : cannot convert parameter 1 from 'usb_device *' to 'usb_dev_handle *' > > 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast > > So I changed it to hdev1, but that didn't work... > > Thanks for the pointer! > > Now I know what direction to head in... just need to figure out how to cast it properly for cpp I think. (should be easy enough to figure that out) > > Cheers, > > -G > > > > On 4/7/07, Stephan Meyer <ste...@we...> wrote: > > > LIBUSB_DLL: error: usb_claim_interface: could not claim interface 5, invalid configuration 0 > > > bus-0/\\.\libusb0-0003--0x06f8-0xb100 06F8/B100 > > - Manufacturer : Hercules > > - Product : Hercules DJ Console Mk2 > > > wTotalLength: 399 > > bNumInterfaces: 8 > > > > bConfigurationValue: 1 > > > Insert usb_set_configuration(dev, 1) before usb_claim_interface(). > > Stephan > > > _______________________________________________________________ > > SMS schreiben mit WEB.DE FreeMail - einfach, schnell und > kostenguenstig. Jetzt gleich testen! > http://f.web.de/?mc=021192 > > > ------------------------------------------------------------------------- > > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > > Libusb-win32-devel mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel > > > > > > -- > __ > --- == __/ t.O ==-- > http://stacktrace.org/ > > > > > -- > __ > --- == __/ t.O ==-- > http://stacktrace.org/ > > > > -- > __ > --- == __/ t.O ==-- > http://stacktrace.org/ > > ----------------------------------------------------------------- > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > ----------------------------------------------------------------- > _______________________________________________ > Libusb-win32-devel mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel > _______________________________________________________________ SMS schreiben mit WEB.DE FreeMail - einfach, schnell und kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192 |