usbip-server

Keyboard

A HID boot keyboard. Linux binds its usbhid driver to it, and it types into your desktop like any keyboard: one second after the host has configured it, it types Who is typing....

   
Program out/usb_keyboard_device
Source src/usb_keyboard/
USB id fa00:0003
Interface HID (class 0x03), boot interface subclass, keyboard protocol
Endpoint 0x81 interrupt IN, 8 byte reports, polled every 8 ms

The text goes to whichever window has focus, a terminal included.

Try It

$ make
$ out/usb_keyboard_device &
$ sudo usbip attach -r localhost -b 1-1

Click into an empty editor window before the attach completes. A second later Who is typing... appears. The keyboard types once per attach; detach with sudo usbip detach -p 0 and attach again to type again.

What You See

USB Keyboard Device Activated
USBIPServer: Connected
USBIPProtocol: USBIP_CMD_REQ_DEV_IMPORT '1-1'
Configuration Active

Configuration Active is printed when the host sends SET_CONFIGURATION, the moment the keyboard is ready to be used.

How It Works

Prototyping

Start here for keyboards, keypads, barcode scanners, foot pedals, or anything else that sends key presses. The boot protocol report (modifier byte, reserved byte, six key codes) works on every host, the BIOS included.

Troubleshooting