On 02/03/2012 01:01 AM, Werner Almesberger wrote:
You're issuing a GET_REPORT. But what you want is a GET_DESCRIPTOR
(for the report descriptor).

from www.usb.org/developers/devclass_docs/HID1_11.pdf 7.1.
It shall not return the String descriptor, HID Report descriptor or
any of the optional HID class descriptors.

I think I will rename GET_REPORT to GET_HID_REPORT_DESCRIPTOR is more clear.


Not sure if there are any problems in the GET_REPORT (besides not
being what you want). It looked right at a quick glance.

one question on the GET_REPORT.
     before get the HID report descriptor. how do I know the REPORT ID
     since issue the GET_REPORT needs a Report ID as parameter.

This is only an issue with GET_REPORT :-)

A lot of ifs. Maybe time to convert this to "case".

yes. will do that

That's a lot of RAM ! Do we even have that much available in navre ?

I take this size from libhid. I think 512 is enough for most of device.
so far the biggest report_desc size I met is 274.
  
http://downloads.qi-hardware.com/people/xiangfu/m1/keyboard/lsusb.Microsoft.mouse.txt


By the way, something lovely from
linux/drivers/hid/usbhid/hid-core.c:usbhid_start

         /* Some keyboards don't work until their LEDs have been set.
          * Since BIOSes do set the LEDs, it must be safe for any device
          * that supports the keyboard boot protocol.
          * In addition, enable remote wakeup by default for all keyboard
          * devices supporting the boot protocol.
          */

So we may still need that SET_REPORT ...

thanks for advice.
xiangfu
_______________________________________________
http://lists.milkymist.org/listinfo.cgi/devel-milkymist.org
IRC: #milkymist@Freenode

Reply via email to