Re: usb_control_msg works in linux but not windows
Travis <[email protected]>
| Newsgroups | gmane.comp.lib.libusb.devel.windows |
|---|---|
| Message-ID | <[email protected]> |
Greetings, You are trying to use a "standard" usb request for what should be a vendor request type. IE: the 0x01 in the 2nd param. For the 2nd param (request type) you need to use something like the following to perform an action like that: requesttype = USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_ENDPOINT_IN or requesttype = USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_ENDPOINT_OUT if you specify USB_ENDPOINT_IN then you are saying you want the "bytes" portion to be returned from the device (DEVICE TO HOST) if you specify USB_ENDPOINT_OUT then you are saying you want the "bytes" portion to be sent to the device (HOST TO DEVICE) Regards, Travis On 2/19/2014 4:23 PM, Rob Willard wrote: > Good day... > > We are writing some proof of concept software to ensure a new USB device > will be usable in both Linux and Windows. > > The following line turns on an LED. > > int t2 = usb_control_msg(handle, 0x01, 10, on , 0, 0, 0, 10); > > and works just fine in Linux, however produces the following error in > Windows: > > libusb0-dll:err [control_msg] sending control message failed, win > error: The parameter is incorrect. > > I am very new to USB, and have not been able to find any kind of > reference as to why it would work on one side, but not the other... Any > help would be most appreciated. > > Rob > > > > > ------------------------------------------------------------------------------ > Managing the Performance of Cloud-Based Applications > Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. > Read the Whitepaper. > http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk > _______________________________________________ > Libusb-win32-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel > ------------------------------------------------------------------------------ Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk