Turn an Android phone into an IP-KVM.
(pg stands for poor guys - for those of us who can't justify a few hundred dollars for a hardware IP-KVM but still have machines to babysit.)
English | ไธญๆ
That's all the hardware you need - no dedicated KVM switch, no extra server:
- ๐ท A UVC video capture card (HDMI-to-USB, the cheap kind works fine)
- ๐ฒ An ESP32-S3 development board
- ๐ฑ An Android phone
You have a home server sitting in a corner. Most of the time it just works - until one day it hangs, drops off the network, or needs a BIOS/UEFI tweak. Now you must physically connect a monitor and keyboard to debug it, and hauling a monitor over (finding one, finding the right cable, clearing desk space) is a pain. Again.
pg-kvm is for exactly that: leave a UVC capture card plugged into the server's HDMI port and an ESP32-S3 into a USB port, and the next time it acts up, just grab an android phone and open a browser, see the screen, and type.
pg-kvm is a low-cost, software-only IP-KVM solution built around an ordinary Android phone:
- A UVC USB camera (e.g. an HDMI capture card) captures the target computer's screen.
- An Android app streams the video to any browser over WebRTC, with the signaling server embedded in the app itself - no external server needed.
- Keyboard and mouse events from the browser are relayed over Bluetooth Low Energy (BLE) to an ESP32-S3 board, which replays them to the target PC as a wired USB HID keyboard and mouse.
The result: you can view and control a remote computer from a browser, as if its monitor, keyboard, and mouse were plugged in directly - with the target PC requiring zero software installation.
โ ๏ธ Status: the project is fully working but still being polished. Current end-to-end video latency is around 1 second, which is not yet ideal - optimization is ongoing.
โโโโโโโโโโโ
โ Browser โ (you)
โโโโโโฌโโโโโ
video (WebRTC) โฒ โ โผ input (WebSocket)
โโโโโโดโโโโโ
โ Android โ
โ app โ
โโโโฒโโโโฒโโโ
video (USB-OTG) โฒ โ โ โผ input (BLE)
โโโโโโโโโ โโโโโโโโโ
โโโโโโดโโโโโโ โโโโโโโดโโโโโ
โ UVC โ โ ESP32-S3 โ
โ camera โ โ (bridge) โ
โโโโโโฒโโโโโโ โโโโโโโฌโโโโโ
video (HDMI) โ โ input (USB HID) โผ
โโโโโโดโโโโโโโโโโโโโโโโโโโดโโโโโ
โ Target PC โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- ๐น UVC camera capture via a bundled native
libuvc- works with most USB capture cards and UVC webcams through USB-OTG. - ๐ก Video streaming over WebRTC, with the signaling server (WebSocket, port 3000) running inside the app.
- โจ๏ธ ๐ฑ๏ธ Full remote input: a second WebSocket server (port 3001) receives keyboard/mouse events from the browser and forwards them over BLE to the ESP32-S3.
- ๐ Web frontend (Vue 3 + TypeScript) with i18n support - no client installation required.
- ๐ Target PC stays untouched - input is injected as standard USB HID devices.
.
โโโ pg-kvm-android/ # The Android app + web frontend
โ โโโ app/ # Main app: WebRTC streaming, signaling & input-relay servers, BLE
โ โโโ libausbc/ # UVC camera capture library (forked/derived from herhansen/libausbc)
โ โโโ libuvc/ # Native libuvc (JNI), with libjpeg-turbo and rapidjson
โ โโโ libnative/ # Additional native helpers
โ โโโ frontend/ # Vue 3 + TS + Vite web viewer/controller
โ โโโ ...
โโโ pg-kvm-esp32s3-dummy/ # Placeholder describing the ESP32-S3 firmware (see below)
โโโ LICENSE # Apache 2.0
โโโ README.md
The ESP32-S3 side runs the open-source
ESPRemoteControl firmware by KoStard. pg-kvm's
Android app is protocol-compatible with it (BLE GATT, service
2D2A0001-8A5A-4E76-A2E3-1E57D9A1B001), and the firmware source is not bundled here - please
download, compile, and flash it yourself. See
pg-kvm-esp32s3-dummy/README.md for details.
- Firmware: clone ESPRemoteControl, build it with PlatformIO, and flash it to an ESP32-S3 board (see its README).
- Android app: open
pg-kvm-android/in Android Studio and run it on your phone. Attach a UVC capture card / webcam via USB-OTG. - Pair: in the app, connect to the
KBBridge-ESP32S3BLE device. - Control: open the web page served by the app running on the phone in any browser on the same network, and start working on the remote PC.
- Stream - the Android app is derived from the webrtc-sample-compose sample (Apache 2.0).
- KoStard - author of ESPRemoteControl, the ESP32-S3 BLE->USB-HID bridge firmware this project interoperates with.
- herhansen/libausbc and the upstream libuvc project - UVC camera capture on Android.
- jiangdongguo/AndroidUSBCamera - UVC
camera capture on Android, which the
libuvcmodule of this project is based on. - The WebRTC, Vue, and NimBLE-Arduino communities.
Released under the Apache 2.0 License.
If pg-kvm saves you from buying an expensive hardware KVM, please consider giving this repository a Star - it helps others discover the project and keeps development going. Thank you! ๐
(pg ๅณ poor guys - ๆ็้ฝๆ)
ๆ้็ๅ จ้จ็กฌไปถๅฐฑ่ฟไบ - ๆ ้ไธ็จ KVM ๅๆขๅจ,ๆ ้้ขๅคๆๅกๅจ:
- ๐ท ไธๅช UVC ่ง้ข้้ๅก(HDMI ่ฝฌ USB,ไพฟๅฎ็ๅณๅฏ)
- ๐ฒ ไธๅ ESP32-S3 ๅผๅๆฟ
- ๐ฑ ไธๅฐ ๅฎๅๆๆบ
ๅฎถ้่ง่ฝ้่บบ็ไธๅฐๆๅกๅจใๅคงๅคๆฐๆถๅๅฎๅฎ้ๅฐ่ท็ - ็ดๅฐๆๅคฉๅฎๆไบใๆญ็ฝ่ฟไธไธไบ,ๆ่ ้่ฆ่ฐ ๆด BIOS/UEFIใ่ฟๆถๅไฝ ๅฟ ้กปๆฌไธๅฐๆพ็คบๅจๅ้ฎ็่ฟๅป็ฉ็่ฟๆฅ่ฐ่ฏ:ๆพๆพ็คบๅจใๆพๅฏน็บฟใ่ พๆก้ขโฆโฆ ๆฏๆฌก้ฝๅพๆ่ พใ
pg-kvm ๆญฃๆฏไธบ่ฟ็งๅบๆฏ่็:ๅจๆๅกๅจ็ HDMI ๅฃไธๅธธ้ฉปไธๅช UVC ้้ๅก,USB ๅฃไธๆไธไธช ESP32-S3ใ ไธๆฌกๅฎๅ็ฏ็ ,ๆพไธๅฐๅฎๅๆๆบ่ฟไธ,ๆๅผๆต่งๅจๅฐฑ่ฝ็ๅฐ็ป้ขใ็ดๆฅๆฒ้ฎ็ใ
pg-kvm ๆฏไธๅฅๅด็ปๆฎ้ Android ๆๆบๆๅปบ็ไฝๆๆฌใ็บฏ่ฝฏไปถ IP-KVM ๆนๆก:
- ้่ฟ UVC USB ๆๅๅคด(ๅฆ HDMI ้้ๅก)้้็ฎๆ ็ต่็็ป้ข;
- Android ๅบ็จ้่ฟ WebRTC ๅฐ็ป้ขๆจ้ๅฐไปปๆๆต่งๅจ,ไฟกไปคๆๅกๅจๅ ็ฝฎไบๅบ็จๆฌ่บซ,ๆ ้้ขๅค ้จ็ฝฒๆๅก็ซฏ;
- ๆต่งๅจ็ซฏ็้ฎ็ใ้ผ ๆ ไบไปถ็ป BLE(ไฝๅ่่็) ่ฝฌๅๅฐ ESP32-S3 ๅผๅๆฟ,็ฑๅฎไปฅๆ็บฟ USB HID ้ฎ้ผ ็ๅฝขๅผๆณจๅ ฅ็ฎๆ ็ต่ใ
ๆๆ็ญๅไบ:ไฝ ๅฏไปฅๅจๆต่งๅจ้ๆฅ็ๅนถๆๆง่ฟ็จ็ต่,ๅฐฑๅๆพ็คบๅจๅ้ฎ้ผ ็ดๆฅๆๅจไธ้ขไธๆ ท - ็ฎๆ ็ต่ ๆ ้ๅฎ่ฃ ไปปไฝ่ฝฏไปถใ
โ ๏ธ ๅฝๅ็ถๆ:้กน็ฎๅทฒๅฏๅฎๆดไฝฟ็จ,ไฝไปๅจๆ็ฃจไธญใ็ฎๅ็ซฏๅฐ็ซฏ่ง้ขๅปถ่ฟ็บฆ 1 ็ง,ๅฐไธ็ๆณ, ไปๅจๆ็ปญไผๅใ
โโโโโโโโโโโ
โ ๆต่งๅจ โ (ไฝ )
โโโโโโฌโโโโโ
่ง้ข (WebRTC) โฒ โ โผ ่พๅ
ฅ (WebSocket)
โโโโโโดโโโโโ
โ Android โ
โ ๅบ็จ โ
โโโโฒโโโโฒโโโ
่ง้ข (USB-OTG) โฒ โ โ โผ ่พๅ
ฅ (BLE)
โโโโโโโโโ โโโโโโโโโ
โโโโโโดโโโโโโ โโโโโโโดโโโโโ
โ UVC โ โ ESP32-S3 โ
โ ๆๅๅคด โ โ (ๆกฅๆฅๅจ) โ
โโโโโโฒโโโโโโ โโโโโโโฌโโโโโ
่ง้ข (HDMI) โ โ ่พๅ
ฅ (USB HID) โผ
โโโโโโดโโโโโโโโโโโโโโโโโโโดโโโโโ
โ ็ฎๆ PC โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- ๐น ๅบไบ native
libuvc็ UVC ๆๅๅคด้้,้่ฟ USB-OTG ๅ ผๅฎนๅคงๅคๆฐ้้ๅกๅๆๅๅคด; - ๐ก ๅบไบ WebRTC ็่ง้ขๆจๆต,ไฟกไปคๆๅกๅจ(WebSocket,็ซฏๅฃ 3000)ๅ ็ฝฎไบๅบ็จ;
- โจ๏ธ ๐ฑ๏ธ ๅฎๆด่ฟ็จ่พๅ ฅ:็ฌฌไบไธช WebSocket ๆๅกๅจ(็ซฏๅฃ 3001)ๆฅๆถๆต่งๅจ้ฎ้ผ ไบไปถๅนถ็ป BLE ่ฝฌๅ่ณ ESP32-S3;
- ๐ Web ๅ็ซฏ(Vue 3 + TypeScript),ๆฏๆๅค่ฏญ่จ,ๅฎขๆท็ซฏๆ ้ๅฎ่ฃ ;
- ๐ ็ฎๆ ็ต่้ถไพตๅ ฅ - ่พๅ ฅไปฅๆ ๅ USB HID ่ฎพๅคๆณจๅ ฅใ
.
โโโ pg-kvm-android/ # Android ๅบ็จ + Web ๅ็ซฏ
โ โโโ app/ # ไธปๅบ็จ:WebRTC ๆจๆตใไฟกไปคไธ่พๅ
ฅไธญ็ปงๆๅกๅจใBLE
โ โโโ libausbc/ # UVC ๆๅๅคด้้ๅบ(่ก็่ช herhansen/libausbc)
โ โโโ libuvc/ # Native libuvc(JNI),ๅซ libjpeg-turbo ไธ rapidjson
โ โโโ libnative/ # ๅ
ถไป native ่พ
ๅฉไปฃ็
โ โโโ frontend/ # Vue 3 + TS + Vite ็ฝ้กตๆฅ็/ๆงๅถ็ซฏ
โ โโโ ...
โโโ pg-kvm-esp32s3-dummy/ # ESP32-S3 ๅบไปถ่ฏดๆๅ ไฝ็ฎๅฝ(่งไธ)
โโโ LICENSE # Apache 2.0
โโโ README.md
ESP32-S3 ็ซฏ่ฟ่ก KoStard ็ๅผๆบๅบไปถ
ESPRemoteControlใๆฌ้กน็ฎ็ Android ๅบ็จไธๅ
ถ
ๅ่ฎฎๅ
ผๅฎน(BLE GATT,ๆๅก UUID 2D2A0001-8A5A-4E76-A2E3-1E57D9A1B001),ๅบไปถๆบ็ ๅนถๆช
ๅ
ๅซๅจๆฌไปๅบไธญ,่ฏท่ช่กไธ่ฝฝใ็ผ่ฏๅนถ็งๅฝ,่ฏฆ่ง
pg-kvm-esp32s3-dummy/README.mdใ
- ๅบไปถ:ๅ ้ ESPRemoteControl,ไฝฟ็จ PlatformIO ็ผ่ฏๅนถ็งๅฝๅฐ ESP32-S3 ๅผๅๆฟ(่ฏฆ่งๅ ถ README);
- Android ๅบ็จ:็จ Android Studio ๆๅผ
pg-kvm-android/ๅนถ่ฟ่กๅฐๆๆบ,้่ฟ USB-OTG ๆฅๅ ฅ UVC ้้ๅกๆๆๅๅคด; - ้
ๅฏน:ๅจๅบ็จไธญ่ฟๆฅ
KBBridge-ESP32S3BLE ่ฎพๅค; - ๆงๅถ:ๅจๅไธ็ฝ็ป็ไปปๆๆต่งๅจไธญๆๅผ็ฑ่ฟ่กๅจๆๆบไธ็ๆๅกๅจๆไพ็็ฝ้กต,ๅณๅฏๅผๅงๆไฝ ่ฟ็จ็ต่ใ
- Stream - Android ๅบ็จ่ก็่ชๅ ถๅผๆบ็คบไพ webrtc-sample-compose(Apache 2.0);
- KoStard - ESPRemoteControl(ESP32-S3 BLE->USB-HID ๆกฅๆฅ ๅบไปถ)็ไฝ่ ;
- herhansen/libausbc ไธไธๆธธ libuvc ้กน็ฎ - Android ไธ็ UVC ๆๅๅคด้้;
- jiangdongguo/AndroidUSBCamera - ๆฌ้กน็ฎ
libuvcๆจกๅๆๅบไบ็ Android UVC ๆๅๅคด้้ๅผๆบ้กน็ฎ; - WebRTCใVueใNimBLE-Arduino ็ญๅผๆบ็คพๅบใ
ไปฅ Apache 2.0 ่ฎธๅฏ่ฏๅๅธใ
ๅฆๆ pg-kvm ๅธฎไฝ ็ไธไบไธๅฐๆ่ดต็็กฌไปถ KVM,ๆฌข่ฟ็ปไปๅบ็นไธช Star - ไฝ ็ๆฏๆ่ฝ่ฎฉๆดๅคไบบๅ็ฐ่ฟไธช ้กน็ฎ,ไนๆฏๆ็ปญๅผๅ็ๅจๅใ่ฐข่ฐข!๐