none
Correct type of usb command ? RRS feed

  • Question

  • Hi USB experts:

    I have a customer who store their own customize info in their controller and can be retrieved using usb command in format like this: host to device: byte1, byte2, byte3, byte4. I have a few things hope you can help me to understand:

    1. In my WDF kernel driver which type of the USB operation should I use: USB standard command? Vendor command or Class command ?

    2.  I guess I will have to use WDF API WDF_USB_CONTROL_SETUP_PACKET_INIT (_VENDOR/_CLASS). What value should I use for "Value" and "Index" ?

    3.  Can a user mode application send/receive such USB command without using the WinUsb lib (like those HidP_ or HidD_ APIs) ?

    If possible please offer your help with some details (not a single line answer). 

    Thanks in advance.

    Polaris


    leo

    Sunday, August 17, 2014 8:02 PM

Answers

  • 1) it would be a vendor command

    2) The value and Index are private to the device. no one here can tell you.

    3) no, HID APIs do not give you this level of control of the io to and from the device

    do you have control of the device firmware? if so, define value and index on your own and you are done. If you don't have control of the fw, you need to find out from the customer what values to use.


    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Sunday, August 17, 2014 9:54 PM