Author Topic: USBCV HID Descriptor error  (Read 45507 times)

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: USBCV HID Descriptor error
« Reply #15 on: March 13, 2012, 10:54:57 am »
(I see that DTImporter is posted earlier in this thread.) Offhand I don't know for sure, but perhaps it wants each item in a separate line? If so, you would need to decode the values in the descriptor and reformat it. For example, line 1 would be

0x05 0x01  (Usage page Generic Desktop)

Jan
« Last Edit: March 13, 2012, 11:21:16 am by Jan Axelson »

jdunne

  • Member
  • ***
  • Posts: 26
Re: USBCV HID Descriptor error
« Reply #16 on: March 13, 2012, 02:38:52 pm »
Jan, you are correct, but I think MikeH already noticed that and was looking for help decoding his report descriptors into a format like that.  The simplest way I can think of to do that is to use a USB bus analyzer (I use CATC USB Chief) which will decode the report descriptor for you. 

If you don't have a USB bus analyzer, the other way is to get the HID specification and manually decode the data.  Your descriptor isn't that long, so it should only take a couple hours or so to decode at worst case. 

There might be a software tool which will do the job, but I've never heard of it.  I did quite a bit of searching too a while back.

Good Luck.

Joe

mihooper

  • Member
  • ***
  • Posts: 24
Re: USBCV HID Descriptor error
« Reply #17 on: March 13, 2012, 03:12:45 pm »
Joe,
You are correct. I was just looking for help decoding this mess....:) I agree that a bus analyzer is the best/easiest way. I think I'm going to spring for one of the ~$200 software analyzers. Thanks for your help and your importer.

MikeH
Thx,
MikeH

mihooper

  • Member
  • ***
  • Posts: 24
Re: USBCV HID Descriptor error
« Reply #18 on: March 14, 2012, 01:39:29 pm »
Just for completeness, here's the results of the decoded, poorly formatted HID reports descriptor (using USBlyzer):
Code: [Select]
Interface 0 HID Report Descriptor Mouse
Item Tag (Value) Raw Data
Usage Page (Generic Desktop) 05 01 
Usage (Mouse) 09 02 
Collection (Application) A1 01 
    Usage (Pointer) 09 01 
    Collection (Physical) A1 00 
        Usage Page (Button) 05 09 
        Usage Minimum (Button 1) 19 01 
        Usage Maximum (Button 3) 29 03 
        Logical Minimum (0) 15 00 
        Logical Maximum (1) 25 01 
        Report Count (3) 95 03 
        Report Size (1) 75 01 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
        Report Count (1) 95 01 
        Report Size (5) 75 05 
        Input (Cnst,Ary,Abs) 81 01 
        Usage Page (Generic Desktop) 05 01 
        Usage (X) 09 30 
        Usage (Y) 09 31 
        Usage (Wheel) 09 38 
        Logical Minimum (-127) 15 81 
        Logical Maximum (127) 25 7F 
        Report Size (8) 75 08 
        Report Count (3) 95 03 
        Input (Data,Var,Rel,NWrp,Lin,Pref,NNul,Bit) 81 06 
    End Collection C0 
End Collection C0 
Thanks for the suggestion.
Thx,
MikeH

jdunne

  • Member
  • ***
  • Posts: 26
Re: USBCV HID Descriptor error
« Reply #19 on: March 14, 2012, 03:24:04 pm »
MikeH,

Glad you got it sorted out.  Now you can run it through DTImporter and make sure there are no errors.

Joe

jdunne

  • Member
  • ***
  • Posts: 26
Re: USBCV HID Descriptor error
« Reply #20 on: May 10, 2018, 02:56:55 pm »
It looks like my attachment of DTImporter from long ago is now gone.  I've moved the tool to github:

Summary of the tool:
The version 2.4 HID descriptor tool from usb.org tragically doesn't contain an import .c file functionality. It only supports its own proprietary .hid file format (which fortunately is fairly simple). This tool is written in VB6.

https://github.com/jdunne525/DTImporter

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: USBCV HID Descriptor error
« Reply #21 on: May 10, 2018, 10:03:16 pm »
Thanks for letting us know!