linux-automation / meta-lxatac

Build your own LXA TAC images and bundles
MIT License
5 stars 15 forks source link

meta-lxatac-software: Add hid-gadget-test to send HID events via USB #23

Closed hnez closed 1 year ago

hnez commented 1 year ago

While writing documentation for the various tac-gadget-* helper scripts for the USB Gadget port I noticed that tac-gadget-hid is not really usable due to a missing userspace companion program.

There is an example program in the Linux Documentation of the HID gadget: hid_gadget_test. The repo used in the recipe breaks out that example into its own little project, adds a Makefile, LICENSE, etc.. I am however not to sure about both of them, as the Makefile needs patches for cross compilation and the LICENSE is GPL-3.0 even though the example comes from the Linux Kernel.

I've tested the tool and was able to type things into my laptop with the TAC, which is cool I guess.

hnez commented 1 year ago

Here is how hid-gadget-test looks in action:

root@lxatac-00002:~ tac-gadget-hid
root@lxatac-00002:~ hid_gadget_test /dev/hidg0 keyboard
…
e
c
h
o
--spacebar
h
i
--return

Not the greatest user experience but at least something until we come up with something else.

jluebbe commented 1 year ago

The license of this repo doesn't match the original source of the code (the Linux kernel under GPLv2), so we can't really use this as-is.