Project deep-dive
One keyboard and mouse · across two networks that never meet.
A Raspberry Pi Pico 2 W that plugs into the computer running a Deskflow server as a USB network adapter, joins as an ordinary Deskflow client, and forwards the input to a laptop as a Bluetooth keyboard and mouse. Nothing is installed on either computer, and neither needs to reach the other's network, so a locked-down work machine can share its keyboard with a personal laptop.
Deskflow shares a keyboard and mouse between machines, but it needs them on the same network.
Here the two computers only share a cable: the Pico appears to the Deskflow server as a network adapter at 192.168.77.2, which it
hands out over DHCP with no router or DNS, so the server's normal traffic keeps going wherever it
went. Deskflow connects to the Pico as it would to any client, and the Pico turns the events into
Bluetooth LE HID reports for a laptop that sees a plain keyboard and mouse.
The firmware is Rust on Embassy. It speaks the
Deskflow protocol with TLS 1.3, remembers up to four laptops (one active at a time, switched from
the page or with Ctrl+Alt+1…4), types the server's clipboard out as keystrokes in six keyboard
layouts, and serves a settings page over the USB link with diagnostics, a password option, a live
log, and firmware updates that roll back if they don't come up.
Also ships optional buttons and LEDs (with a virtual copy on the page), and runs on both the Pico 2 W and the original Pico W.
Served by the Pico itself at http://192.168.77.1/, only over the USB cable, as one embedded
HTML file with no framework. These are the real page against a mock of the device's API, so the values
are illustrative, not a recording.
One dual-core chip does four jobs at once: a USB network adapter, a Deskflow client, a Bluetooth peripheral and a web server. The second core is reserved for TLS.
%%{init: {'theme': 'base', 'themeVariables': {'fontSize': '13px', 'fontFamily': 'Inter, ui-sans-serif, sans-serif', 'lineColor': '#a5b4fc', 'primaryTextColor': '#e2e4ea', 'primaryColor': '#1e2330', 'primaryBorderColor': '#6366f1', 'secondaryColor': '#252b3b', 'tertiaryColor': '#181c26', 'background': '#0d0f14', 'clusterBkg': '#181c26', 'clusterBorder': '#374151', 'titleColor': '#e2e4ea'}}}%%
flowchart TD
A(["Deskflow server\nmacOS · Windows · Linux"])
subgraph pico["Pico 2 W — RP2350 + CYW43439"]
U["USB CDC-NCM\nDHCP · settings page · serial log"]
D["Deskflow client (core 0)\nprotocol · key and mouse mapping"]
T["TLS 1.3 session (core 1)\nsoftware AES-GCM"]
H["Bluetooth LE HID\nTrouBLE · flow control · pairing"]
F[("Flash\nsettings · bonds · TLS key")]
BL["embassy-boot\nswap · rollback"]
end
L(["Laptop\nup to 4 paired, 1 active"])
A <-->|"USB"| U
U --> D
D <-->|"ciphertext"| T
D -->|"HID reports"| H
H -->|"BLE"| L
H -.-> F
BL -.->|"boots, rolls back"| D
openssl s_server in CI.
embassy-boot swaps in an uploaded image, and the new firmware has to prove itself, by serving the settings page or connecting to Deskflow, within five minutes or the old one comes back. A watchdog covers a hang. The update is written a sector at a time, because erasing the whole slot at once stalls USB.
no_std crate with 118 host tests, including real TLS 1.3 handshakes against OpenSSL. The firmware only connects hardware to it, which keeps a device you can only flash and watch over USB tractable.
The project says what it hasn't verified as plainly as what it has; the README and the hardware checklist in the repository keep the same list.
Verified on a Pico 2 W
Against a Deskflow server on Linux (Wayland), with an Arch Linux (X11) laptop and a Windows machine as the Bluetooth side: USB networking, pairing and switching between laptops, TLS with pinning, keys, absolute and relative mouse, the clipboard text box and the settings page. The fast-mouse numbers above come from this setup.
Builds and tests, not yet run
The Pico W (RP2040) shares all the code and builds in CI, but hasn't been run on a board. The buttons and LEDs are covered by host tests, and the wiring hasn't been built. macOS and Windows servers use key tables checked against Deskflow's source and tested on the host, not against a real Mac or Windows server.
Updates from the page
The bootloader and first boot work on the device. The upload, swap and rollback paths are written and covered by host tests, but haven't had their full run on hardware yet.