Ports
May 20, 2013, 01:22:01 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: SMF - Just Installed!
 
   Home   Help Search Login Register  
Welcome to the PORTS Forum. Please post your questions, answers, and comments relating to USB and other hardware interfaces in the appropriate forums below. - Jan
Pages: [1]
  Print  
Author Topic: Wrong bmRequestType sent by HidD_SetOutputReport?  (Read 793 times)
mihooper
Member
***
Posts: 19


« on: March 17, 2012, 11:13:34 am »

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....Smiley?

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
Logged

Thx,
MikeH
Pat Crowe
Member
***
Posts: 39


« Reply #1 on: March 17, 2012, 11:41:42 am »

Look at para 7.2.2 in the HID spec. A HID specific request could hardly be other than a class request.
Logged
mihooper
Member
***
Posts: 19


« Reply #2 on: March 17, 2012, 12: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
Logged

Thx,
MikeH
Pat Crowe
Member
***
Posts: 39


« Reply #3 on: March 17, 2012, 01:11:38 pm »

http://www.usb.org/developers/docs/hidpage/

click on 'Device Class Definition for HID 1.11'
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!