PORTS Forum
Ports and Interfaces => USB => Topic started by: gi on March 25, 2013, 10:06:32 pm
-
Hi Jan,
I would like to ask what is wrong with my report descriptor here, I want to combine usages with the same global items.
0x06, 00, ff, /* Usage Page */
0x09, 0x10, /* Usage */
0xa1, 0x02, /* Collection (Logical) */
0x85, Dev_FEAT_REPORT_ID, /* REPORT ID ()*/
0x15, 0, /* LOGICAL_MINIMUM ()*/
0x25, 3, /* LOGICAL_MAXIMUM () */
0x75, 2, /* REPORT_SIZE() */
0x95, 1, /* REPORT_COUNT() */
0x09, PERIPH_1, /* USAGE */
0x09, PERIPH_2, /* USAGE */
0xB1, 2, /* FEATURE(Data,Var,Abs) */
0x25, 1, /* LOGICAL_MAXIMUM () */
0x75, 1, /* REPORT_SIZE() */
0x09, DEV_PERIPH_FLAG, /* USAGE */
0xB1, 2, /* FEATURE(Data,Var,Abs) */
0x25, 7 /* LOGICAL_MAXIMUM () */
0x75, 3, /* REPORT_SIZE() */
0x09, PERIPH_3,/* USAGE */
0xB1, 2, /* FEATURE(Data,Var,Abs) */
0x95, 3, /* REPORT_COUNT() */
0x09, PERIPH_4, /* USAGE */
0x09, PERIPH_5, /* USAGE */
0xB1, 2, /* FEATURE(Data,Var,Abs) */
0x75, 2, /* REPORT_SIZE() 2-bits of PADDING */
0xB1, 1, /* FEATURE(CONSTANT) */
0x09, PERIPH_6, /* USAGE */
0x09, PERIPH_7, /* USAGE */
0xB1, 2, /* FEATURE(Data,Var,Abs) */
0x75, 2, /* REPORT_SIZE() 2-bits of PADDING */
0xB1, 1, /* FEATURE(CONSTANT) */
0x09, PERIPH_8, /* USAGE */
0x09, PERIPH_9, /* USAGE */
0xB1, 2, /* FEATURE(Data,Var,Abs) */
0x75, 2, /* REPORT_SIZE() 2-bits of PADDING */
0xB1, 1, /* FEATURE(CONSTANT) */
0xC0 /* End Collection */
-
What happens when you try to use it? Does the device enumerate successfully? Can you send or receive any reports?
-
Hi Jan,
Thanks for the very quick reply.
When I try to use it (plug it in my PC) the HID-device entry in busdog did not appear. But when I try to remove this descriptor it display in busdog sniffer.
Here is what I want to achieve.
(http://i1283.photobucket.com/albums/a547/Glimpse_Ops/repordDescriptorMapping_zpsf153cc3e.png)
thanks and hope you can help me on this.
-
One way to debug a report descriptor is to simplify it. Start with a known good descriptor and edit it/add to it gradually.
After changing descriptors, Windows might remember previous descriptors unless you change the Product ID or delete the device in the registry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\usbflags\<VVVVPPPPRRRR>
VVVV is the vendor id
PPPP is the product id
RRRR is the revision number.