[libhid-discuss] Multiple duplicate interfaces?

Frank Rizzo thefrankrizzo at hotmail.com
Sun Oct 3 01:52:32 UTC 2010


> You might want to look at hid_interrupt_read(), which gives you the  raw 
> packet sent back over the interrupt pipe: 
> http://libhid.alioth.debian.org/doc/hid__exchange_8c.html#41152a3e3d6c52a2aa3d7353463dc45b
>
> Another option, which might make things easier in the end, is to use 
> usbsnoop to record the transactions for a given scan, and use the 
> usbsnoop2libusb script to see what's going on. I only know the 
> theoretical side of USB keyboards, so I haven't had to work through  all 
> of the implementation details of whether the device is sending  keystrokes 
> over the interrupt pipe, or if you need to fetch them via  control 
> transfers (less likely).


JACKPOT!  I'm using hid_interrupt_read on ep 0x81, and getting the key data 
1 key at a time, in scan codes.  (Which is FINE with me!  I'm an old DOS 
programmer, I'm used to scan codes).

I used usbsnoop to capture a couple of transactions, and have a complete 
list of the scan codes for the numbers, and the <CR>.  I should now have no 
problem whipping up a quick app that does exactly what I need.

Charles, thanks for you help!

Frank 




More information about the libhid-discuss mailing list