This mod will allow you to use mass storage (referred to as MSD in PiKVM docs) as well as mouse and keyboard, while still being able to switch to different inputs remotely.
You will have to build the following circuit:
You can find the pins to connect to on the underside of the Raspberry PI:
Here are some images of the AIMOS for reference:
- Open the PiKVM terminal
- Become
root
usersu
- Make the filesystem writable
rw
- Open the
/opt/aimos_select
script for editingnano /opt/aimos_select
- Paste the contents of src/aimos_select
- Save and close the file
CTRL-S CTRL-X
- Make the file executable
chmod +x /opt/aimos_select
- Open the sudoers file for editing
nano /etc/sudoers.d/custom_commands
- Paste the following
kvmd ALL=(ALL) NOPASSWD: /opt/aimos_select
- Save and close the file
CTRL-S CTRL-X
-
Edit the
/etc/kvmd/override.yaml
nano /etc/kvmd/override.yaml
-
Paste the following
kvmd: gpio: drivers: port1: type: cmd cmd: [/usr/bin/sudo, /opt/aimos_select, 1] port2: type: cmd cmd: [/usr/bin/sudo, /opt/aimos_select, 2] port3: type: cmd cmd: [/usr/bin/sudo, /opt/aimos_select, 3] port4: type: cmd cmd: [/usr/bin/sudo, /opt/aimos_select, 4] port5: type: cmd cmd: [/usr/bin/sudo, /opt/aimos_select, 5] port6: type: cmd cmd: [/usr/bin/sudo, /opt/aimos_select, 6] port7: type: cmd cmd: [/usr/bin/sudo, /opt/aimos_select, 7] port8: type: cmd cmd: [/usr/bin/sudo, /opt/aimos_select, 8] scheme: port1_button: driver: port1 pin: 0 mode: output switch: false port2_button: driver: port2 pin: 0 mode: output switch: false port3_button: driver: port3 pin: 0 mode: output switch: false port4_button: driver: port4 pin: 0 mode: output switch: false port5_button: driver: port5 pin: 0 mode: output switch: false port6_button: driver: port6 pin: 0 mode: output switch: false port7_button: driver: port7 pin: 0 mode: output switch: false port8_button: driver: port8 pin: 0 mode: output switch: false view: table: - ["#AIMOS 8-Port KVM"] - [] - ["#Port 1", port1_button] - ["#Port 2", port2_button] - ["#Port 3", port3_button] - ["#Port 4", port4_button] - ["#Port 5", port5_button] - ["#Port 6", port6_button] - ["#Port 7", port7_button] - ["#Port 8", port8_button]
Tip
You can change the description for the buttons in the WebUI by modifying the first string in the
kvmd > gpio > drivers > view > table
section of the yaml (e.g. "#Port 1").I added the hostnames to easily identify the ports.
-
Save and close the file
CTRL-S CTRL-X
-
Restart the frontend
systemctl restart kvmd
- Make the filesystem read-only again
ro
In case you are interested why the components are in the circuit and in the arrangement.
- J1: a PC815 optocoupler is used to isolate the two devices electrically
- R1: current limiting resistor for the LED inside of PC817
- R2: pull-up resistor for the RX pin otherwise the Voltage does not rise fast enough for the UART communication to be interpreted
- The optocoupler inverts the signal, thus we invert it again by connecting its LED between 3.3V and TX pin instead of TX and GND
- This mod bypasses the chip that interprets the infrared remote as well as the buttons. Thus the LEDs on the front of the device do not show the changes done via the remote interface. The buttons and infrared remote do still work though.
- PiKVM - the project is simply amazing
- Official Multiport Docs
- 4 Port AIMOS mod - thank you for the inspiration of using an audio cable for the pi - aimos connection and the optocoupler