PDA

View Full Version : Does anyone understand descriptors ?



Bonxy
- 17th March 2010, 13:23
Hi all

Please help with this if you know how (i'm at hair pulling stage).

I am making a HID keyboard interface using 18f4550 & files from PBP usb18 dir and modified the mousedem descriptor as HID keyboard.

all I want to do is modify the descriptor so that i can send 32 keys insted of 6
The standasd keyboard sends 8 bytes, i need to send 32 bytes

but i just cannot set the descriptor to do this no mater how much i read up on it (read a LOT).


What do i need to change ?,

DeviceDescriptor ?
Configuration Descriptor ?
ReportDescriptor ?
do i need more endpoints or something ?

Please post an example if you have one

Thanks

rsocor01
- 18th March 2010, 02:35
Bonxy,

Writing descriptors is a pain in the neck. How do I do it? I do the same that you are doing. I modify other descriptors like the one in the MOUSE DEMO.

Look at the link below. At the end of the document, they have sample HID descriptors for a mouse, a keyboard, and a joystick.

I have never done one descriptor for a keyboard, but I did the one for a joystick and with some more research in Google I did one for a touchscreen.

With the help of the document in the link below, you should be able to do it. :) Just look at the field values and change the descriptor fields accordingly.

http://www.usb.org/developers/devclass_docs/HID1_11.pdf

Robert