Hi I forward this email to milkymist mailing list. this is really helpful when I look into the softusb-input.
thanks Werner. -------- Original Message -------- Subject: trivia: dumping USB HID report descriptors Date: Sat, 12 Nov 2011 23:18:30 -0300 From: Werner Almesberger The USB HID protocol has a descriptor that defines the layout of the reports the HID device sends. If you're ever in a situation where you need this sort of information, here's how you can decode it: Download: get usbhid-dump-1.2.tar.gz from http://sourceforge.net/projects/digimend/files/usbhid-dump/ get hidrd-0.2.tar.gz from http://sourceforge.net/projects/digimend/files/hidrd/0.2/ Build and install: tar xfz usbhid-dump-1.2.tar.gz cd usbhid-dump-1.2 ./configure make make install cd .. tar xfz hidrd-0.2.tar.gz cd hidrd-0.2 ./configure make make install ldconfig Find the VID:PID of your device with lsusb or whatever you prefer. usbhid-dump -d VID:PID | grep -v : | tr -d ' \n' | xxd -r -p | hidrd-convert -o spec And all the pesky little details will be revealed before your very eyes. If you forget to specify the VID:HID, it seems that this will grab your USB keyboard, etc. Just waiting for one minute supposedly returns it to you. I didn't test this :-) Further reading: http://kerneltrap.org/mailarchive/linux-usb/2010/2/27/6258315 http://digimend.sourceforge.net/ - Werner _______________________________________________ http://lists.milkymist.org/listinfo.cgi/devel-milkymist.org IRC: #milkymist@Freenode
