diff --git a/docs/xh_hk4401.md b/docs/xh_hk4401.md index 491eb4f..8b51fcd 100644 --- a/docs/xh_hk4401.md +++ b/docs/xh_hk4401.md @@ -30,40 +30,50 @@ connected to the main KVM via a micro USB cable, however this is **NOT** as USB The control unit communicates to the KVM using the RS-232 protocol (at 5v) not USB, and one of the following solutions must be used. +### Inverting USB UART adapter (FT-232) - The easy way -### An inverter circuit +Some USB UART adapters have the rare feature to invert the logic level of the RX/TX signals. For example the FTDI FT232 can +be configured via the FTDI configuration GUI to do this. With such an adapter, the circuit above is not required. All you +need is to connect it to a micro-USB connector. -For this you will need: +!!! warning + These options will only work on UART adapters with **genuine** FTDI chips. There are a lot of cheap fakes on the + market that either lack this option, or will prevent you from changing the settings. To avoid getting a fake + ensure you always purchase from a reputable store and brand (Adafruit, Sparkfun, etc.), Amazon **is not** a + reputable store. -* 2x 2n7000 MOSFETs -* 2x 10K resistors -* 1x USB Micro connector, or sacrificial micro USB cable -* *Optional:* USB UART adapter +In order to invert the RX/TX signals, you can use [ft_prog](https://ftdichip.com/utilities/#ft_prog) and set the +following settings: - + -You can connect this either via a USB UART adapter, or directly to the Raspberry Pi: `GND -> Pin 6`, `TX -> Pin 8`, `RX -> Pin 10`. -On the v3 PiKVM hat you will need to disable the UART jumpers to use the on-board UART. +Once the UART is configured, please fully disconnect it and connect it back to the computer. Relaunch `ft_prog` and ensure the settings are still set. If they are not, you have a *fake* FTDI chip. -!!! note - Please search online for USB pinouts to ensure you connect it properly. +Finally, you will need to connect it to the micro USB port (**This it not a normal USB micro port.**) +like so: +| Signal | Colour | FT232 Pin | +| ------ | ------ | --------------------------------------------------- | +| Vbus | Red | 5v (if you want to power the KVM from the Pi's USB) | +| D- | White | RX | +| D+ | Green | TX | +| Gnd | Black | GND | -### Inverting USB UART adapter -Some USB UART adapters have the rare feature to invert the logic level of the RX/TX signals. For example the FTDI FT232 can -be configured via the FTDI configuration GUI to do this. With such an adapter, the circuit above is not required. All you -need is to connect it to a micro-USB connector. +### An inverter circuit - The cheap way -In order to invert the RX/TX signals, you can use [ft_prog](https://ftdichip.com/utilities/#ft_prog) and set the following settings: +For this you will need: - +* 1x 74HC14 +* 1x USB A socket, or sacrificial micro USB cable +* Optional 1x Diode - If you want to power the KVM from the Raspberry Pi +* 1x 5-pin header +* 5x Female - Female jumper cables -!!! warning - These options will only be available on UART adapters with genuine FTDI chips. There are a lot of cheap fakes on the - market that either lack this option, or will prevent you from changing their settings. To avoid getting a fake - ensure you always purchase from a reputable store and brand (Adafruit, Sparkfun, etc.), Amazon **is not** a - reputable store. + + +!!! note + Please search online for USB pinouts to ensure you connect it properly. ## Adding UI elements to control the KVM switch @@ -73,7 +83,12 @@ The UI can be updated to add buttons to switch between KVM inputs and indicators 2. Enable read-write mode on the sd card via `rw` -3. Edit the `/etc/kvmd/override.yaml` file and include the following. Note the assumption that you are using a USB UART present on `/dev/ttyUSB0`: +3. Edit the `/etc/kvmd/override.yaml` file and include the following. + +| Method | Device | +|----------|----------------| +| FT-232 | `/dev/ttyUSB0` | +| Inverter | `/dev/ttyAMA0` | ```yaml kvmd: diff --git a/docs/xh_hk4401/xh-hk4401_circuit.jpg b/docs/xh_hk4401/xh-hk4401_circuit.jpg deleted file mode 100644 index ade7095..0000000 Binary files a/docs/xh_hk4401/xh-hk4401_circuit.jpg and /dev/null differ diff --git a/docs/xh_hk4401/xh-hk4401_circuit.png b/docs/xh_hk4401/xh-hk4401_circuit.png new file mode 100644 index 0000000..607e31c Binary files /dev/null and b/docs/xh_hk4401/xh-hk4401_circuit.png differ