Author Topic: Wrong bmRequestType sent by HidD_SetOutputReport?  (Read 14960 times)

mihooper

  • Member
  • ***
  • Posts: 24
Wrong bmRequestType sent by HidD_SetOutputReport?
« on: March 17, 2012, 12:13:34 pm »
Jan,

While using the GenericHID C# application to exchange input and output reports with my device using control transfers,  I noticed that the bmRequestType is set to 0x21 (class request of the interface) by the dll call to HidD_SetOutputReport(hidHandle, outputReportBuffer, outputReportBuffer.Length + 1) in the function SendOutputReportViaControlTransfer(SafeFileHandle hidHandle, Byte[] outputReportBuffer). Isn't this supposed to be standard request instead of a class request? What would cause the HidD_SetOutputReport to send a class request (it is confusing my firmware....:)?

Here's a capture of the request.
Quote
Set Report
Allows the host to send a report to the device.
Offset Field Size Value Description
0 bmRequestType 1 21h  
 4..0: Recipient  ...00001  Interface
 6..5: Type  .01.....  Class
 7: Direction  0.......  Host-to-Device
1 bRequest 1 09h Set Report
2 wValue.LowByte 1 00h Report ID
3 wValue.HiByte 1 02h Output Report
4 wIndex 2 0000h Interface
6 wLength 2 0002h Report Length

Thx,

MikeH


[attachment deleted by admin]
Thx,
MikeH

Pat Crowe

  • Member
  • ***
  • Posts: 39
Re: Wrong bmRequestType sent by HidD_SetOutputReport?
« Reply #1 on: March 17, 2012, 12:41:42 pm »
Look at para 7.2.2 in the HID spec. A HID specific request could hardly be other than a class request.

mihooper

  • Member
  • ***
  • Posts: 24
Re: Wrong bmRequestType sent by HidD_SetOutputReport?
« Reply #2 on: March 17, 2012, 01:25:19 pm »
Pat,

Sorry for being new at this but, what is the "HID spec"? The USB2.0 spec, para 7.2. deals with a voltage drop budget on the physical connections to the device. I did not find a "HID spec" in the downloaded zip file from usb.org.

Mike
Thx,
MikeH

Pat Crowe

  • Member
  • ***
  • Posts: 39
Re: Wrong bmRequestType sent by HidD_SetOutputReport?
« Reply #3 on: March 17, 2012, 02:11:38 pm »
http://www.usb.org/developers/docs/hidpage/

click on 'Device Class Definition for HID 1.11'