diff --git a/docs/pico_hid.md b/docs/pico_hid.md index a137f2b..37b71c0 100644 --- a/docs/pico_hid.md +++ b/docs/pico_hid.md @@ -1,4 +1,4 @@ -# Raspberry Pi Pico HID +# The Pico HID The Pico HID is a part of [DIY PiKVM V1](v1.md) platform that performs keyboard and mouse emulation. It has excellent compatibility, and emulates USB by default, including two mouse modes: absolute and relative. @@ -52,7 +52,7 @@ But if you are making the Pico HID for [V2](v2.md) or [V3](v3.md), then follow t Soldering skills will also come in handy. * *x1* 3.3V/5V bi-directional logic level shifter [like this](https://learn.sparkfun.com/tutorials/bi-directional-logic-level-converter-hookup-guide/). - * Optional: *x2* PS/2 cable with male connector (can be salvaged from the an keyboard or mouse). + * *x2* PS/2 cable with male connector (can be salvaged from the an keyboard or mouse). Make sure that the level shifter pinout matches the scheme, and connect everything according to the [Pico pinout](https://pico.pinout.xyz). @@ -132,7 +132,7 @@ To upload the firmware to Pico HID, you can use any computer with a USB port. ----- ## The final steps -Connect the Pico HID to a computer using the USB cable. +Connect the Pico HID to the target host using the USB cable. If you are building PiKVM [V1](v1.md), no further action with the Pico HID is required. diff --git a/docs/pico_hid_bridge.md b/docs/pico_hid_bridge.md new file mode 100644 index 0000000..c5e4aa2 --- /dev/null +++ b/docs/pico_hid_bridge.md @@ -0,0 +1,93 @@ +# The Pico HID PS/2 Bridge + +The Pico HID Bridge is a special case of the [Pico HID](pico_hid.md). +It is a simple PS/2-only emulator with a USB interface. Unlike generic [Pico HID](pico_hid.md) +and legacy [Arduino HID](arduino_hid.md), it doesn't require SPI wiring with GPIO. + +At one end it connects to USB-A on PiKVM, on the other side it has two PS/2 connectors for keyboard and mouse: + + + +In addition, on PiKVM V2+, the use of Pico the HID Bridge does not exclude the use of a regular USB OTG port with Mass Storage emulation. +Thus, on V2+ you will be able to use PS/2 and USB Mass Storage at the same time, and even switch between OTG HID and [Pico HID](pico_hid.md). + + +----- +## Making the Bridge + +* *x1* [Raspberry Pi Pico board](https://www.raspberrypi.com/products/raspberry-pi-pico/) with soldered pins. +* *x1* USB-A to Micro-USB cable. +* *x1* 3.3V/5V bi-directional logic level shifter [like this](https://learn.sparkfun.com/tutorials/bi-directional-logic-level-converter-hookup-guide/). +* *x2* PS/2 cable with male connector. +* *x2* Small dip jumpers. + +Make sure that the level shifter pinout matches the scheme, and connect everything according to the [Pico pinout](https://pico.pinout.xyz). + +``` + _________________ + | | +Pico GP11 ______| LV1 HV1 |______ PS/2 keyboard data +Pico GP12 ______| LV2 HV2 |______ PS/2 keyboard clock +Pico GP13 ______| LV HV |______ PS/2 5V +Pico GND ______| GND GND |______ PS/2 GND +Pico GP14 ______| LV3 HV3 |______ PS/2 mouse data +Pico GP15 ______| LV4 HV4 |______ PS/2 mouse clock + |_________________| + +``` + +You can take the 5V power line from one of the PS/2, for example from the keyboard, +or from both at once, but use a multimeter to make sure that both PS/2 female +connectors have the same line. + + + +PS/2 female socket pinout on the motherboard is the same for the keyboard and the mouse. +A purple socket usually corresponds to the keyboard, and a green one to the mouse. +If your motherboard only has one port, it's probably universal and can be used for both +the keyboard and the mouse. Most likely, it will be painted both colors. + +Use a multimeter to determine the purpose of the wires in your PS/2 cables. + +A good idea is to mount the level shifter on top of the Pico, as in this photo: + + + +Finally, install DIP jumpers to soldered pins of the Pico to enable PS/2 and Bridge modes: + +* `GP2 <-> GND` +* `GP5 <-> GND` + +Like this: + + + + +----- +## Flashing the firmware + +To upload the firmware to Pico HID, you can use any computer with a USB port. + +1. [Download](https://github.com/pikvm/kvmd/releases) the latest release of the firmware. The file is called `pico-hid.uf2`. +2. Press and hold the white button on the Pico board. +3. While still holding the button, plug it in the computer using a USB cable. +4. Release the button. +5. The Pico board appears as a flash drive on your computer. +6. Copy the `pico-hid.uf2` file to this flash drive. +7. Safely eject the USB device. + + +----- +## The final steps + +Connect the Pico HID to the target host using PS/2 cable and USB to USB-A port on PiKVM. + +Add following lines to the PiKVM configuration and reboot it: + +* `/etc/kvmd/override.yaml`: + ```yaml + kvmd: + hid: + type: serial + device: /dev/kvmd-hid-bridge + ``` diff --git a/docs/pico_hid_bridge/pico_hid_bridge_ps2.jpg b/docs/pico_hid_bridge/pico_hid_bridge_ps2.jpg new file mode 100644 index 0000000..9a5c821 Binary files /dev/null and b/docs/pico_hid_bridge/pico_hid_bridge_ps2.jpg differ diff --git a/docs/pico_hid_bridge/pico_hid_bridge_ps2_jumpers.jpg b/docs/pico_hid_bridge/pico_hid_bridge_ps2_jumpers.jpg new file mode 100644 index 0000000..c9c633f Binary files /dev/null and b/docs/pico_hid_bridge/pico_hid_bridge_ps2_jumpers.jpg differ