none
WinUSB: WinUsb_ControlTransfer - index filed in the setup packet is ignored or masked ???

    Question

  • I am using WinUSB to communicate with my device only through control endpoint.  When I use WinUsb_ControlTransfer to send setup packet ( WINUSB_SETUP_PACKET Wsp = { 0x41, 0x60, 0x6, 0xFC, 0x4} ;  ), it seems the index filed is masked when it gets transfered. On the wire i see the index field is set to zero !!!  I tried installing the driver to the entire composite device too. still the behavior is same. Does anyone know how to use the index field with WinUsb_ControlTransfer function call?

    TIA,

    rk

     

    Wednesday, September 28, 2011 9:49 PM

Answers

  • rk77 wrote:
    >
    >I am using WinUSB to communicate with my device only through control
    >endpoint.  When I use WinUsb_ControlTransfer to send setup packet
    >( WINUSB_SETUP_PACKET Wsp = { 0x41, 0x60, 0x6, 0xFC, 0x4} ;  ),
    >it seems the index filed is masked when it gets transfered.
    >On the wire i see the index field is set to zero !!!
     
    0x41 is a vendor request, output, aimed at an interface.  When the target
    is an interface, the wIndex field must contain the target interface number.
    0xFC is probably not a valid interface number.
     
    If you want to use all three fields for arbitrary purposes, send your
    request to the device (0x40) or to "other" (0x43).
    --
    Tim Roberts, timr@probo.com
    Providenza & Boekelheide, Inc.
     

    Tim Roberts, DDK MVP Providenza & Boekelheide, Inc.
    Friday, September 30, 2011 6:00 AM