[libhid-discuss] how to select Report ID?

Christopher Boger cboger at rosenaviation.com
Fri Mar 12 16:17:55 UTC 2010


Thanks Charles. I was able to run that script successfully (very
useful). It describes things as I had expected. I have several reports,
each one referring the same Usage. They only differ in the length of the
report ("Report Count"). So, I have been toying around with the code and
instead of using the path to send reports, have sent my Report ID as the
first byte in the report. I'm now seeing signs of life from my device.
Seems like the path, if it is to be used to determine the Report ID,
won't work for a device like mine with several reports associated with
the same Usage. Am I right?

Here's an excerpt of the descriptor dump:

[0x0000] 0x06 0x00 0xff (value: 0xff00 / 65280)
  bSize = 2 byte(s)
  bType = 0x01 (Global)
  bTag  = 0x00 (Usage page)

[0x0003] 0x09 0x01 (value: 0x1 / 1)
  bSize = 1 byte(s)
  bType = 0x02 (Local)
  bTag  = 0x00 (Usage)

[0x0005] 0xa1 0x01 (value: 0x1 / 1)
  bSize = 1 byte(s)
  bType = 0x00 (Main)
  bTag  = 0x0a (Collection) (Application)

[0x0007] 0x75 0x08 (value: 0x8 / 8)
  bSize = 1 byte(s)
  bType = 0x01 (Global)
  bTag  = 0x07 (Report Size)

[0x0009] 0x26 0x80 0x00 (value: 0x80 / 128)
  bSize = 2 byte(s)
  bType = 0x01 (Global)
  bTag  = 0x02 (Logical Maximum)

[0x000c] 0x15 0x00 (value: 0x0 / 0)
  bSize = 1 byte(s)
  bType = 0x01 (Global)
  bTag  = 0x01 (Logical Minimum)

[0x000e] 0x09 0x01 (value: 0x1 / 1)
  bSize = 1 byte(s)
  bType = 0x02 (Local)
  bTag  = 0x00 (Usage)

[0x0010] 0x85 0x01 (value: 0x1 / 1)
  bSize = 1 byte(s)
  bType = 0x01 (Global)
  bTag  = 0x08 (Report ID)

[0x0012] 0x95 0x05 (value: 0x5 / 5)
  bSize = 1 byte(s)
  bType = 0x01 (Global)
  bTag  = 0x09 (Report Count)

[0x0014] 0x82 0x02 0x01 (value: 0x102 / 258)
  bSize = 2 byte(s)
  bType = 0x00 (Main)
  bTag  = 0x08 (Input)

[0x0017] 0x09 0x01 (value: 0x1 / 1)
  bSize = 1 byte(s)
  bType = 0x02 (Local)
  bTag  = 0x00 (Usage)

[0x0019] 0x85 0x02 (value: 0x2 / 2)
  bSize = 1 byte(s)
  bType = 0x01 (Global)
  bTag  = 0x08 (Report ID)

[0x001b] 0x95 0x09 (value: 0x9 / 9)
  bSize = 1 byte(s)
  bType = 0x01 (Global)
  bTag  = 0x09 (Report Count)

[0x001d] 0x82 0x02 0x01 (value: 0x102 / 258)
  bSize = 2 byte(s)
  bType = 0x00 (Main)
  bTag  = 0x08 (Input)

[0x0020] 0x09 0x01 (value: 0x1 / 1)
  bSize = 1 byte(s)
  bType = 0x02 (Local)
  bTag  = 0x00 (Usage)

[0x0022] 0x85 0x03 (value: 0x3 / 3)
  bSize = 1 byte(s)
  bType = 0x01 (Global)
  bTag  = 0x08 (Report ID)

[0x0024] 0x95 0x0d (value: 0xd / 13)
  bSize = 1 byte(s)
  bType = 0x01 (Global)
  bTag  = 0x09 (Report Count)

[0x0026] 0x82 0x02 0x01 (value: 0x102 / 258)
  bSize = 2 byte(s)
  bType = 0x00 (Main)
  bTag  = 0x08 (Input)

[0x0029] 0x09 0x01 (value: 0x1 / 1)
  bSize = 1 byte(s)
  bType = 0x02 (Local)
  bTag  = 0x00 (Usage)

[0x002b] 0x85 0x04 (value: 0x4 / 4)
  bSize = 1 byte(s)
  bType = 0x01 (Global)
  bTag  = 0x08 (Report ID)

[0x002d] 0x95 0x11 (value: 0x11 / 17)
  bSize = 1 byte(s)
  bType = 0x01 (Global)
  bTag  = 0x09 (Report Count)

[0x002f] 0x82 0x02 0x01 (value: 0x102 / 258)
  bSize = 2 byte(s)
  bType = 0x00 (Main)
  bTag  = 0x08 (Input)

[0x0032] 0x09 0x01 (value: 0x1 / 1)
  bSize = 1 byte(s)
  bType = 0x02 (Local)
  bTag  = 0x00 (Usage)

[0x0034] 0x85 0x05 (value: 0x5 / 5)
  bSize = 1 byte(s)
  bType = 0x01 (Global)
  bTag  = 0x08 (Report ID)

[0x0036] 0x95 0x19 (value: 0x19 / 25)
  bSize = 1 byte(s)
  bType = 0x01 (Global)
  bTag  = 0x09 (Report Count)

[0x0038] 0x82 0x02 0x01 (value: 0x102 / 258)
  bSize = 2 byte(s)
  bType = 0x00 (Main)
  bTag  = 0x08 (Input)

...



More information about the libhid-discuss mailing list