|
From: Stephan M. <ste...@we...> - 2007-04-07 08:22:32
|
> 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 |
|
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 |
|
From: Xiaofan C. <xia...@gm...> - 2007-04-10 03:47:01
|
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. The thing is that you need to uninstall the kernel HID driver and use the libusb-win32 device driver for this kind of HID device. This significantly reduces the usability of libusb-win32 for HID device under Windows. Yet many USB device disguise them as HID device just to avoid writing a device driver. Just wondering if it is possible to use an alternative backend (Windows HID apli) and make libusb a wrapper on top of it. I understand then it should perhaps be called libhid-win32 then. By the way, will the new WinUSB based libusb-win32 solve this issue? Regards, Xiaofan |
|
From: Xiaofan C. <xia...@gm...> - 2007-04-10 03:51:02
|
On 4/10/07, Xiaofan Chen <xia...@gm...> wrote: > 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. > > The thing is that you need to uninstall the kernel HID driver and > use the libusb-win32 device driver for this kind of HID device. This > significantly reduces the usability of libusb-win32 for HID device > under Windows. Yet many USB device disguise them as HID device > just to avoid writing a device driver. > > Just wondering if it is possible to use an alternative backend > (Windows HID apli) and make libusb a wrapper on top of it. > I understand then it should perhaps be called libhid-win32 then. > > By the way, will the new WinUSB based libusb-win32 solve this > issue? > The nice thing about filter driver is that it is for "all" device and you can still use the existing vendor driver and vendor application with the libusb-win32 application. And sometimes it is a bit difficult to uninstall the Windows driver. |
|
From: Garth D. <iro...@gm...> - 2007-04-10 06:16:04
|
There is a libHID library on http://libhid.alioth.debian.org/ that claims it aims to work everywhere (Windows is listed on the website)... in practise the source repo doesn't actually look like it has any code for win32 anywhere in there. I've been spoiled by a Delphi HID component that works wonderfully on Win32 (from the awesome Delphi Jedi's - http://www.delphi-jedi.org/), but that is likely non-portable and also being written in Pascal... On 4/9/07, Xiaofan Chen <xia...@gm...> wrote: > > > The thing is that you need to uninstall the kernel HID driver and > use the libusb-win32 device driver for this kind of HID device. This > significantly reduces the usability of libusb-win32 for HID device > under Windows. Yet many USB device disguise them as HID device > just to avoid writing a device driver. > > Just wondering if it is possible to use an alternative backend > (Windows HID apli) and make libusb a wrapper on top of it. > I understand then it should perhaps be called libhid-win32 then. > > By the way, will the new WinUSB based libusb-win32 solve this > issue? > -- __ --- == __/ t.O ==-- http://stacktrace.org/ |
|
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/ |
|
From: Xiaofan C. <xia...@gm...> - 2007-04-10 08:35:22
|
On 4/10/07, Garth Dahlstrom <iro...@gm...> wrote: > 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.exe install 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 You should uninstall the filter driver and then try again. If not the PC will hang since the Windows HID driver is still there. I have problem with this last time and Stephan's suggestion is working for me. |
|
From: Garth D. <iro...@gm...> - 2007-04-10 13:07:13
|
Okay, how exactly do I do that? install-filter.exe doesn't run at all on my computer, just quits with no output... Should I run the NSIS uninstaller for libusb-win32-filter-bin-0.1.12.1.exeand reboot, would that do it? Am I just supposed to be using the "bin" tar ball by itself? On 4/10/07, Xiaofan Chen <xia...@gm...> wrote: > > On 4/10/07, Garth Dahlstrom <iro...@gm...> wrote: > > 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.exe install 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 > > > You should uninstall the filter driver and then try again. If not the > PC will hang since the Windows HID driver is still there. I have > problem with this last time and Stephan's suggestion is working for me. > > ------------------------------------------------------------------------- > 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/ |
|
From: Xiaofan C. <xia...@gm...> - 2007-04-10 13:49:07
|
On 4/10/07, Garth Dahlstrom <iro...@gm...> wrote: > Okay, how exactly do I do that? > > install-filter.exe doesn't run at all on my computer, just quits with no > output... > > Should I run the NSIS uninstaller for > libusb-win32-filter-bin-0.1.12.1.exe and reboot, would that > do it? Am I just supposed to be using the "bin" tar ball by itself? > You can uninstall the fillter driver by using "add/remove program" in Control Panel. You need to manually "upgrade" the HID driver to the libusb device driver. It is quite troublesome and I do not know if it will work for you since your device is more complicated than the PICKit 2 I am using. Here is the procedure for the PICkit 2. For the detail procedure, you may want to look at my Microchip Forum post. http://forum.microchip.com/tm.aspx?m=110205 Regards, Xiaofan |
|
From: Stephan M. <ste...@we...> - 2007-04-10 19:53:16
|
> 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. > > The thing is that you need to uninstall the kernel HID driver and > use the libusb-win32 device driver for this kind of HID device. This > significantly reduces the usability of libusb-win32 for HID device > under Windows. Yet many USB device disguise them as HID device > just to avoid writing a device driver. > > Just wondering if it is possible to use an alternative backend > (Windows HID apli) and make libusb a wrapper on top of it. > I understand then it should perhaps be called libhid-win32 then. This sounds like a great idea! I'll add a native HID backend to the next version of the DLL. It should be possible to implement most of libusb's features on top of Windows' hid.dll such as open, close, interrupt-read/write and basic control messages. The rest can be emulated/simulated. > > By the way, will the new WinUSB based libusb-win32 solve this > issue? No, unfortunetly not. Winusb(.sys) is just a normal device driver like libusb0.sys. Stephan _______________________________________________________________ SMS schreiben mit WEB.DE FreeMail - einfach, schnell und kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192 |
|
From: Xiaofan C. <xia...@gm...> - 2007-04-11 01:01:15
|
On 4/11/07, Stephan Meyer <ste...@we...> wrote: > > > > The thing is that you need to uninstall the kernel HID driver and > > use the libusb-win32 device driver for this kind of HID device. This > > significantly reduces the usability of libusb-win32 for HID device > > under Windows. Yet many USB device disguise them as HID device > > just to avoid writing a device driver. > > > > Just wondering if it is possible to use an alternative backend > > (Windows HID apli) and make libusb a wrapper on top of it. > > I understand then it should perhaps be called libhid-win32 then. > > This sounds like a great idea! I'll add a native HID backend to the > next version of the DLL. It should be possible to implement most of > libusb's features on top of Windows' hid.dll such as open, close, > interrupt-read/write and basic control messages. The rest can be > emulated/simulated. > That will be great! "open, close, interrupt-read/write and basic control messages" are the functions we need most for those simple HID device. Now I am looking forward to test the next version of the DLL. Regards, Xiaofan |
|
From: Robert M. <mar...@co...> - 2007-04-11 05:54:04
|
Stephan Meyer wrote: > This sounds like a great idea! I'll add a native HID backend to the > next version of the DLL. It should be possible to implement most of > libusb's features on top of Windows' hid.dll such as open, close, > interrupt-read/write and basic control messages. The rest can be > emulated/simulated. I am not involved in this project, but i can tell you about bugs in the HID API of Windows. I do know almost all about that API. |
|
From: Garth D. <iro...@gm...> - 2007-04-07 08:50:19
|
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/ |
|
From: Garth D. <iro...@gm...> - 2007-04-07 09:00:14
|
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/ |
|
From: Garth D. <iro...@gm...> - 2007-04-09 05:36:42
|
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/ |