|
From: Krakora, R. V <rob...@de...> - 2007-08-13 20:38:48
|
Carl: I too had the same problem with the filter driver installed on Windows XP SP2 when calling usb_setconfiguration(). I installed it as "the" driver (not a filter) for the device for which I was trying to set the configuration and the problem went away. Best Regards, Rob Krakora Software Engineer Delphi Electronics & Safety e-mail: rob...@de... phone: 765-451-8574 -----Original Message----- From: lib...@li... [mailto:lib...@li...] On Behalf Of lib...@li... Sent: Monday, August 13, 2007 3:04 PM To: lib...@li... Subject: Libusb-win32-devel Digest, Vol 15, Issue 6 Send Libusb-win32-devel mailing list submissions to lib...@li... To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel or, via email, send a message with subject or body 'help' to lib...@li... You can reach the person managing the list at lib...@li... When replying, please edit your Subject line so it is more specific than "Re: Contents of Libusb-win32-devel digest..." Today's Topics: 1. Re: Composite device - HID + custom (Kitsok) 2. lots of bugs (Carl Kenner) ---------------------------------------------------------------------- Message: 1 Date: Mon, 13 Aug 2007 02:59:10 -0700 (PDT) From: Kitsok <ko...@ki...> Subject: Re: [Libusb-win32-devel] Composite device - HID + custom To: lib...@li... Message-ID: <121...@ta...> Content-Type: text/plain; charset=3Dus-ascii Hello Stephan! Stephan Meyer wrote: >=20 > Yes that's possible. See > http://msdn2.microsoft.com/en-us/library/ms791091.aspx=20 > for details. >=20 Well, as far as I understood I need an inf-file for the part of the composite device.=20 Firstly I've installed libUSB as filter and had unknown device + HID device.=20 After that I've modified an inf file made by the wizard from binary driver distribution.=20 I've removed .cat parts and added "&MI_01" to "devices" part: [Devices] -"PTJoy Composite Device"=3DLIBUSB_DEV, USB\VID_ffff&PID_3015 +"PTJoy Custom Device"=3DLIBUSB_DEV, USB\VID_ffff&PID_3015&MI_01 [Devices.NT] -"PTJoy Composite Device"=3DLIBUSB_DEV, USB\VID_ffff&PID_3015 +"PTJoy Custom Device"=3DLIBUSB_DEV, USB\VID_ffff&PID_3015&MI_01 [Devices.NTAMD64] -"PTJoy Composite Device"=3DLIBUSB_DEV, USB\VID_ffff&PID_3015 +"PTJoy Custom Device"=3DLIBUSB_DEV, USB\VID_ffff&PID_3015&MI_01 After that my device was recognized as "PTJoy Custom Device". The test application successfully seen my devices, but the bulk example failed on=20 if(usb_set_configuration(dev, 1) < 0) If I do usb_set_configuration(dev,0) then I fail on usb_claim_interface(dev, 0) After that I've de-installed libusb filter and tried to install libusb as pure driver for my custom part.=20 In this case the test application doesn't see libusb buses at all... Could you please point me where to dig? Thanks! Best regards, Konstantin Klubnichkin --=20 View this message in context: http://www.nabble.com/Composite-device---HID-%2B-custom-tf4229374.html#a 12123666 Sent from the LibUSB Dev - Win32 mailing list archive at Nabble.com. ------------------------------ Message: 2 Date: Mon, 13 Aug 2007 20:48:54 +0930 From: "Carl Kenner" <car...@gm...> Subject: [Libusb-win32-devel] lots of bugs To: lib...@li... Message-ID: <fab...@ma...> Content-Type: text/plain; charset=3DISO-8859-1 Firstly, I tried installing the filter driver on Vista. It fails, and the test program shows driver version -1,-1,-1,-1. Secondly, I tried installing the device driver on Vista. It installs, and the test program shows the correct driver version, but finds a single bus with no devices. It won't actually find the device until you plug it into a port that it hasn't been in before. Presumably the original windows driver is still installed on whatever port you plugged it into first. Anyway it works, provided you plug it into a new port. Third, I tried installing the filter driver on XP. It installs, and all the USB devices and busses are enumerated correctly. But when I call usb_setconfiguration it freezes and there is no way to end my program's process with Ctrl+Alt+Delete or any other program, only restarting the computer will end it. Another libusb program I have, which I don't have the source code for. crashes but doesn't freeze. I don't know why. I haven't tried the device driver on XP yet. Are there any plans to fix, or at least DOCUMENT, these bugs??? ------------------------------ ------------------------------------------------------------------------ - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ------------------------------ _______________________________________________ Libusb-win32-devel mailing list Lib...@li... https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel End of Libusb-win32-devel Digest, Vol 15, Issue 6 ************************************************* ***************************************************************************= ************* Note: If the reader of this message is not the intended recipient, or an= employee or agent responsible for delivering this message to the intended= recipient, you are hereby notified that any dissemination, distribution or= copying of this communication is strictly prohibited. If you have received= this communication in error, please notify us immediately by replying to= the message and deleting it from your computer. Thank you.=20 ***************************************************************************= ************* |
|
From: Krakora, R. V <rob...@de...> - 2007-08-14 14:51:18
|
Carl: I ported libhid to Windows as it uses libusb on which libusb-win32 is based. It takes care of claiming the interface for interrupt endpoints and has an API call to retrieve data from interrupt endpoints. I added an extra parameter to one of the API functions so that the configuration as well as the interface could be selected. Previously, I was using the Windows HID API which was quite confusing to use. Here is the link to libhid: http://libhid.alioth.debian.org/=20 Best Regards, Rob Krakora Software Engineer Delphi Electronics & Safety e-mail: rob...@de... phone: 765-451-8574 -----Original Message----- From: lib...@li... [mailto:lib...@li...] On Behalf Of lib...@li... Sent: Tuesday, August 14, 2007 10:08 AM To: lib...@li... Subject: Libusb-win32-devel Digest, Vol 15, Issue 7 Send Libusb-win32-devel mailing list submissions to lib...@li... To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel or, via email, send a message with subject or body 'help' to lib...@li... You can reach the person managing the list at lib...@li... When replying, please edit your Subject line so it is more specific than "Re: Contents of Libusb-win32-devel digest..." Today's Topics: 1. Re: lots of bugs (Carl Kenner) (Krakora, Robert V) 2. Re: lots of bugs (Carl Kenner) (Carl Kenner) 3. Re: lots of bugs (Carl Kenner) (Xiaofan Chen) 4. Re: lots of bugs (Carl Kenner) (Xiaofan Chen) 5. Re: lots of bugs (Carl Kenner) (Carl Kenner) 6. Re: lots of bugs (Carl Kenner) (Xiaofan Chen) ---------------------------------------------------------------------- Message: 1 Date: Mon, 13 Aug 2007 16:37:41 -0400 From: "Krakora, Robert V" <rob...@de...> Subject: Re: [Libusb-win32-devel] lots of bugs (Carl Kenner) To: <lib...@li...> Message-ID: =09 <3C7...@US... Auto.net> =09 Content-Type: text/plain; charset=3D"us-ascii" Carl: I too had the same problem with the filter driver installed on Windows XP SP2 when calling usb_setconfiguration(). I installed it as "the" driver (not a filter) for the device for which I was trying to set the configuration and the problem went away. Best Regards, Rob Krakora Software Engineer Delphi Electronics & Safety e-mail: rob...@de... phone: 765-451-8574 -----Original Message----- From: lib...@li... [mailto:lib...@li...] On Behalf Of lib...@li... Sent: Monday, August 13, 2007 3:04 PM To: lib...@li... Subject: Libusb-win32-devel Digest, Vol 15, Issue 6 Send Libusb-win32-devel mailing list submissions to lib...@li... To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel or, via email, send a message with subject or body 'help' to lib...@li... You can reach the person managing the list at lib...@li... When replying, please edit your Subject line so it is more specific than "Re: Contents of Libusb-win32-devel digest..." Today's Topics: 1. Re: Composite device - HID + custom (Kitsok) 2. lots of bugs (Carl Kenner) ---------------------------------------------------------------------- Message: 1 Date: Mon, 13 Aug 2007 02:59:10 -0700 (PDT) From: Kitsok <ko...@ki...> Subject: Re: [Libusb-win32-devel] Composite device - HID + custom To: lib...@li... Message-ID: <121...@ta...> Content-Type: text/plain; charset=3Dus-ascii Hello Stephan! Stephan Meyer wrote: >=20 > Yes that's possible. See > http://msdn2.microsoft.com/en-us/library/ms791091.aspx=20 > for details. >=20 Well, as far as I understood I need an inf-file for the part of the composite device.=20 Firstly I've installed libUSB as filter and had unknown device + HID device.=20 After that I've modified an inf file made by the wizard from binary driver distribution.=20 I've removed .cat parts and added "&MI_01" to "devices" part: [Devices] -"PTJoy Composite Device"=3DLIBUSB_DEV, USB\VID_ffff&PID_3015 +"PTJoy Custom Device"=3DLIBUSB_DEV, USB\VID_ffff&PID_3015&MI_01 [Devices.NT] -"PTJoy Composite Device"=3DLIBUSB_DEV, USB\VID_ffff&PID_3015 +"PTJoy Custom Device"=3DLIBUSB_DEV, USB\VID_ffff&PID_3015&MI_01 [Devices.NTAMD64] -"PTJoy Composite Device"=3DLIBUSB_DEV, USB\VID_ffff&PID_3015 +"PTJoy Custom Device"=3DLIBUSB_DEV, USB\VID_ffff&PID_3015&MI_01 After that my device was recognized as "PTJoy Custom Device". The test application successfully seen my devices, but the bulk example failed on=20 if(usb_set_configuration(dev, 1) < 0) If I do usb_set_configuration(dev,0) then I fail on usb_claim_interface(dev, 0) After that I've de-installed libusb filter and tried to install libusb as pure driver for my custom part.=20 In this case the test application doesn't see libusb buses at all... Could you please point me where to dig? Thanks! Best regards, Konstantin Klubnichkin --=20 View this message in context: http://www.nabble.com/Composite-device---HID-%2B-custom-tf4229374.html#a 12123666 Sent from the LibUSB Dev - Win32 mailing list archive at Nabble.com. ------------------------------ Message: 2 Date: Mon, 13 Aug 2007 20:48:54 +0930 From: "Carl Kenner" <car...@gm...> Subject: [Libusb-win32-devel] lots of bugs To: lib...@li... Message-ID: <fab...@ma...> Content-Type: text/plain; charset=3DISO-8859-1 Firstly, I tried installing the filter driver on Vista. It fails, and the test program shows driver version -1,-1,-1,-1. Secondly, I tried installing the device driver on Vista. It installs, and the test program shows the correct driver version, but finds a single bus with no devices. It won't actually find the device until you plug it into a port that it hasn't been in before. Presumably the original windows driver is still installed on whatever port you plugged it into first. Anyway it works, provided you plug it into a new port. Third, I tried installing the filter driver on XP. It installs, and all the USB devices and busses are enumerated correctly. But when I call usb_setconfiguration it freezes and there is no way to end my program's process with Ctrl+Alt+Delete or any other program, only restarting the computer will end it. Another libusb program I have, which I don't have the source code for. crashes but doesn't freeze. I don't know why. I haven't tried the device driver on XP yet. Are there any plans to fix, or at least DOCUMENT, these bugs??? ------------------------------ ------------------------------------------------------------------------ - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ------------------------------ _______________________________________________ Libusb-win32-devel mailing list Lib...@li... https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel End of Libusb-win32-devel Digest, Vol 15, Issue 6 ************************************************* ************************************************************************ **************** Note: If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you.=20 ************************************************************************ **************** ------------------------------ Message: 2 Date: Tue, 14 Aug 2007 13:50:46 +0930 From: "Carl Kenner" <car...@gm...> Subject: Re: [Libusb-win32-devel] lots of bugs (Carl Kenner) To: lib...@li... Message-ID: <fab...@ma...> Content-Type: text/plain; charset=3DISO-8859-1 The problem is that "the" driver for the device would then remove all the HID functionality that Windows provides, which means I need to use a PPJoy virtual joystick to simulate it as a joystick again. All I want to do is read one feature report that Windows won't let me read, and then it will work as a normal HID joystick. By the way, when I am using the Device Driver, there is another problem I am having. Interrupt reads are always failing. So I end up using the GetInputReport via usb control messages as workaround. On 14/08/07, Krakora, Robert V <rob...@de...> wrote: > > Carl: > > I too had the same problem with the filter driver installed on Windows > XP SP2 when calling usb_setconfiguration(). I installed it as "the" > driver (not a filter) for the device for which I was trying to set the > configuration and the problem went away. > > Best Regards, > > Rob Krakora > Software Engineer > Delphi Electronics & Safety > e-mail: rob...@de... > phone: 765-451-8574 > -----Original Message----- > From: lib...@li... > [mailto:lib...@li...] On Behalf Of > lib...@li... > Sent: Monday, August 13, 2007 3:04 PM > To: lib...@li... > Subject: Libusb-win32-devel Digest, Vol 15, Issue 6 > > Send Libusb-win32-devel mailing list submissions to > lib...@li... > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel > or, via email, send a message with subject or body 'help' to > lib...@li... > > You can reach the person managing the list at > lib...@li... > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Libusb-win32-devel digest..." > > > Today's Topics: > > 1. Re: Composite device - HID + custom (Kitsok) > 2. lots of bugs (Carl Kenner) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 13 Aug 2007 02:59:10 -0700 (PDT) > From: Kitsok <ko...@ki...> > Subject: Re: [Libusb-win32-devel] Composite device - HID + custom > To: lib...@li... > Message-ID: <121...@ta...> > Content-Type: text/plain; charset=3Dus-ascii > > > Hello Stephan! > > > Stephan Meyer wrote: > > > > Yes that's possible. See > > http://msdn2.microsoft.com/en-us/library/ms791091.aspx > > for details. > > > > Well, as far as I understood I need an inf-file for the part of the > composite device. > > Firstly I've installed libUSB as filter and had unknown device + HID > device. > After that I've modified an inf file made by the wizard from binary > driver > distribution. > I've removed .cat parts and added "&MI_01" to "devices" part: > [Devices] > -"PTJoy Composite Device"=3DLIBUSB_DEV, USB\VID_ffff&PID_3015 > +"PTJoy Custom Device"=3DLIBUSB_DEV, USB\VID_ffff&PID_3015&MI_01 > > [Devices.NT] > -"PTJoy Composite Device"=3DLIBUSB_DEV, USB\VID_ffff&PID_3015 > +"PTJoy Custom Device"=3DLIBUSB_DEV, USB\VID_ffff&PID_3015&MI_01 > > [Devices.NTAMD64] > -"PTJoy Composite Device"=3DLIBUSB_DEV, USB\VID_ffff&PID_3015 > +"PTJoy Custom Device"=3DLIBUSB_DEV, USB\VID_ffff&PID_3015&MI_01 > > After that my device was recognized as "PTJoy Custom Device". > The test application successfully seen my devices, but the bulk example > failed on > if(usb_set_configuration(dev, 1) < 0) > > If I do usb_set_configuration(dev,0) then I fail on > usb_claim_interface(dev, > 0) > > After that I've de-installed libusb filter and tried to install libusb > as > pure driver for my custom part. > In this case the test application doesn't see libusb buses at all... > > Could you please point me where to dig? > > Thanks! > > Best regards, > Konstantin Klubnichkin > -- > View this message in context: > http://www.nabble.com/Composite-device---HID-%2B-custom-tf4229374.html#a > 12123666 > Sent from the LibUSB Dev - Win32 mailing list archive at Nabble.com. > > > > > ------------------------------ > > Message: 2 > Date: Mon, 13 Aug 2007 20:48:54 +0930 > From: "Carl Kenner" <car...@gm...> > Subject: [Libusb-win32-devel] lots of bugs > To: lib...@li... > Message-ID: > <fab...@ma...> > Content-Type: text/plain; charset=3DISO-8859-1 > > Firstly, I tried installing the filter driver on Vista. It fails, and > the test program shows driver version -1,-1,-1,-1. > > Secondly, I tried installing the device driver on Vista. It installs, > and the test program shows the correct driver version, but finds a > single bus with no devices. It won't actually find the device until > you plug it into a port that it hasn't been in before. Presumably the > original windows driver is still installed on whatever port you > plugged it into first. Anyway it works, provided you plug it into a > new port. > > Third, I tried installing the filter driver on XP. It installs, and > all the USB devices and busses are enumerated correctly. But when I > call usb_setconfiguration it freezes and there is no way to end my > program's process with Ctrl+Alt+Delete or any other program, only > restarting the computer will end it. Another libusb program I have, > which I don't have the source code for. crashes but doesn't freeze. I > don't know why. > > I haven't tried the device driver on XP yet. > > Are there any plans to fix, or at least DOCUMENT, these bugs??? > > > > ------------------------------ > > ------------------------------------------------------------------------ > - > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > ------------------------------ > > _______________________________________________ > Libusb-win32-devel mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel > > > End of Libusb-win32-devel Digest, Vol 15, Issue 6 > ************************************************* > > ************************************************************************ **************** > > Note: If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. > > ************************************************************************ **************** > > ------------------------------------------------------------------------ - > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Libusb-win32-devel mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel > ------------------------------ Message: 3 Date: Tue, 14 Aug 2007 13:52:34 +0800 From: "Xiaofan Chen" <xia...@gm...> Subject: Re: [Libusb-win32-devel] lots of bugs (Carl Kenner) To: lib...@li... Message-ID: <a27...@ma...> Content-Type: text/plain; charset=3DISO-8859-1 On 8/14/07, Carl Kenner <car...@gm...> wrote: > The problem is that "the" driver for the device would then remove all > the HID functionality that Windows provides, which means I need to use > a PPJoy virtual joystick to simulate it as a joystick again. > > All I want to do is read one feature report that Windows won't let me > read, and then it will work as a normal HID joystick. > > By the way, when I am using the Device Driver, there is another > problem I am having. Interrupt reads are always failing. So I end up > using the GetInputReport via usb control messages as workaround. > With the current version of libusb 0.1x, I believe you won't be able to achieve what you want to do. since you can not really use the filter driver with HID device. Somewhere I read that the filter driver will not be actively supported but I can not find the reference now. You can do this in Windows without using libusb (using Raw Input). http://www.lvr.com/hidfaq.htm The new development version (1.x) will support HID as a backend. I can find the HID device with the new HID backend. However, read and write are not working yet. Regards, Xiaofan ------------------------------ Message: 4 Date: Tue, 14 Aug 2007 14:00:41 +0800 From: "Xiaofan Chen" <xia...@gm...> Subject: Re: [Libusb-win32-devel] lots of bugs (Carl Kenner) To: lib...@li... Message-ID: <a27...@ma...> Content-Type: text/plain; charset=3DISO-8859-1 On 8/14/07, Carl Kenner <car...@gm...> wrote: > By the way, when I am using the Device Driver, there is another > problem I am having. Interrupt reads are always failing. So I end up > using the GetInputReport via usb control messages as workaround. > Maybe you forget the direction bit for the IN endpoint (0x81 instead of 0x01) for your interrupt read. This is one difference compare to Linux libusb. For reading feature request for the HID joystick, HID faq page mentions the following workarond. [quote] "Why do I receive "Access denied" when attempting to access my HID? Windows 2000 and Windows XP have exclusive read/write access to HIDs that are configured as a system keyboards or mice. An application can obtain a handle to a system keyboard or mouse by not requesting READ or WRITE access with CreateFile. Communications can then use HidD_SetFeature and HidD_GetFeature (assuming the device supports Feature reports)." [/quote] Regards, Xiaofan ------------------------------ Message: 5 Date: Tue, 14 Aug 2007 23:05:44 +0930 From: "Carl Kenner" <car...@gm...> Subject: Re: [Libusb-win32-devel] lots of bugs (Carl Kenner) To: lib...@li... Message-ID: <fab...@ma...> Content-Type: text/plain; charset=3DISO-8859-1 I can't use HID as a backend, because the windows HID isn't working. Presumably because the SIXAXIS uses a malformed HID descriptor, and it won't let me read this feature report. I'm reasonably confident the device isn't a keyboard or mouse, it seems to just be a HID joystick or gamepad. Reading the same feature report with libusb is easy. Once I have read this feature report, the device will start sending input reports to the computer, but before that it won't. Now all the other sixaxis drivers for windows use the libusb filter driver to read this one feature report, while windows still sees it as a gamepad. So it must work on some computers. But it doesn't work on the computers I tested it on. On 14/08/07, Xiaofan Chen <xia...@gm...> wrote: > On 8/14/07, Carl Kenner <car...@gm...> wrote: > > By the way, when I am using the Device Driver, there is another > > problem I am having. Interrupt reads are always failing. So I end up > > using the GetInputReport via usb control messages as workaround. > > > Maybe you forget the direction bit for the IN endpoint (0x81 instead of > 0x01) for your interrupt read. This is one difference compare to > Linux libusb. > > For reading feature request for the HID joystick, HID faq page > mentions the following workarond. > > [quote] > "Why do I receive "Access denied" when attempting to access my HID? > > Windows 2000 and Windows XP have exclusive read/write access to > HIDs that are configured as a system keyboards or mice. An application > can obtain a handle to a system keyboard or mouse by not requesting > READ or WRITE access with CreateFile. Communications can then > use HidD_SetFeature and HidD_GetFeature (assuming the device > supports Feature reports)." > [/quote] > > Regards, > Xiaofan > > ------------------------------------------------------------------------ - > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Libusb-win32-devel mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel > ------------------------------ Message: 6 Date: Tue, 14 Aug 2007 22:08:06 +0800 From: "Xiaofan Chen" <xia...@gm...> Subject: Re: [Libusb-win32-devel] lots of bugs (Carl Kenner) To: lib...@li... Message-ID: <a27...@ma...> Content-Type: text/plain; charset=3DISO-8859-1 On 8/14/07, Carl Kenner <car...@gm...> wrote: > I can't use HID as a backend, because the windows HID isn't working. > Presumably because the SIXAXIS uses a malformed HID descriptor, and it > won't let me read this feature report. I'm reasonably confident the > device isn't a keyboard or mouse, it seems to just be a HID joystick > or gamepad. Reading the same feature report with libusb is easy. Once > I have read this feature report, the device will start sending input > reports to the computer, but before that it won't. > > Now all the other sixaxis drivers for windows use the libusb filter > driver to read this one feature report, while windows still sees it as > a gamepad. So it must work on some computers. But it doesn't work on > the computers I tested it on. I see. So it is a gamepad. Now I understand why your interrupt transfer will not work. You do need to claim the interface (use the device driver, set the configuration, claim the interface) in order for the interrupt transfer to work. You can try this. You do not need to claim the interface to get control transfer to work. Therefore you can use the filter driver. If I am not wrong, you do not need to (and probably you can not) set configuration since the HID driver has already done that and claim the interface. I am not 100% sure here though. You can try this. Google found this and maybe you can give it a try. http://www.bricklife.com/library/sixaxis-init.c Regards, Xiaofan Regards, Xiaofan ------------------------------ ------------------------------------------------------------------------ - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ------------------------------ _______________________________________________ Libusb-win32-devel mailing list Lib...@li... https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel End of Libusb-win32-devel Digest, Vol 15, Issue 7 ************************************************* ***************************************************************************= ************* Note: If the reader of this message is not the intended recipient, or an= employee or agent responsible for delivering this message to the intended= recipient, you are hereby notified that any dissemination, distribution or= copying of this communication is strictly prohibited. If you have received= this communication in error, please notify us immediately by replying to= the message and deleting it from your computer. Thank you.=20 ***************************************************************************= ************* |
|
From: Xiaofan C. <xia...@gm...> - 2007-08-14 23:11:39
|
On 8/14/07, Krakora, Robert V <rob...@de...> wrote: > I ported libhid to Windows as it uses libusb on which libusb-win32 is > based. It takes care of claiming the interface for interrupt endpoints > and has an API call to retrieve data from interrupt endpoints. I added > an extra parameter to one of the API functions so that the configuration > as well as the interface could be selected. Previously, I was using the > Windows HID API which was quite confusing to use. Here is the link to > libhid: > Thanks for the info. Where can I get this Windows port of libhid? I am monitoring the libhid list and have not heard this. Regards, Xiaofan |
|
From: Carl K. <car...@gm...> - 2007-08-14 04:20:51
|
The problem is that "the" driver for the device would then remove all the HID functionality that Windows provides, which means I need to use a PPJoy virtual joystick to simulate it as a joystick again. All I want to do is read one feature report that Windows won't let me read, and then it will work as a normal HID joystick. By the way, when I am using the Device Driver, there is another problem I am having. Interrupt reads are always failing. So I end up using the GetInputReport via usb control messages as workaround. On 14/08/07, Krakora, Robert V <rob...@de...> wrote: > > Carl: > > I too had the same problem with the filter driver installed on Windows > XP SP2 when calling usb_setconfiguration(). I installed it as "the" > driver (not a filter) for the device for which I was trying to set the > configuration and the problem went away. > > Best Regards, > > Rob Krakora > Software Engineer > Delphi Electronics & Safety > e-mail: rob...@de... > phone: 765-451-8574 > -----Original Message----- > From: lib...@li... > [mailto:lib...@li...] On Behalf Of > lib...@li... > Sent: Monday, August 13, 2007 3:04 PM > To: lib...@li... > Subject: Libusb-win32-devel Digest, Vol 15, Issue 6 > > Send Libusb-win32-devel mailing list submissions to > lib...@li... > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel > or, via email, send a message with subject or body 'help' to > lib...@li... > > You can reach the person managing the list at > lib...@li... > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Libusb-win32-devel digest..." > > > Today's Topics: > > 1. Re: Composite device - HID + custom (Kitsok) > 2. lots of bugs (Carl Kenner) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 13 Aug 2007 02:59:10 -0700 (PDT) > From: Kitsok <ko...@ki...> > Subject: Re: [Libusb-win32-devel] Composite device - HID + custom > To: lib...@li... > Message-ID: <121...@ta...> > Content-Type: text/plain; charset=us-ascii > > > Hello Stephan! > > > Stephan Meyer wrote: > > > > Yes that's possible. See > > http://msdn2.microsoft.com/en-us/library/ms791091.aspx > > for details. > > > > Well, as far as I understood I need an inf-file for the part of the > composite device. > > Firstly I've installed libUSB as filter and had unknown device + HID > device. > After that I've modified an inf file made by the wizard from binary > driver > distribution. > I've removed .cat parts and added "&MI_01" to "devices" part: > [Devices] > -"PTJoy Composite Device"=LIBUSB_DEV, USB\VID_ffff&PID_3015 > +"PTJoy Custom Device"=LIBUSB_DEV, USB\VID_ffff&PID_3015&MI_01 > > [Devices.NT] > -"PTJoy Composite Device"=LIBUSB_DEV, USB\VID_ffff&PID_3015 > +"PTJoy Custom Device"=LIBUSB_DEV, USB\VID_ffff&PID_3015&MI_01 > > [Devices.NTAMD64] > -"PTJoy Composite Device"=LIBUSB_DEV, USB\VID_ffff&PID_3015 > +"PTJoy Custom Device"=LIBUSB_DEV, USB\VID_ffff&PID_3015&MI_01 > > After that my device was recognized as "PTJoy Custom Device". > The test application successfully seen my devices, but the bulk example > failed on > if(usb_set_configuration(dev, 1) < 0) > > If I do usb_set_configuration(dev,0) then I fail on > usb_claim_interface(dev, > 0) > > After that I've de-installed libusb filter and tried to install libusb > as > pure driver for my custom part. > In this case the test application doesn't see libusb buses at all... > > Could you please point me where to dig? > > Thanks! > > Best regards, > Konstantin Klubnichkin > -- > View this message in context: > http://www.nabble.com/Composite-device---HID-%2B-custom-tf4229374.html#a > 12123666 > Sent from the LibUSB Dev - Win32 mailing list archive at Nabble.com. > > > > > ------------------------------ > > Message: 2 > Date: Mon, 13 Aug 2007 20:48:54 +0930 > From: "Carl Kenner" <car...@gm...> > Subject: [Libusb-win32-devel] lots of bugs > To: lib...@li... > Message-ID: > <fab...@ma...> > Content-Type: text/plain; charset=ISO-8859-1 > > Firstly, I tried installing the filter driver on Vista. It fails, and > the test program shows driver version -1,-1,-1,-1. > > Secondly, I tried installing the device driver on Vista. It installs, > and the test program shows the correct driver version, but finds a > single bus with no devices. It won't actually find the device until > you plug it into a port that it hasn't been in before. Presumably the > original windows driver is still installed on whatever port you > plugged it into first. Anyway it works, provided you plug it into a > new port. > > Third, I tried installing the filter driver on XP. It installs, and > all the USB devices and busses are enumerated correctly. But when I > call usb_setconfiguration it freezes and there is no way to end my > program's process with Ctrl+Alt+Delete or any other program, only > restarting the computer will end it. Another libusb program I have, > which I don't have the source code for. crashes but doesn't freeze. I > don't know why. > > I haven't tried the device driver on XP yet. > > Are there any plans to fix, or at least DOCUMENT, these bugs??? > > > > ------------------------------ > > ------------------------------------------------------------------------ > - > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > ------------------------------ > > _______________________________________________ > Libusb-win32-devel mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel > > > End of Libusb-win32-devel Digest, Vol 15, Issue 6 > ************************************************* > > **************************************************************************************** > > Note: If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. > > **************************************************************************************** > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Libusb-win32-devel mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel > |
|
From: Xiaofan C. <xia...@gm...> - 2007-08-14 05:52:38
|
On 8/14/07, Carl Kenner <car...@gm...> wrote: > The problem is that "the" driver for the device would then remove all > the HID functionality that Windows provides, which means I need to use > a PPJoy virtual joystick to simulate it as a joystick again. > > All I want to do is read one feature report that Windows won't let me > read, and then it will work as a normal HID joystick. > > By the way, when I am using the Device Driver, there is another > problem I am having. Interrupt reads are always failing. So I end up > using the GetInputReport via usb control messages as workaround. > With the current version of libusb 0.1x, I believe you won't be able to achieve what you want to do. since you can not really use the filter driver with HID device. Somewhere I read that the filter driver will not be actively supported but I can not find the reference now. You can do this in Windows without using libusb (using Raw Input). http://www.lvr.com/hidfaq.htm The new development version (1.x) will support HID as a backend. I can find the HID device with the new HID backend. However, read and write are not working yet. Regards, Xiaofan |
|
From: Xiaofan C. <xia...@gm...> - 2007-08-14 06:00:43
|
On 8/14/07, Carl Kenner <car...@gm...> wrote: > By the way, when I am using the Device Driver, there is another > problem I am having. Interrupt reads are always failing. So I end up > using the GetInputReport via usb control messages as workaround. > Maybe you forget the direction bit for the IN endpoint (0x81 instead of 0x01) for your interrupt read. This is one difference compare to Linux libusb. For reading feature request for the HID joystick, HID faq page mentions the following workarond. [quote] "Why do I receive "Access denied" when attempting to access my HID? Windows 2000 and Windows XP have exclusive read/write access to HIDs that are configured as a system keyboards or mice. An application can obtain a handle to a system keyboard or mouse by not requesting READ or WRITE access with CreateFile. Communications can then use HidD_SetFeature and HidD_GetFeature (assuming the device supports Feature reports)." [/quote] Regards, Xiaofan |
|
From: Carl K. <car...@gm...> - 2007-08-14 13:35:46
|
I can't use HID as a backend, because the windows HID isn't working. Presumably because the SIXAXIS uses a malformed HID descriptor, and it won't let me read this feature report. I'm reasonably confident the device isn't a keyboard or mouse, it seems to just be a HID joystick or gamepad. Reading the same feature report with libusb is easy. Once I have read this feature report, the device will start sending input reports to the computer, but before that it won't. Now all the other sixaxis drivers for windows use the libusb filter driver to read this one feature report, while windows still sees it as a gamepad. So it must work on some computers. But it doesn't work on the computers I tested it on. On 14/08/07, Xiaofan Chen <xia...@gm...> wrote: > On 8/14/07, Carl Kenner <car...@gm...> wrote: > > By the way, when I am using the Device Driver, there is another > > problem I am having. Interrupt reads are always failing. So I end up > > using the GetInputReport via usb control messages as workaround. > > > Maybe you forget the direction bit for the IN endpoint (0x81 instead of > 0x01) for your interrupt read. This is one difference compare to > Linux libusb. > > For reading feature request for the HID joystick, HID faq page > mentions the following workarond. > > [quote] > "Why do I receive "Access denied" when attempting to access my HID? > > Windows 2000 and Windows XP have exclusive read/write access to > HIDs that are configured as a system keyboards or mice. An application > can obtain a handle to a system keyboard or mouse by not requesting > READ or WRITE access with CreateFile. Communications can then > use HidD_SetFeature and HidD_GetFeature (assuming the device > supports Feature reports)." > [/quote] > > Regards, > Xiaofan > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Libusb-win32-devel mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel > |
|
From: Xiaofan C. <xia...@gm...> - 2007-08-14 14:08:12
|
On 8/14/07, Carl Kenner <car...@gm...> wrote: > I can't use HID as a backend, because the windows HID isn't working. > Presumably because the SIXAXIS uses a malformed HID descriptor, and it > won't let me read this feature report. I'm reasonably confident the > device isn't a keyboard or mouse, it seems to just be a HID joystick > or gamepad. Reading the same feature report with libusb is easy. Once > I have read this feature report, the device will start sending input > reports to the computer, but before that it won't. > > Now all the other sixaxis drivers for windows use the libusb filter > driver to read this one feature report, while windows still sees it as > a gamepad. So it must work on some computers. But it doesn't work on > the computers I tested it on. I see. So it is a gamepad. Now I understand why your interrupt transfer will not work. You do need to claim the interface (use the device driver, set the configuration, claim the interface) in order for the interrupt transfer to work. You can try this. You do not need to claim the interface to get control transfer to work. Therefore you can use the filter driver. If I am not wrong, you do not need to (and probably you can not) set configuration since the HID driver has already done that and claim the interface. I am not 100% sure here though. You can try this. Google found this and maybe you can give it a try. http://www.bricklife.com/library/sixaxis-init.c Regards, Xiaofan Regards, Xiaofan |
|
From: Xiaofan C. <xia...@gm...> - 2007-08-14 14:14:51
|
On 8/14/07, Xiaofan Chen <xia...@gm...> wrote: > On 8/14/07, Carl Kenner <car...@gm...> wrote: > > I can't use HID as a backend, because the windows HID isn't working. > > Presumably because the SIXAXIS uses a malformed HID descriptor, and it > > won't let me read this feature report. I'm reasonably confident the > > device isn't a keyboard or mouse, it seems to just be a HID joystick > > or gamepad. Reading the same feature report with libusb is easy. Once > > I have read this feature report, the device will start sending input > > reports to the computer, but before that it won't. > > > > Now all the other sixaxis drivers for windows use the libusb filter > > driver to read this one feature report, while windows still sees it as > > a gamepad. So it must work on some computers. But it doesn't work on > > the computers I tested it on. > > I see. So it is a gamepad. > > Now I understand why your interrupt transfer will not work. > You do need to claim the interface (use the device driver, set the > configuration, claim the interface) in order for the interrupt transfer > to work. You can try this. > > You do not need to claim the interface to get control transfer to work. > Therefore you can use the filter driver. If I am not wrong, you do not > need to (and probably you can not) set configuration since the > HID driver has already done that and claim the interface. I am not > 100% sure here though. You can try this. > > Google found this and maybe you can give it a try. > http://www.bricklife.com/library/sixaxis-init.c > > This page is in Japanese but you might be able to try to use a auto-translator. For Windows: http://www.padc.cs.tsukuba.ac.jp/~k1/ For Mac OS X: http://www.bricklife.com/weblog/000705.html Hope this helps. Xiaofan http://mcuee.blogspot.com/ http://groups.google.com/group/pickit-devel |
|
From: Carl K. <car...@gm...> - 2007-08-14 14:51:44
|
By the way, that Japanese windows program crashes (but doesn't freeze) on my computer, and apparently on many other computers (but not all). They don't include their source code, so I don't know why. Don't get me wrong, my program is currently working perfectly with the SIXAXIS, it just doesn't support the filter driver, but if I stop claiming the device then perhaps it will work on the filter driver (which only works on XP) too. So that should solve my problems (except for the no HID access on Vista, but for my program that is a small problem, since my program emulates a joystick anyway). Nevertheless, here is a buglist which libusb-win32 writers may wish to have a go at fixing: usb_setconfiguration on the filter driver may freeze the program forcing you to reboot the computer, instead of simply failing with an error code. interrupt reads may fail on Vista (with the device driver) The filter driver won't install on Vista The device driver detects an empty bus if you plug your device into a port that you had previously plugged it into before you installed the device driver. As the installation wizard requires you to plug your device in before it installs the device driver, you can't use it in that port again. There is zero documentation. This is the most serious, and most easily fixed bug. By the way, I've converted the most of the libusb-win32 headers to Delphi, if that is any use to anyone. On 14/08/07, Xiaofan Chen <xia...@gm...> wrote: > On 8/14/07, Xiaofan Chen <xia...@gm...> wrote: > > On 8/14/07, Carl Kenner <car...@gm...> wrote: > > > I can't use HID as a backend, because the windows HID isn't working. > > > Presumably because the SIXAXIS uses a malformed HID descriptor, and it > > > won't let me read this feature report. I'm reasonably confident the > > > device isn't a keyboard or mouse, it seems to just be a HID joystick > > > or gamepad. Reading the same feature report with libusb is easy. Once > > > I have read this feature report, the device will start sending input > > > reports to the computer, but before that it won't. > > > > > > Now all the other sixaxis drivers for windows use the libusb filter > > > driver to read this one feature report, while windows still sees it as > > > a gamepad. So it must work on some computers. But it doesn't work on > > > the computers I tested it on. > > > > I see. So it is a gamepad. > > > > Now I understand why your interrupt transfer will not work. > > You do need to claim the interface (use the device driver, set the > > configuration, claim the interface) in order for the interrupt transfer > > to work. You can try this. > > > > You do not need to claim the interface to get control transfer to work. > > Therefore you can use the filter driver. If I am not wrong, you do not > > need to (and probably you can not) set configuration since the > > HID driver has already done that and claim the interface. I am not > > 100% sure here though. You can try this. > > > > Google found this and maybe you can give it a try. > > http://www.bricklife.com/library/sixaxis-init.c > > > > > > This page is in Japanese but you might be able to try to > use a auto-translator. > > For Windows: > http://www.padc.cs.tsukuba.ac.jp/~k1/ > > For Mac OS X: > http://www.bricklife.com/weblog/000705.html > > Hope this helps. > > Xiaofan > http://mcuee.blogspot.com/ > http://groups.google.com/group/pickit-devel > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Libusb-win32-devel mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel > |
|
From: Carl K. <car...@gm...> - 2007-08-14 14:17:27
|
Ah! That is great news... But it doesn't explain why interrupt transfers are not working, since I did claim the interface (using the Device Driver on Vista), and I did use 0x81 as the endpoint (I even checked the list of endpoints to make sure it was right). Anyway, since I don't really need interrupt transfers, and I'm quite happy to poll the device (it reports its state, not transitions, so polling works fine), I'll try it without claiming the interface. I see the code you sent doesn't claim the interface. By the way, is it possible to send USB control messages without using libusb-win32? On 14/08/07, Xiaofan Chen <xia...@gm...> wrote: > On 8/14/07, Carl Kenner <car...@gm...> wrote: > > I can't use HID as a backend, because the windows HID isn't working. > > Presumably because the SIXAXIS uses a malformed HID descriptor, and it > > won't let me read this feature report. I'm reasonably confident the > > device isn't a keyboard or mouse, it seems to just be a HID joystick > > or gamepad. Reading the same feature report with libusb is easy. Once > > I have read this feature report, the device will start sending input > > reports to the computer, but before that it won't. > > > > Now all the other sixaxis drivers for windows use the libusb filter > > driver to read this one feature report, while windows still sees it as > > a gamepad. So it must work on some computers. But it doesn't work on > > the computers I tested it on. > > I see. So it is a gamepad. > > Now I understand why your interrupt transfer will not work. > You do need to claim the interface (use the device driver, set the > configuration, claim the interface) in order for the interrupt transfer > to work. You can try this. > > You do not need to claim the interface to get control transfer to work. > Therefore you can use the filter driver. If I am not wrong, you do not > need to (and probably you can not) set configuration since the > HID driver has already done that and claim the interface. I am not > 100% sure here though. You can try this. > > Google found this and maybe you can give it a try. > http://www.bricklife.com/library/sixaxis-init.c > > > Regards, > Xiaofan > > > > > Regards, > Xiaofan > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Libusb-win32-devel mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel > |
|
From: Xiaofan C. <xia...@gm...> - 2007-08-14 14:24:11
|
On 8/14/07, Carl Kenner <car...@gm...> wrote: > Ah! That is great news... > But it doesn't explain why interrupt transfers are not working, since > I did claim the interface (using the Device Driver on Vista), and I > did use 0x81 as the endpoint (I even checked the list of endpoints to > make sure it was right). > I am not so sure about libusb under Vista. I do not have a Vista PC. I am pretty sure you can do this under Windows XP with the device driver. Of course you will not have the HID functionality. Regards, Xiaofan |
|
From: Carl K. <car...@gm...> - 2007-08-14 18:05:30
|
OK, I tried it without setting the configuration or claiming the interface, and it didn't work on my Vista computer with the Device Driver. I then tried it without claiming the interface, but still setting the configuration and it worked. The problem is that setting the configuration is the call that crashed it on the filter driver on XP. So is there some way of knowing beforehand whether a call to SetConfiguration is going to freeze my program and force the user to reboot, or not? On 14/08/07, Xiaofan Chen <xia...@gm...> wrote: > On 8/14/07, Carl Kenner <car...@gm...> wrote: > > I can't use HID as a backend, because the windows HID isn't working. > > Presumably because the SIXAXIS uses a malformed HID descriptor, and it > > won't let me read this feature report. I'm reasonably confident the > > device isn't a keyboard or mouse, it seems to just be a HID joystick > > or gamepad. Reading the same feature report with libusb is easy. Once > > I have read this feature report, the device will start sending input > > reports to the computer, but before that it won't. > > > > Now all the other sixaxis drivers for windows use the libusb filter > > driver to read this one feature report, while windows still sees it as > > a gamepad. So it must work on some computers. But it doesn't work on > > the computers I tested it on. > > I see. So it is a gamepad. > > Now I understand why your interrupt transfer will not work. > You do need to claim the interface (use the device driver, set the > configuration, claim the interface) in order for the interrupt transfer > to work. You can try this. > > You do not need to claim the interface to get control transfer to work. > Therefore you can use the filter driver. If I am not wrong, you do not > need to (and probably you can not) set configuration since the > HID driver has already done that and claim the interface. I am not > 100% sure here though. You can try this. > > Google found this and maybe you can give it a try. > http://www.bricklife.com/library/sixaxis-init.c > > > Regards, > Xiaofan > > > > > Regards, > Xiaofan > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Libusb-win32-devel mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel > |
|
From: Xiaofan C. <xia...@gm...> - 2007-08-14 23:59:57
|
On 8/15/07, Carl Kenner <car...@gm...> wrote: > OK, I tried it without setting the configuration or claiming the > interface, and it didn't work on my Vista computer with the Device > Driver. I then tried it without claiming the interface, but still > setting the configuration and it worked. Kind of strange. Which version of libusb are you using? Still I have no Vista... > The problem is that setting the configuration is the call that crashed > it on the filter driver on XP. > > So is there some way of knowing beforehand whether a call to > SetConfiguration is going to freeze my program and force the user to > reboot, or not? I am not so sure here. But the HID driver can be the issue. That is why I asked Stephan to add the native Windows HID backend to libusb-win32. When I first started with libusb-win32 with PICkit 2, the same BSOD happened. It turned out that I could not use the libusb-win32 filter driver since it is an HID device but has a second configuration. Xiaofan |
|
From: Carl K. <car...@gm...> - 2007-08-15 05:40:30
|
I'm using the latest version you can download.
I reckon I'm going to try this:
Open the device
try reading the feature report
if that fails then
call usb_setconfiguration
try reading the feature report again
end if
every frame try reading the input report using usb control messages
close the device
But on this vista computer, reading the feature report without setting
the configuration always fails. Hopefully with the filter driver,
reading the feature report will work the first time, so it will never
call usb_setconfiguration and thus never lock up the computer forcing
them to reboot. But I haven't tested that yet.
On 15/08/07, Xiaofan Chen <xia...@gm...> wrote:
> On 8/15/07, Carl Kenner <car...@gm...> wrote:
> > OK, I tried it without setting the configuration or claiming the
> > interface, and it didn't work on my Vista computer with the Device
> > Driver. I then tried it without claiming the interface, but still
> > setting the configuration and it worked.
>
> Kind of strange. Which version of libusb are you using?
> Still I have no Vista...
>
> > The problem is that setting the configuration is the call that crashed
> > it on the filter driver on XP.
> >
> > So is there some way of knowing beforehand whether a call to
> > SetConfiguration is going to freeze my program and force the user to
> > reboot, or not?
>
> I am not so sure here. But the HID driver can be the issue. That
> is why I asked Stephan to add the native Windows HID backend
> to libusb-win32.
>
> When I first started with libusb-win32 with PICkit 2, the same BSOD
> happened. It turned out that I could not use the libusb-win32 filter
> driver since it is an HID device but has a second configuration.
>
> Xiaofan
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Libusb-win32-devel mailing list
> Lib...@li...
> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
>
|
|
From: Carl K. <car...@gm...> - 2007-08-16 12:57:46
|
My program suddenly stopped working. Can anyone tell me what error number 116 is? (My program isn't written in C) On 15/08/07, Carl Kenner <car...@gm...> wrote: > I'm using the latest version you can download. > > I reckon I'm going to try this: > Open the device > try reading the feature report > if that fails then > call usb_setconfiguration > try reading the feature report again > end if > > every frame try reading the input report using usb control messages > > close the device > > But on this vista computer, reading the feature report without setting > the configuration always fails. Hopefully with the filter driver, > reading the feature report will work the first time, so it will never > call usb_setconfiguration and thus never lock up the computer forcing > them to reboot. But I haven't tested that yet. > > On 15/08/07, Xiaofan Chen <xia...@gm...> wrote: > > On 8/15/07, Carl Kenner <car...@gm...> wrote: > > > OK, I tried it without setting the configuration or claiming the > > > interface, and it didn't work on my Vista computer with the Device > > > Driver. I then tried it without claiming the interface, but still > > > setting the configuration and it worked. > > > > Kind of strange. Which version of libusb are you using? > > Still I have no Vista... > > > > > The problem is that setting the configuration is the call that crashed > > > it on the filter driver on XP. > > > > > > So is there some way of knowing beforehand whether a call to > > > SetConfiguration is going to freeze my program and force the user to > > > reboot, or not? > > > > I am not so sure here. But the HID driver can be the issue. That > > is why I asked Stephan to add the native Windows HID backend > > to libusb-win32. > > > > When I first started with libusb-win32 with PICkit 2, the same BSOD > > happened. It turned out that I could not use the libusb-win32 filter > > driver since it is an HID device but has a second configuration. > > > > Xiaofan > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX and a browser. > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > _______________________________________________ > > Libusb-win32-devel mailing list > > Lib...@li... > > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel > > > |
|
From: Stephan M. <Ste...@ia...> - 2007-08-16 13:27:11
|
> My program suddenly stopped working. > Can anyone tell me what error number 116 is? > (My program isn't written in C) #define ETIMEDOUT 116 > > On 15/08/07, Carl Kenner <car...@gm...> wrote: > > I'm using the latest version you can download. > > > > I reckon I'm going to try this: > > Open the device > > try reading the feature report > > if that fails then > > call usb_setconfiguration > > try reading the feature report again > > end if > > > > every frame try reading the input report using usb control messages > > > > close the device > > > > But on this vista computer, reading the feature report without setting > > the configuration always fails. Hopefully with the filter driver, > > reading the feature report will work the first time, so it will never > > call usb_setconfiguration and thus never lock up the computer forcing > > them to reboot. But I haven't tested that yet. > > > > On 15/08/07, Xiaofan Chen <xia...@gm...> wrote: > > > On 8/15/07, Carl Kenner <car...@gm...> wrote: > > > > OK, I tried it without setting the configuration or claiming the > > > > interface, and it didn't work on my Vista computer with the Device > > > > Driver. I then tried it without claiming the interface, but still > > > > setting the configuration and it worked. > > > > > > Kind of strange. Which version of libusb are you using? > > > Still I have no Vista... > > > > > > > The problem is that setting the configuration is the call that crashed > > > > it on the filter driver on XP. > > > > > > > > So is there some way of knowing beforehand whether a call to > > > > SetConfiguration is going to freeze my program and force the user to > > > > reboot, or not? > > > > > > I am not so sure here. But the HID driver can be the issue. That > > > is why I asked Stephan to add the native Windows HID backend > > > to libusb-win32. > > > > > > When I first started with libusb-win32 with PICkit 2, the same BSOD > > > happened. It turned out that I could not use the libusb-win32 filter > > > driver since it is an HID device but has a second configuration. > > > > > > Xiaofan > > > > > > ------------------------------------------------------------------------- > > > This SF.net email is sponsored by: Splunk Inc. > > > Still grepping through log files to find problems? Stop. > > > Now Search log events and configuration files using AJAX and a browser. > > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > > _______________________________________________ > > > Libusb-win32-devel mailing list > > > Lib...@li... > > > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel > > > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Libusb-win32-devel mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel |