Medius - Native APIHardware

Ports

Three USB ports and cabling

Inside are two ESP32-S3 microcontrollers and a CH343 USB-serial bridge. A program speaks only to the CH343 serial port; the two chips share an internal 20 Mbaud link, separate from the 6 Mbaud control link.

PortConnects toRole
USB1Game PCThe clone (device chip), copying the mouse's USB identity so the PC enumerates the same device as a direct connection.
USB2Control PCCH343 serial control (/dev/ttyACM*)
USB3MouseReal mouse (host chip)

USB3 power hazard

The one pairing to avoid

⚠️ USB1 and USB3 must never both connect to the same machine.

The USB3 5V rail can't be pulled low in firmware, so the pair back-feeds power, which can force a shutdown or drain the battery.

Disconnecting

Unplug any time

The box is USB bus-powered, with no battery or power button, and safe to unplug at any moment. Injected input never outlives the program that sent it, so a button or move can't stick.

UnpluggedEffect
USB2 (control), or the program stopsAfter 1 s of silence the box clears all injection and returns to pure passthrough; the mouse keeps working.
USB1 (clone)An ordinary device detach on the game PC; the box drops its injection state.
USB3 (mouse)The box tears down the captured mouse and reports it detached.

For instant passthrough without the silence timeout, send RESET before unplugging (library: reset). Dropping the Device stops its threads; the same timeout then clears the box. Port order otherwise doesn't matter.

USB1 and USB3 must not share a machine at any point, plugging in or unplugging. See the power hazard.