I have long thought about how I could use my laptop as a KVM for servers and computers. Since there are hardly any ready-made solution, and if, they are extremely expensive I decided to build something myself, which is exactly adapted to my requirements.
After a short research I came across Pi-KVM. Pi-KVM is an operating system for the Raspberry Pi that is based on ARM Arch. Using an HDMI to CSI-2 bridge, this can provide HDMI input to its own web console. To also be able to use mouse and keyboard control, the Raspberry Pi emulates them via the USB-C port via OTG. After I decided to use Pi KVM, I started planning. First and foremost, I had the question of which case to use. I had considered printing something with the 3D printer, however PLA is not known to be very heat stable, and since I liked to run the Pi without a fan, this was out of the question. I stumbled across the following article. I liked the idea, the case was accordingly already fixed.
But since I wanted the KVM to be as portable and versatile as possible, I had considered the following, additional requirements:
- Only one power cable for all power
- Possibility to operate via powerbank
- WLAN – Router
- In order to be able to connect wirelessly everywhere with the Pi KVM, I thought about installing a WLAN – Router, which opens a Wifi network, with which both Pi KVM, as well as my computer connect.
- HDMI signal loop through
- In some use cases it is a nice to have that you can hang the KVM between screen and PC. So the server / PC can be operated via KVM, as well as directly via screen, mouse and keyboard.
- Switching Wifi router and PiKVM separately
- If you only need a WLAN hotspot, it would be pointless to turn on the Pi with. So it should be possible both everything eingeschlatet, or only the WLAN router.
Once the requirements were clear, it was on to hardware procurement:
- Raspberry Pi 4 4GB
- HDMI to CSI-2 Bridge
- WLAN Router (tp-link Travel Router TL-WR902AC)
- HDMI Splitter (CSL HDMI Splitter)
- USB-C power supply (Anker PA-D3 (currently not available)
- Netgear Switch ProSafe FS108 (used on eBay)
- HDMI Cable
- USB-C Cable Set
- USB-C Angle Adapter
- HDMI Angle Adapter
- USB-C Splitter
- It was very hard to get this product in Germany. Thanks to @Giant on the Pi-KVM Discord, who referred me to the store. Let’s better not talk about shipping and customs costs at this point.
- 3-position toggle switch
- Hollow plug socket and plug
- M3 Spacer / Screws
After everything arrived, it was time to assemble.
I quickly noticed that the space was nevertheless less than first hoped for. So my plan to simply install the devices next to each other in the switch had quickly come to nothing. So I removed the wifi router and HDMI splitter from the cases.
This has already saved me some space. But still not enough. This led to the fact that the only way to put both in the case was to put both boards on top of each other. So I glued them together:
Since the transistor was too high, I desoldered it and soldered it back on with short wires.
Then I placed the devices in the case and drilled the holes for the spacers. As a test, I have already connected the devices together. To get to the output of the HDMI singnal, I used an HDMI angle adapter here. I also cut openings for the connectors with a Dremel into the housing:
Since I wanted to keep the look of a typical switch, I covered one side of the port with a fan grill. On the other side, the ports of the switch will be glued in later. Of course, these have no function.
I still want to use the power LED (on the far left of the case) as a power LED for the Pi. Therefore I desoldered it from the switch board, and also separated the RJ-45 ports. The other LED cutouts are no longer needed, so I filled them with quick putty and sanded them down.
As you can see in the last picture, I sanded the whole case and painted it:
Last but not least, everything was finally installed in the case. Here I also used the USB-C angle adapter. I also disconnected the USB-C cable from the splitter to the Pi, and soldered and reconnected the power supply for all devices via the switch. All cables in the direction of the switch, I have connected with connectors, so that I can completely remove the lid for maintenance purposes.
Done! After that I tested everything. I was able to implement all the requirements I had set myself and also build what I think is a very fancy Pi-KVM.