|
From: Garth D. <iro...@gm...> - 2007-04-10 06:07:15
|
Here's what I tried this evening: - "install-filter.exe -h" in a cmd window. No output, no change in USB devices show in test program. - open install-filter.c, read that -u is to uninstall filter - run "install-filter.exe -u" in a cmd window. No output, no change in USB devices show in test program. - put usb_uninstall_service_np() into first line of bulk.c example and run that, that removes all but mouse device. - go download the "libusb-win32-device-bin-0.1.12.1.tar.gz" which has a whole bunch of shit that is not in the libusb-win32-filter-bin-0.1.12.1.exeinstall that I got before, like inf-wizard that I am supposed to run. - run inf-wizard, pick out my device from the list to create .inf files. Right click "Install" on generated .inf. - test program shows my mouse and my device (so all that got rid of one device from the list I don't care about) - run my app, no luck app detects mouse and my device and freezes - reboot - test program shows -1.-1.-1.-1 for driver version - change first line of bulk.c to usb_install_service_np() - test program shows only mouse, not my device - right click on my .inf file choose install - test program still only shows the mouse, though inf-wizard still sees all 3 devices... - reboot - all 3 devices appear again in test program - run a c program w/ usb_uninstall_service_np() + quit; - run bulk.c: 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_set_debug: setting debugging level to 255 (on) LIBUSB_DLL: info: usb_os_find_busses: found 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 <app frozen> Maybe it just doesn't work with composite devices that have multiple HIDs or something (the DJ console is 2 HIDs + a 5.1 sound card all in one device)... It's particularly frustrating that usb_set_configuration seems to not be able to timeout in any kind of reasonable fashion... On 4/9/07, Stephan Meyer <ste...@we...> wrote: > > > 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 > > > ------------------------------------------------------------------------- > 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/ |