<!-- Source: https://medius.k4tech.net/native/hardware -->
# Ports

_The three USB ports and how to cable them_

Wire the box once at first plug-in; after that everything is software.

Inside are two [ESP32](https://www.espressif.com/en/products/socs)\-S3 microcontrollers and a [`CH343`](https://www.wch-ic.com/products/CH343.html) USB-serial bridge. Your program only ever speaks to the `CH343` serial port; the two chips talk over an internal 5 Mbaud link you never touch, separate from the 4 Mbaud control link.

| Port | Connects to | Role |
| --- | --- | --- |
| `USB1` | Game PC | The clone ([device chip](/native/architecture.md)), a copy of the mouse's USB identity, so the PC sees the same device it would if the mouse were plugged in directly. |
| `USB2` | Control PC | [CH343](/native/transport.md) serial control, the `/dev/ttyACM*` port your program opens |
| `USB3` | Mouse | Real mouse ([host chip](/native/architecture.md)) |

## USB3 power hazard

_The one wiring pairing to avoid_

> **Danger**
>
> ⚠️ `USB1` and `USB3` must never both connect to the same machine.
>
> The `USB3` 5V rail can't be pulled low in firmware, so wiring both to one machine back-feeds power and can force a shutdown or drain the battery. Keep them on separate machines per the port table above.

## Disconnecting

_No power switch, just unplug_

The box is USB bus-powered: no battery, no power button, nothing to power down. Turning it off means unplugging it, and that is safe at any moment. Injected input never outlives the program that sent it, so a button or move can't get stuck.

| You unplug | What happens |
| --- | --- |
| `USB2` (control), or the program stops | After `1 s` of silence the box clears all [injection](/native/injection.md) and falls back to pure passthrough. The real mouse keeps working. |
| `USB1` (clone) | The game PC sees an ordinary mouse unplug; the box drops its injection state. |
| `USB3` (mouse) | The box tears down the captured mouse cleanly and reports it detached. |

To return to passthrough instantly instead of waiting out the [silence timeout](/native/injection.md#safety), send a [`RESET`](/native/commands/admin.md#reset) before unplugging (the library's [`reset`](/library/admin.md#reset)). Dropping the [`Device`](/library/guides/connection.md#release) stops its threads, after which the same timeout clears the box. Port order otherwise does not matter.

> **Warning**
>
> The one rule: `USB1` and `USB3` must not share a machine at any point, plugging in or unplugging. See the [power hazard](/native/hardware.md#hazard).
