Spoofing Your TinyPilot Device ID

TinyPilot is an excellent IP KVM built by Michael Lynch for the Raspberry Pi. It emulates a keyboard and mouse as a relay with a browser-based frontend, and collects the output of the video card from the remote machine through an HDMI capture card. However, there are some reasons you might want to adjust it so that it indicates that it is a different kind/vendor of device.

In this case, I reached out to Michael who provided me the following information:

The values come from the init-usb-gadget script here:
https://github.com/tiny-pilot/ansible-role-tinypilot/blob/master/files/init-usb-gadget#L26 [author note: link adjusted]

The installer places that file at /opt/tinypilot-privileged/init-usb-gadget and a systemd service runs it at boot time.

The easiest thing to do is to just edit the strings in /opt/tinypilot-privileged/init-usb-gadget directly and then reboot. The issue is that if you ever update or reinstall, the installer will overwrite those changes with the default file contents.

Those key lines look like this:

echo 0x1d6b > idVendor # Linux Foundation echo 0x0104 > idProduct # Multifunction Composite Gadget echo 0x0100 > bcdDevice # v1.0.0 echo 0x0200 > bcdUSB # USB2
Code language: Bash (bash)

If you grab the device ID of another device (I used a Logitech wireless keyboard/trackpad combo), you can just adjust it to use those values. You can also try looking for a device to use on PCI Lookup.