DIY KVM for remote-controlling a computer even in BIOS.
Total cost $24.
You need:
- bluetooth dongle ~$2.5
- esp32 s3 zero(dev board) ~$9.5
- V4L2 capable noname hdmi to usb video capture card ~$12
- old x86 laptop/computer + hdmi cable
Caution
code is 100% llm slop.
Work in progress.
Caution
This software is provided 'as is' without any warranties of any kind. By using this software, you agree to assume all risks associated with its use. The provider is not responsible for any damages that may occur.
Read the code!Change PSK(pre-shared key) in main.c and in esp32.ino
- You can generate it with
openssl rand -hex 32 | sed 's/\(..\)/0x\1 /g' | tr ' ' ',' | sed 's/.$//' - PSK in main.c and esp32.ino MUST be identical
Change path to video capture card if needed in main.c
- Look for v4l2src
deviceargument - Use
/dev/v4l/by-id/...path instead of/dev/video*
Using Arduino IDE flash esp32 firmware(file esp32.ino)
- Connect esp32 to USB port/cable by holding
bootbutton. - Tools -> Board -> Boards Manager... -> search for
esp32-> chooseesp32byEspressif Systemsversion3.2.0 - Board -
ESP32S3 Dev Module - Upload Speed -
115200 - USB Mode -
USB-OTG (TinyUSB) - USB CDC On Boot -
Disabled - Port - usually
/dev/ttyACM0 - Sketch -> Verify/Compile
- Sketch -> Upload
Build GUI app. On nixos: "nix develop" -> "./build.sh"- Add your user to the input group
sudo usermod -aG input $USER(To have access to the /dev/input/*)
Tip
Build and install GUI app as a standalone application:
nix build .nix profile add .
Run it without nix develop env: slopkvm.
Important
[GUI app] To activate/deactivate keyboard&mouse forwarding use right ctrl + right alt hotkeys combo,
or left shift + right shift(on mac for example).
[GUI app] dependencies - flake.nix
Bugs:
- Make sure that client GUI app shows
session saltin logs when connects to esp. If not, press theresetbutton on the ESP, reload linux Bluetooth service, and try again by starting a GUI app. That race condition in hello message advertisement needs to be fixed. - If you have keys remapped it most likely will be a problem.
inspired by:
https://github.com/AndreCouture/Tiny-ESP32-S3-USB-HID
https://github.com/allape/openkvm