Re: test program to check usb hid devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If I understood correctly, you just want to dump the hid output.

You can just cat /sys/kernel/debug/hid/*/events if debugfs is mounted.

Or you may want to have a look at these 2 projects:
hid-recorder -> http://bentiss.github.io/hid-replay-docs/
usbhid-dump-> https://github.com/DIGImend/usbhid-dump (part of the
DIGImend project)

Cheers,
Benjamin

On Fri, Aug 15, 2014 at 10:31 AM, loody <miloody@xxxxxxxxx> wrote:
> hi David:
>
> 2014-08-15 20:54 GMT+08:00 David Laight <David.Laight@xxxxxxxxxx>:
>> From: loody
>>> Is there any test program we can use to capture input data send from
>>> usb keyboard/mouse?
>>
>> google usbmon
> Sorry for making you confused.
> What I need is not monitor usb bus data.
> What I need is some user mode program, and when I execute it, it will
> driver usb HID keyboard/mouse to work.
> And I can print out the hex value those device send once user press
> any key on keyboard or moving mouse around.
>
> It should be like I think
> hid_device=hid_open(xxx);
> while(1){
>       data = get input data(hid_device);
>       printf("0x%x\n",data);
> }
>
> Appreciate your kind help,
> --
> To unsubscribe from this list: send the line "unsubscribe linux-input" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux