Apps // PROJECT NOTES

RASPBERRY PI / USB HID

Pi Zero HID Bridge

A small bridge for controlling a computer without a local keyboard or mouse. Wi-Fi carries the control connection; the Pi Zero 2 W appears to the target as a USB keyboard and mouse.

Focus
Headless computer control
Tools
Python · Linux · USB gadget
Result
Web-controlled HID input

Give the host familiar input

The target sees standard USB HID keyboard and mouse devices. A Python service on the Pi translates selected Linux input events into USB gadget reports. The web interface also provides a virtual keyboard and mouse for direct control and output testing.

Wi-Fi control reaches the Pi; its USB/OTG port sends keyboard and mouse input to the target. Project illustration.
Wi-Fi control reaches the Pi; its USB/OTG port sends keyboard and mouse input to the target. Project illustration. Project source.

Choose what to forward

The interface lists detected devices and their input channels, hides internal USB hubs, and lets the user select keyboard or mouse channels. Input can also come from devices made available to the Pi over the network by VirtualHere. This connects naturally with the central USB assignment project.

Earlier German-language web interface with virtual keyboard, mouse controls and device selection. The current UI is in English.
Earlier German-language web interface with virtual keyboard, mouse controls and device selection. The current UI is in English. Project source.

Make headless setup practical

A boot-partition Wi-Fi updater allows network settings to be supplied through the SD card. The project also includes installation, service management and diagnostics for the USB controller, gadget state and connection to the host.

Scope and hardware limits

This is a keyboard-and-mouse bridge, not transparent forwarding of arbitrary USB devices or a video capture system. The Pi’s single USB/OTG port cannot be a USB host and a USB peripheral at the same time. The target must enumerate the HID gadget through a working data cable before input can reach it.