Re: usb_control_msg works in linux but not windows
Xiaofan Chen <[email protected]>
| Newsgroups | gmane.comp.lib.libusb.devel.windows |
|---|---|
| Message-ID | <CAGjSPUCghJbfdi8f1rKKrwNPabMiURtMRfOwpwkSv8LBDFYURQ@mail.gmail.com> |
On Thu, Feb 20, 2014 at 9:39 AM, Travis <[email protected]> wrote: > 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) > Good analysis. To the OP, if you are new to USB, you may want to go through the following short introduction to USB. http://www.usbmadesimple.co.uk/index.html In particular, the following section talks about some of the terminology used in the above. http://www.usbmadesimple.co.uk/ums_4.htm A bit more in detail http://msdn.microsoft.com/en-us/library/windows/hardware/ff539261(v=vs.85).aspx If you want to read more,then the USB 2.0 spec is the best. -- Xiaofan ------------------------------------------------------------------------------ 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