Ask HN: Advice for creating a USB device linking 2 computers
20 points by WorldDev 8 days ago
I want to build a little device that connects two computers together via usb, and send keystrokes from one to the other.
(I would use it to use a laptop keyboard on a headless computers).
I am looking for an easy solution, it does not have to be the cheapest.
ChatGPT points me to Arduino, but as far as I can see, there's no arduino with 2 usb ports. It also points me to Raspery pi zero, but that's a computer, not a microcontroller, so not sure if it's suitable.
If anyone with experience can give me some pointers, it would be greatly appreciated!
Neat project, regardless of some of the opinions of practicality.
What you want to do is make sure your client device is an HID device, so that it's recognized as a keyboard. I think something like this will do: https://makerspot.com/cp2110-usb-hid-to-uart-serial-adapter/
For the server side, you'll either want a USB to serial adapter with a microcontroller in between, or one of the RP2040 Raspberry pis as it can be both those at once. https://www.waveshare.com/rp2040-zero.htm
Actually you can probably do it with two RP2040s (or maybe just one) as their USB ports I believe can be configured for different roles.
Good luck, and share your results!