Hello,

I'm an embbedded software developer, trying to implement an USB HID
keyboard.

I've found many HID samples for various microcontrollers, and I'm OK with
the basis : I can have my device enumerate properly, claimed by hidclass.sys
driver, and available to user-land application.

This is almost perfect, but my goal is to make a "standard" keypad to be
used as input device in any application, and not a vendor-specific device.
Now my problem is, as soon as I claim being to USB HID keypad (and of course
provide the appropriate descriptor, as found on the specification and in a
few samples), Windows stops my device and marks it as invalid (with error
code 10). Note that when I remove the "keyboard" part of the descriptor to
keep only the "LED" part (CAPS LOCK, NUM LOCK, SCROLL LOCK), the device is
marked OK, and any change in main keyboard status is correctly forwarded to
my board.

So, my question is, how can I find what's wrong in my keyboard descriptor ?
Is it possible to have hidclass.sys providing detailed report on what's
going wrong, or is there a analysis software that may help ?

Regards,

--
johann.d

Re: Debugging USB device by Robert

Robert
Fri Apr 20 08:41:02 CDT 2007

johann.d schrieb:

> This is almost perfect, but my goal is to make a "standard" keypad to be
> used as input device in any application, and not a vendor-specific device.
> Now my problem is, as soon as I claim being to USB HID keypad (and of course
> provide the appropriate descriptor, as found on the specification and in a
> few samples), Windows stops my device and marks it as invalid (with error
> code 10). Note that when I remove the "keyboard" part of the descriptor to
> keep only the "LED" part (CAPS LOCK, NUM LOCK, SCROLL LOCK), the device is
> marked OK, and any change in main keyboard status is correctly forwarded to
> my board.

Delete the device in Device Manager while plugged before changing the
descriptor. This makes Windows forget the driver binding. The next plug
will be again a first plug.
Best post your HID descriptor to the USB IF forum
http://www.usb.org/phpbb/viewforum.php?f=1
Many decriptors have been dissected there already :-)