This repo is modified from Nihiue/open-ip-kvm to use WCH CH9329 Relpace to Arduino Leonardo to Emulate HID.
The C0 C1 M0 M1 of the CH9329 module need to be all 1. (Protocol transmission mode, simulates keyboard, mouse and custom HID device). That is, pull out the jumper caps for these pins on the module board.
-
CH9329 modules is cheaper and smaller than Arduino Leonardo. (CH9329 modules only use 5CNY(~0.7 USD))
-
The peripheral circuit of CH9329 is relatively simple and easy to integrate on a PCB.
This project provides an open-source IP-KVM solution.
Related article:
English Version By Google Translate
KVM Over IP (IP-KVM) is a hardware based solution for remote access to your computer or server.
The unit plugs into the Keyboard, Video and Mouse ports of a computer or server and transmits those to a connected user through a network.
- RD software requires a working OS, and must be pre-configured. It often fails in an emergency situation
- IP-KVM is out-of-band, so it can be used to install OS, setup BIOS or fix low-level issues
- Web browser as client
- 1080P 30fps video stream
- Full mouse & keyboard support
- UI Indicator
- Remote Paste: Input ASCII sequence
- HDMI-USB capture device
- Recommendation:
MS2109
based devices link - Input: Up to 4K 30FPS
- Output: Up to 1080P 30FPS @ MJPEG
- Recommendation:
- Linux single-board computer
- Recommendation:
Phicomm N1
, Raspberry Pi 4 or other models, - Recent linux kernel
- 2+ USB ports
- Recommendation:
Arduino Leonardo link- CH9329 Modules
- Emulate HID (mouse and keyboard)
- Optional
- USB-to-TTL Adapter
- If linux sbc has no built-in serial port
- Recommendation:
PL2303HX
- USB Wi-Fi Adapter
- If linux sbc has no built-in Wi-Fi
- USB-to-TTL Adapter
Upload program
- Download and install Arduino IDE on your PC.
- Connect leonardo to PC via USB
- Download arduino code file virt-hid-arduino.ino, Open it with Arduino IDE, then click
Sketch/Upload (Ctrl + U)
- Disconnect leonardo USB
SSH to linux SBC with your pc.
Deploy App and Dependency on Linux SBC
- Build and install MJPG-Streamer
- Install Node.js 14.x+
- Clone repo and install its dependency
git clone https://github.com/Nihiue/open-ip-kvm.git
cd open-ip-kvm && npm install
Connect IO and edit config
- Connect IO
- HDMI-USB capture device via USB
- CH9329 Modules via native serial port or USB-TTL adapter
- Edit
open-ip-kvm/server/config.json
mjpg_streamer.device
: path of HDMI-USB capture deviceserialport
: path of serial port
- Connect HDMI output of target computer to HDMI-USB capture device
- Connect target computer to CH9329 Modules via USB
- Run
cd open-ip-kvm && npm run start
on linux SBC - Turn on target computer
- Open
http://[IP of Linux SBC]:8000
in web browser
How to control
- Mouse
- Click anywhere to enter
pointer capture
mode - Press
ESC
to exit
- Click anywhere to enter
- Keyboard
- Press
Enter
to enterkey capture
mode - press
Shift + ESC
to exit
- Press
MIT
For production environment, use Pi-KVM