pull/1139/head
Maxim Devaev 7 months ago
parent 7cd7a85253
commit 7a7ca7429c

@ -175,7 +175,7 @@ Kit parts suitable for assembly are also on [sale in Poland](https://3mdeb.com/s
#### Addition
* If you want to capture VGA from your server instead of HDMI, buy the [VGA-to-HDMI converter](https://aliexpress.com/item/3256801728005613.html). Some VGA HDMI adapters have issues with not supporting all resolutions and refresh rates.
* PiKVM can be powered using PoE, but it is not recommend to use the official PoE HAT: it is unreliable and [not compatible with the HDMI bridge](https://github.com/pikvm/pikvm/issues/6). Use any other PoE hat without an I2C fan controller.
* PiKVM can be powered using PoE, but it is not recommend to use the official PoE HAT: the old generation [is not compatible with the HDMI bridge](https://github.com/pikvm/pikvm/issues/6). Use any other PoE hat without an I2C fan controller.
* **Don't use random relay modules or random optocouplers!** Some relays or optocouplers may not be sensitive enough for the Raspberry Pi, some others may be low-level controlled. Either use relays that are activated by a high logic level, or follow the design provided and buy an OMRON. See details [here](https://github.com/pikvm/pikvm/issues/13).
@ -258,8 +258,6 @@ Here is a diagram shows that how to connect all of the pieces (click to full siz
**Raspberry Pi Zero (2) W**: This board has two USB micro connectors: one for power supply, the second for emulating a USB OTG device. You need to prevent backpowering as in the RPi4 case. To do this, you need to cut off the red power wire in the OTG wire, or seal the +5v pin in the USB-A connector with electrical tape like this:
<img src="https://raw.githubusercontent.com/pikvm/pikvm/master/img/v2_tape_off.png" alt="drawing" width="300"/>
** REQUIRED ** A full 8 pair CAT5 or a flat Cisco like serial cable is nessessary for the ATX to function properly.
See video how-tos:
* [Making USB Y-splitter cable](https://www.youtube.com/watch?v=uLuBuQUF61o).

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 794 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

@ -0,0 +1,51 @@
1. Connect the USB and HDMI cables to the target host,
check the correctness of the ATX connection if you have made this option.
2. [Flash the memory card with PiKVM OS](https://docs.pikvm.org/flashing_os){target=_blank}
and insert it to Raspberry Pi.
3. Turn on PiKVM using a power supply. Wait ~5 minutes.
Do not turn off the device until it's fully booted for the first time.
4. **Carefully read and follow [the "First steps" guide](first_steps.md){target=_blank}** -
how to find PiKVM on the network, how to log in there, change passwords, and so on.<br>
**Follow the steps described there and come back to this page.**
5. ??? note "Note for the HDMI-USB dongle"
Many USB video capture devices tell the server's video card that the HDMI cable is supposedly disconnected.
This may lead to the fact that if you boot the server without an active stream, the server will not detect
your capture card. This is easy to fix:
* Switch filesystem to RW-mode:
```console
[root@pikvm ~]# rw
```
* Edit file `/etc/kvmd/override.yaml` and add these lines:
```yaml
kvmd:
streamer:
forever: true
cmd_append: [--slowdown]
```
* Finish:
```console
[root@pikvm ~]# ro
[root@pikvm ~]# systemctl restart kvmd
```
6. **Just reminding again:**
{!_passwd.md!}
7. **Try to manage the computer using PiKVM with the Web Interface.**<br>
Make sure that you get an image and both keyboard and mouse are working.
If something doesn't work, check out our [FAQ](faq.md) (it's really useful).
If nothing helped, you can get support in our [Discord chat](https://discord.gg/bpmXfz5).
8. Configure access to PiKVM from the Internet using [port forwarding](https://docs.pikvm.org/port_forwarding)
or [Tailscale VPN](https://docs.pikvm.org/tailscale), if you need it.
9. Explore the features of PiKVM using the site's table of contents and have fun!

@ -0,0 +1,15 @@
With this part, you will be able to remotely turn on, turn off and restart your computer!
* *x4* [MOSFET relays OMRON G3VM-61A1](https://www.digikey.com/products/en?keywords=G3VM-61A1).<br>
*Don't use random relay modules or random optocouplers! Some of these may not be sensitive enough
for the Raspberry Pi, some others may be low-level controlled. Either use relays that are activated by a high logic level,
or follow the design provided and buy an OMRON. See details [here](https://github.com/pikvm/pikvm/issues/13).*
* *x4* 390 Ohm resistors (see [here](https://github.com/pikvm/pikvm/issues/46) for alternatives).
* *2x* 4.7 kOhm resistors.
* *x10+* dupont wires male-male.
* *x1* a breadboard.
* *various* wires for the breadboard.
This can be partially replaced by using [Wake-on-LAN](wol.md) in the software, but it will not allow
to reboot a hung system, and it is not as reliable as an ATX controller. Sometimes the Wake-on-LAN
on the host just stops working, for its own or network reasons.

@ -0,0 +1,4 @@
* *x1* [Raspberry Pi Pico board](https://www.raspberrypi.com/products/raspberry-pi-pico/) with soldered pins.
* *x1* USB-A to Micro-USB cable.
* *x10* dupont wires female-female.
* *x1* 1N5819 diode. It's optional but strongly recommended. Any similar one will do.

@ -0,0 +1,17 @@
Insert the flexible flat cable of the HDMI-CSI bridge into the narrow white connector on the Raspberry Pi
(the closest one to big USB sockets). It is labeled `CAMERA`. To insert you need to open the connector first.
On the Raspberry Pi side you can gently lift the black part up and a little bit sideways:
| Opening the MIPI CSI slot on the Raspberry Pi |
|-----------------------------------------------|
| <img src="../_diy/open_mipi_csi.jpg" width="500"> |
For the HDMI-CSI bridge this operation depends on the version you bought.
Either pull it gently up as on the Raspberry or push it sideways.
Make sure that the cable is inserted on the correct side and until it stops, and then push the black latch back.
Never connect or disconnect the flat cable from a powered device. This is not Plug-and-Play, and you can damage it.
Also use only the cable that was included with the device package, or make sure that the third-party cable has the correct pinout.
| HDMI-CSI bridge connected to Raspberry Pi 4 |
|---------------------------------------------|
| <img src="../_diy/rpi4_csi_connection.jpg" width="500"> |

@ -0,0 +1,10 @@
Connect USB dongle to exactly this port. It is bound in the software so the OS does not confuse the video device with something else.
| Raspberry Pi 2 and 3 | Raspberry Pi 4 |
|----------------------|----------------|
| <img src="../_diy/usbcap_rpi2.jpg" width="200"/> | <img src="../_diy/usbcap_rpi4.jpg" width="200"/> |
There are many revisions of the Raspberry Pi boards and you may come across one that we haven't tested.
If the binding fails, the device will be available for all ports.
Everything will work, but if you use a webcam and Linux mistakes it for a dongle,
[write to us](https://discord.gg/bpmXfz5) and we will fix it.

@ -1,18 +1,18 @@
# Building the OS
# Building PiKVM OS
!!! warning "ZeroW reached End-Of-Life and is no longer supported, the last image it can be found [here](https://files.pikvm.org/images/v2-hdmi-zerow-latest.img.xz)"
The PiKVM OS is based on Arch Linux ARM and contains all the required packages and configs for it to work. To build the OS you will need x86_64 Linux machine with:
The assembly of PiKVM OS is carried out using a special build environment.
Here the minimum required for its use, imposed on the build machine:
* kernel >= 5.8
* glibc >= 2.33
* docker >= 19.03.13
* git
Docker must be enabled in privileged mode.
Docker must work in privileged mode.
1. When starting with a clean OS you need to install and configure docker (after adding your user to the docker group you must log out and log back in), as well as git and make. An example for Ubuntu:
1. When starting with a clean OS you need to install and configure Docker. An example for Ubuntu:
```shell
```console
[user@localhost ~]$ sudo apt-get install git make curl binutils -y
[user@localhost ~]$ sudo apt-get install docker.io
[user@localhost ~]$ sudo usermod -aG docker $USER
@ -20,16 +20,21 @@ Docker must be enabled in privileged mode.
Re-login to apply the changes.
2. Git checkout the build toolchain:
2. Checkout the build environment:
```shell
```console
[user@localhost ~]$ git clone --depth=1 https://github.com/pikvm/os
[user@localhost ~]$ cd os
```
3. Determine the target hardware configuration (platform):
3. Determine the target board and platform:
* Choose the board:
* `BOARD=rpi4` for Raspberry Pi 4.
* `BOARD=zero2w`
* `BOARD=rpi3`
* `BOARD=rpi2`
* Choose the board: `BOARD=rpi4` for Raspberry Pi 4 or `BOARD=zerow`, `BOARD=rpi2`, `BOARD=rpi3` for other options.
* Choose the platform:
* `PLATFORM=v4mini-hdmi` for PiKVM V4 Mini.
* `PLATFORM=v4plus-hdmi` for PiKVM V4 Plus.
@ -38,63 +43,50 @@ Docker must be enabled in privileged mode.
* `PLATFORM=v2-hdmiusb` for RPi4 with HDMI-USB dongle.
* `PLATFORM=v0-hdmi` for RPi2 or 3b+ with HDMI-CSI bridge and Arduino HID.
* `PLATFORM=v0-hdmiusb` for RPi2 or 3b+ with HDMI-USB dongle and Arduino HID.
* Other options are for legacy or specialized PiKVM boards (WIP).
4. Create the config file `config.mk` for the target system. You must specify the path to the SD card on your local computer (this will be used to format and install the system) and the version of your Raspberry Pi and platform. You can change other parameters as you wish. Please note: if your password contains the # character, you must escape it using a backslash like `ROOT_PASSWD = pass\#word`.
!!! warning "In any case, do **not** use the default passwords. In order to generate a random password just use following command:" ```printf '%s\n' $(head /dev/urandom | LC_ALL=C tr -dc A-Za-z0-9 | head -c16)```
4. Create the build config file `config.mk` for the target system and and the `BOARD` and `PLATFORM` variables.
You can also set some other parameters as you wish (see below).
Please note: if your password contains the # character, you must escape it using a backslash like `ROOT_PASSWD = pass\#word`.
```Makefile
[user@localhost os]$ cat config.mk
# rpi4 for Raspberry Pi 4; rpi3 for Raspberry Pi 3; rpi2 for the version 2, zero2w for Zero2W
```bash
# Base board
BOARD = rpi4
# Hardware configuration
PLATFORM = v2-hdmi
# Target hostname
HOSTNAME = pikvm
# ru_RU, etc. UTF-8 only
LOCALE = en_US
# See /usr/share/zoneinfo
TIMEZONE = Europe/Moscow
TIMEZONE = Europe/Nicosia
# For SSH root user
ROOT_PASSWD = root
# Web UI credentials: user=admin, password=<this>
WEBUI_ADMIN_PASSWD = admin
# IPMI credentials: user=admin, password=<this>
IPMI_ADMIN_PASSWD = admin
# SD card device
# (Used for burning the image with `make install`. Irrelevant if you only use `make image`.)
CARD = /dev/mmcblk0
ROOT_PASSWD = rootpass
# Web UI credentials: user=admin, password=adminpass
WEBUI_ADMIN_PASSWD = adminpass
# IPMI credentials: user=admin, password=adminpass
IPMI_ADMIN_PASSWD = adminpass
```
4. Build the OS. It may take about one hour depending on your Internet connection:
4. Build the OS. It may take about one hour depending on the Internet connection:
```shell
```console
[user@localhost os]$ make os
```
!!! warning "If you get an error about failing to retrieving a file, please edit the Makefile and remove "de3." from the repo path"
5. One of two actions:
* Put SD card into card reader and install OS (**you should disable automounting beforehand**: `systemctl stop udisk2` or something like that):
```shell
[user@localhost os]$ make install
```
!!! tip
If you get an error about failing to retrieving a file, please edit the Makefile and remove `de3.` from the repo URL.
* Or make the image only. You can then later burn it on an SD card (e.g. using the Raspberry Pi Imager, see article [Flashing the OS image](https://docs.pikvm.org/flashing_os/#flash-the-image)):
5. Create an image. It will be stored in the `images` directory as a file with `*.img` extension:
```shell
[user@localhost os]$ make image
```
```console
[user@localhost os]$ make image
```
Image is then available as [xz](https://linux.die.net/man/1/xz) compressed file in `images/`.
!!! note "On a system where `sudo` is unavailable, you can use `make SUDO= image`."
6. [Flash the result image to SD card](flashing_os.md#flashing-the-image).

@ -1,42 +1,23 @@
# First steps
!!! note
Before this guide:
!!! note "Before this guide"
* V4 device: please follow this [first](v4.md)
* V3 HAT/Pre-Assembled: follow [this](v3.md)
* V0-V2 DIY: follow [this](https://github.com/pikvm/pikvm)
* PiKVM V4 device: please follow this [first](v4.md)
* PiKVM V3 HAT/Pre-Assembled: follow [this](v3.md)
* DIY V0-V2: follow [this](https://github.com/pikvm/pikvm)
-----
## First power on
??? example "Optional setting up Wi-Fi"
!!! warning "Please read the following caveats"
1. There is nothing more reliable than wired Ethernet, so it's better to use the **cable**. But who are we to stop you... :)
2. Adding FIRSTBOOT=1 or FIRSTBOOT=1 will erase the msd partition, if used afterwords as a means of switching wifi networks, do not include this option. Instead, use different supplicant files for each wifi SSID, mv files to the supplicant dir as needed and reboot.
3. `pikvm.txt` will be removed once its been used. You will need to recreate it again if you did not provide the correct info
4. Use WPA2, if still not able to connect, check if your router is set for WPA3 only, an easy fix is to set your router to WPA2.
1. Optional: [setting up Wi-Fi](on_boot_config.md) before booting.<br>
*There is nothing more reliable than wired Ethernet, so it's better to use a cable.*
If you want to connect PiKVM to a Wi-Fi network, you need to tell the device ESSID and password before first boot.
To do this, mount the first partition of the memory card (FAT32) and edit or make the `pikvm.txt` file there.
Do not remove line `FIRSTBOOT=1` or `FIRST_BOOT-1` for first time booting, just add your wifi settings like this:
2. Power up the device.
```
FIRSTBOOT=1
WIFI_ESSID='mynet'
WIFI_PASSWD='p@s$$w0rd'
```
There is a possibility that, in countries that support CH13, the device will not connect.
You will need to configure your router to disable channels 12-14 or disable Auto scan mode so it will connect.
Save, unmount and follow the next step.
**Power up the device.**
!!! warning "Do not turn off the device until it's fully booted for the first time"
After turning on the power, PiKVM OS will generate unique SSH keys and certificates and will perform all necessary operations on the memory card.
3. Do not turn off the device until it's fully booted for the first time.<br>
*After turning on the power, PiKVM OS will generate unique SSH keys and certificates
and perform all necessary operations on the memory card.*
-----

@ -1,48 +1,67 @@
# Flashing the OS image
# Flashing PiKVM OS image
!!! warning "Micro-SD Card Requirements"
* Minimum **16 Gb**
* **Class 10** is strongly recommended
Minimum **16 Gb, Class 10** recommended
-----
## Download the image
Download the appropriate SD card image. Select it based on the board, platform, and the video capture device you are using:
Download the appropriate SD card image. Select it based on the board, platform, and the video capture device you are using.
* **PiKVM V4**
* [PiKVM V4 Mini](https://files.pikvm.org/images/v4mini-hdmi-rpi4-latest.img.xz) <sub>- [*sha1*](https://files.pikvm.org/images/v4mini-hdmi-rpi4-latest.img.xz.sha1)
* [PiKVM V4 Plus](https://files.pikvm.org/images/v4plus-hdmi-rpi4-latest.img.xz) <sub>- [*sha1*](https://files.pikvm.org/images/v4plus-hdmi-rpi4-latest.img.xz.sha1)
* **PiKVM V3**
* [PiKVM V3 HAT BOX Image (Raspberry Pi 4) OLED/FAN preactivated](https://files.pikvm.org/images/v3-hdmi-rpi4-box-latest.img.xz) <sub>- [*sha1*](https://files.pikvm.org/images/v3-hdmi-rpi4-box-latest.img.xz.sha1)
* [PiKVM V3 HAT DIY Assembly (Raspberry Pi 4)](https://files.pikvm.org/images/v3-hdmi-rpi4-latest.img.xz) <sub>- [*sha1*](https://files.pikvm.org/images/v3-hdmi-rpi4-latest.img.xz.sha1)</sub>
* **DIY - Raspberry Pi 4, V2 platform:**
* [For HDMI-CSI bridge](https://files.pikvm.org/images/v2-hdmi-rpi4-latest.img.xz) <sub>- [*sha1*](https://files.pikvm.org/images/v2-hdmi-rpi4-latest.img.xz.sha1)</sub>
* [For HDMI-USB dongle](https://files.pikvm.org/images/v2-hdmiusb-rpi4-latest.img.xz) <sub>- [*sha1*](https://files.pikvm.org/images/v2-hdmiusb-rpi4-latest.img.xz.sha1)</sub>
* **DIY - Raspberry Pi Zero 2 W, V2 platform:**
* [For HDMI-CSI bridge](https://files.pikvm.org/images/v2-hdmi-zero2w-latest.img.xz) <sub>- [*sha1*](https://files.pikvm.org/images/v2-hdmi-zero2w-latest.img.xz.sha1)</sub>
* **DIY - Raspberry Pi Zero W (legacy), V2 platform:**
* Due to upstream EOL'ing this device and due to using very old unsecure kernals, we are no longer offering this as an option, please join [Discord](https://discord.gg/bpmXfz5) and ask about this in #unofficial_ports channel
!!! abstract "Official PiKVM Devices"
Pre-compiled images are only available for the Raspberry Pi 4 and Zero (2) W. For all other cases, you will need to build the operating system yourself. But don't worry, it's [very simple](building_os.md).
These images are not suitable for DIY and are intended only for our branded devices.
* **PiKVM V4**
* [PiKVM V4 Mini](https://files.pikvm.org/images/v4mini-hdmi-rpi4-latest.img.xz)
<sub>- [*sha1*](https://files.pikvm.org/images/v4mini-hdmi-rpi4-latest.img.xz.sha1)
* [PiKVM V4 Plus](https://files.pikvm.org/images/v4plus-hdmi-rpi4-latest.img.xz)
<sub>- [*sha1*](https://files.pikvm.org/images/v4plus-hdmi-rpi4-latest.img.xz.sha1)
## Flash the image
* **PiKVM V3**
* [PiKVM V3 HAT BOX Image, OLED/FAN preactivated](https://files.pikvm.org/images/v3-hdmi-rpi4-box-latest.img.xz)
<sub>- [*sha1*](https://files.pikvm.org/images/v3-hdmi-rpi4-box-latest.img.xz.sha1)
* [PiKVM V3 HAT DIY Assembly](https://files.pikvm.org/images/v3-hdmi-rpi4-latest.img.xz)
<sub>- [*sha1*](https://files.pikvm.org/images/v3-hdmi-rpi4-latest.img.xz.sha1)</sub>
!!! abstract "DIY PiKVM V2 Platform"
* **Raspberry Pi 4**
* [For HDMI-CSI bridge](https://files.pikvm.org/images/v2-hdmi-rpi4-latest.img.xz)
<sub>- [*sha1*](https://files.pikvm.org/images/v2-hdmi-rpi4-latest.img.xz.sha1)</sub>
* [For HDMI-USB dongle](https://files.pikvm.org/images/v2-hdmiusb-rpi4-latest.img.xz)
<sub>- [*sha1*](https://files.pikvm.org/images/v2-hdmiusb-rpi4-latest.img.xz.sha1)</sub>
* **Raspberry Pi Zero 2 W**
* [For HDMI-CSI bridge](https://files.pikvm.org/images/v2-hdmi-zero2w-latest.img.xz)
<sub>- [*sha1*](https://files.pikvm.org/images/v2-hdmi-zero2w-latest.img.xz.sha1)</sub>
* **Raspberry Pi Zero W (obsolete)**
* Support has been discontinued due to reaching the End-of-Life of the base board.<br>
Please join [Discord](https://discord.gg/bpmXfz5) and ask about this in #unofficial_ports channel if you still want to use it.
!!! abstract "Any other platforms"
You will need to build the image manually. But don't worry, it's [very simple](building_os.md).
-----
## Flashing the image
!!! tip
Ignore request to format your sd card, this step is not nessessary. Choose the most suitable method for you
After inserting the memory card into your computer, ignore request to format. This is not nessessary.
### Using Linux CLI
Decompress and flash the image. **Be careful when choosing the device path, it may be different on your OS**:
Decompress (if nessessary) and flash the image. **Be careful when choosing the device path, it may be different on your machine**:
```
# xz --decompress v2-hdmi-rpi4-latest.img.xz
# dd if=v2-hdmi-rpi4-latest.img of=/dev/mmcblkX
```console
[user@localhost]$ xz --decompress v2-hdmi-rpi4-latest.img.xz
[user@localhost]$ sudo dd if=v2-hdmi-rpi4-latest.img of=/dev/mmcblkX
```
You can also use `dd_rescue` or `ddrescue`.
!!! warning "Check the advanced settings (CTRL+SHIFT+X), make sure they are blank or the flash will fail"
### Using RPi Imager (Linux, MacOS and Windows)
@ -56,7 +75,10 @@ You can also use `dd_rescue` or `ddrescue`.
<img src="imager-2.jpg" width="400" />
4. After clicking on this item, select the image file (`.img.xz`), then click **CHOOSE STORAGE**:
4. After clicking on this item, select the image file (`*.img` or `*.img.xz`), then click **CHOOSE STORAGE**:
!!! warning
Check the advanced settings (`CTRL+SHIFT+X`), make sure they are blank or the flash will fail.
<img src="imager-3.jpg" width="400" />
@ -69,19 +91,11 @@ You can also use `dd_rescue` or `ddrescue`.
<img src="imager-5.jpg" width="400" />
7. Wait for the process to finish. Get yourself a coffee or do some stretching :)
!!! tip
The process may hang at 99% for a long time, this is okay, just wait for it to complete
The process may hang at 99% for a long time, this is okay, just wait for it to complete.
<img src="imager-6.jpg" width="400" />
8. Remove the memory card after successful completion:
8. Remove the memory card after successful completion. If an error occurs during flashing or booting PiKVM, repeat the process.
If the error persists, use a different card.
<img src="imager-7.jpg" width="400" />
!!! tip
If an error occurs during flashing or booting PiKVM, repeat the process.
!!! warning "If you encounter errors after flashing, reflash or use a different SD card."
When you have completed these steps, please move to the [First Steps doc.](https://docs.pikvm.org/first_steps/)

@ -0,0 +1,102 @@
# On-boot configuration & production deployment
At the first boot, PiKVM generates encryption keys and performs other actions necessary to configure the device.
Some parameters, such as connecting to Wi-Fi, or configuring a static interface for wired Ethernet,
can be easily changed by the user if there is physical access to the memory card.
This is convenient for quick customization of your device before the first use.
All settings are made using a file `pikvm.txt` on the first section of the memory card.
After applying the settings, the file is automatically deleted.
-----
## Setting up Wi-Fi
1. Remove the PiKVM memory card. The device must be turned off.
2. Insert the memory card into the computer and mount the first FAT32 partition.
3. Among the system files you will see the file `pikvm.txt`.
If you haven't enabled PiKVM yet, this file will contain a single line `FIRST_BOOT=1`.
4. To connect to Wi-Fi, you will need an ESSID (network name) and a password. Add this to `pikvm.txt`.
If the file doesn't exists, just create it. Like following:
```bash
WIFI_ESSID='mynet'
WIFI_PASSWD='p@s$$w0rd'
```
Note that backslash in the password should be escaped: `\` should be written as `\\`.
If there was a string `FIRST_BOOT=1` in the file, do not remove it.
This is the trigger needed to initialize the OS at the first boot.
On the contrary, if the file pikvm.txt it was not exist, you should not add this line.
5. Unmount partition and return the memory card to PiKVM.
6. A few things to keep in mind:
* WPA3 is not supported. Enable WPA2 on your router.
* There is a possibility that, in countries that support channel 13, the device will not connect.
You will need to configure your router to disable channels 12-14 or disable Auto scan mode.
-----
## Other available options
A number of other parameters can be applied in the same way as with Wi-Fi.
* `FIRST_BOOT=1`<br>
Triggers initialization of the first OS startup. The following actions are performed:
* Generates unique `/etc/machine-id` for internal systemd machinery.
* Generates unique SSL certificates for HTTPS and VNC.
* Mass Storage image partition is reformatted to fill the available space at the end of SD card (only for V2+).
* Different minor things are performed like fc-cache update.
Note that this option does not reset the OS to factory defaults.
There is no way to do this other than [reflashing](flashing_os.md).
* `ENABLE_OTG_SERIAL=1`<br>
Only for V2+. Enables a virtual serial port on a USB emulator, that can be used to log in
to PiKVM from the target host side. Disabled for security reasons.
* `SSH_PORT=1234`<br>
Changes SSH server port to 1234 instead of 22.
* `ETH_DHCP=1`<br>
Configures Ethernet port for DHCP. This is a default for PiKVM OS.
* `ETH_ADDR=192.168.0.100/24`, `ETH_DNS=8.8.8.8`, `ETH_GW=192.168.0.1`<br>
Configures a static IP on the Ethernet port. Only IPv4 available here. For IPv6 you'll need to change
[systemd configuration files](https://wiki.archlinux.org/title/systemd-networkd) on the live OS.
All three options must be set simultaneously to avoid incorrect configuration.
* `WIFI_ESSID=foo`, `WIFI_REGDOM=bar`<br>
Configures Wi-Fi, described in more detail in previous paragrpah.
Both options must be set simultaneously to avoid incorrect configuration.
* `WIFI_REGDOM=US`<br>
Changes Wi-Fi regulatory domain to the US. Other domains available by
[ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
-----
## Advanced production deployment
For a production environment, it may be important to integrate PiKVM into an existing infrastructure automatically.
Usually, such actions are performed by special scripts written by the administrator.
To run such scripts, PiKVM OS suggests placing them in `pikvm-scripts.d` directory (`/boot/pikvm-scripts.d` on the system itself)
on the same partition next to `pikvm.txt` file.
If `pikvm.txt` exists, all the parameters described there will be applied, and the contents inside `pikvm-scripts.d`
will be checked if this directory exists. Scripts in this directory are run in alphabetical order,
the failure will be ignored, it is assumed that the script author should handle this situation.
If the script needs to reboot the OS, it should create an empty file `/boot/pikvm-reboot.txt`.
The reboot is performed once after all scripts.
In order not to copy scripts manually on each memory card on each PiKVM, it may make sense to build
a custom OS image containing everything you need.

@ -1,35 +1,34 @@
# Raspberry Pi Pico HID
The Pico HID is a part of DIY PiKVM V1 platform that performs keyboard and mouse emulation.
It has excellent compatibility, and by default emulates USB, including two mouse modes: absolute and relative.
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.
Full list of features:
| Feature | Enabled by default |
|---------|--------------------|
| USB Keyboard, absolute & relative mouse | Yes |
| USB Absolute Mouse for Windows 95 | |
| PS/2 Keyboard & mouse | |
| USB Absolute Mouse for Windows 95 | No |
| PS/2 Keyboard & mouse | No |
The scope of the Pico HID is not limited to V1 platform, it can also be used with V2 and even V3 platform,
The scope of the Pico HID is not limited to [V1](v1.md) platform, it can also be used with [V2](v2.md) and even [V3](v3.md) platform,
if you need to emulate a PS/2 keyboard and mouse or use a [legacy multiport KVM switch](https://github.com/pikvm/pikvm/issues/7)
which does not fully support USB standards.
This page explains how to build, connect and use all the features of the Pico HID.
!!! note "KVMD >= 3.241 is required for the Pico HID"
!!! note "Software requirements"
KVMD >= 3.241 is required for the Pico HID.
For new builds, this will be the case, but if you want to use the Pico HID on the old PiKVM, you will need to update OS.
-----
## Making the Pico HID
If you are building the PiKVM V1, then all the necessary components should already be at your fingertips.
If you are making the Pico HID for V2 or V3, then here is all that you will need:
If you are building the [PiKVM V1](v1.md), then all the necessary components should already be at your fingertips.
If you are making the Pico HID for [V2](v2.md) or [V3](v3.md), then here is all that you will need:
* Raspberry Pi Pico board with soldered pins. [An official green board](https://pico.pinout.xyz) is recommended.
* *x1* USB-A to Micro-USB cable.
* *x10* dupont wires female-female.
* Optional: *x1* 1N5819 diode. But any similar one will do.
{!_diy_parts_pico_hid.md!}
!!! tip "Tip for soldering gurus"
If you know how to solder, you can buy the Pico without pins and just solder everything without needig the dupond wires.
@ -92,7 +91,8 @@ Connect all the parts according to this scheme:
<img src="ps2_level_shifter_soldering.png" width="300" />
!!! note "Don't forget to enable PS/2 mode support as described in the next paragraph"
!!! note
Don't forget to enable PS/2 mode support as described in the next paragraph
-----
@ -139,9 +139,9 @@ To upload the firmware to Pico HID, you can use any computer with a USB port.
Connect the Pico HID to the host computer using the USB cable.
If you are building PiKVM V1, no further action with the Pico HID is required.
If you are building PiKVM [V1](v1.md), no further action with the Pico HID is required.
If you are making the Pico HID for V2 or V3, add the following lines to the PiKVM configuration and reboot it:
If you are making the Pico HID for [V2](v2.md) or [V3](v3.md), add the following lines to the PiKVM configuration and reboot it:
* `/boot/config.txt`
```ini
@ -171,7 +171,7 @@ If you are making the Pico HID for V2 or V3, add the following lines to the PiKV
!!! warning
**This section is intended for advanced users of the [legacy Arduino HID](arduino_hid.md).**
It may seem tempting, but **don't to use the Arduino HID for the new PiKVM builds**
It may seem tempting, but **don't to use the Arduino HID for new PiKVM builds**
just because you have it at your fingertips. Connecting and flashing Arduino
is much more time consuming than Pico. In addition, different Arduino board work
with different voltages, they may or may not have SPI (for the Pico, we use SPI to
@ -185,7 +185,7 @@ getting rid of the transistor for the Reset line and the level shifter for RX/TX
??? example "For the Arduino HID over SPI"
Throw away the Reset transistor and level shifter, and follow this guide
from the very beginning, as if you were connecting Pico HID to PiKVM V2 or V3.
from the very beginning, as if you were connecting Pico HID to PiKVM [V2](v2.md) or [V3](v3.md).
??? example "For the classic Serial (UART) HID"
Get rid of the transistor and level shifter, and follow this guide

@ -0,0 +1,64 @@
# DIY PiKVM V1 Instructions
!!! tip "So many choices!"
There are many different options with sub-items, so you can choose what will suit you.<br>
However, we marked the recommended way by sign **`✮ ✮ ✮`**
-----
## Required parts
1. **Raspberry Pi board**:
* **✮ ✮ ✮ [Raspberry Pi 3](https://www.raspberrypi.com/products/raspberry-pi-3-model-b/)**.<br>
* ... or [Raspberry Pi 2](https://www.raspberrypi.com/products/raspberry-pi-3-model-b/).<br>
*Does not support H.264 even with HDMI-CSI bridge.*
2. **MicroSD card minimum 8Gb class 10**.
3. **Video capture device**:
* **✮ ✮ ✮ [HDMI-CSI bridge based on TC358743 chip](https://www.amazon.de/Waveshare-Raspberry-Supports-Backward-Compatible/dp/B092HVP926/)**.<br>
*Supports H.264 video encoding on Raspberry Pi 3, automatic resolution selection and the lowest possible latency.*
* ... or [HDMI-USB dongle](https://www.amazon.com/Capture-Streaming-Broadcasting-Conference-Teaching/dp/B09FLN63B3).<br>
*Only heavy MJPEG video, no resolution detection, big latency compared to HDMI-CSI.
Some users report hardware problems: the dongle may not work in the BIOS or simply stop working after a while.
It's a black box, and no one knows what's inside it. If you have problems with it, it will not be possible to fix them.*
4. **[Official USB-Micro Power Supply](https://www.amazon.com/Capture-Streaming-Broadcasting-Conference-Teaching/dp/B09FLN63B3)**.
5. **The Pico HID Keyboard & mouse emulator**:
{!_diy_parts_pico_hid.md!}
6. **Optional feature: ATX controller**
{!_diy_parts_atx.md!}
7. **Optional feature: VGA video capture**
If you want to capture VGA from your server instead of HDMI, buy the [VGA-to-HDMI converter](https://aliexpress.com/item/3256801728005613.html).
Some converters have issues with not supporting all resolutions and refresh rates.
-----
## Setting up the hardware
1. **Video capture device**:
??? success "✮ ✮ ✮ HDMI-CSI bridge"
{!_diy_setup_video_csi.md!}
??? note "... or HDMI-USB dongle"
{!_diy_setup_video_usb.md!}
2. **[Build the Pico HID Keyboard & Mouse emulator](pico_hid.md)**.
!!! warning "WORK IN PROGRESS"
-----
## First launch and usage
{!_diy_first_launch.md!}

@ -0,0 +1,137 @@
# DIY PiKVM V2 Instructions
!!! tip "So many choices!"
There are many different options with sub-items, so you can choose what will suit you.<br>
However, we marked the recommended way by sign **`✮ ✮ ✮`**
-----
## Required parts
1. **Raspberry Pi board**:
* **✮ ✮ ✮ [Raspberry Pi 4 2Gb](https://www.raspberrypi.com/products/raspberry-pi-4-model-b/)**.<br>
*It makes no sense to buy a Pi 4 with more memory than 2Gb, since PiKVM software uses very few resources.*
* ... or [Raspberry Pi Zero 2 W](https://www.raspberrypi.com/products/raspberry-pi-zero-2-w/).<br>
*Compact and cheap, but not so reliable solution because of lack of the wired Ethernet.*
2. **MicroSD card minimum 16Gb class 10**.
3. **Video capture device**:
* **✮ ✮ ✮ [HDMI-CSI bridge based on TC358743 chip](https://www.amazon.de/Waveshare-Raspberry-Supports-Backward-Compatible/dp/B092HVP926/)**.<br>
*Supports H.264 video encoding, automatic resolution selection and the lowest possible latency.*
* ... or [HDMI-USB dongle](https://www.amazon.com/Capture-Streaming-Broadcasting-Conference-Teaching/dp/B09FLN63B3).<br>
*Only heavy MJPEG video, no resolution detection, big latency compared to HDMI-CSI.
Some users report hardware problems: the dongle may not work in the BIOS or simply stop working after a while.
It's a black box, and no one knows what's inside it. If you have problems with it, it will not be possible to fix them.*
4. **Board-specific: Power supply, USB connectivity, etc.**
??? success "✮ ✮ ✮ Raspberry Pi 4"
On a Raspberry Pi 4 only the USB-C port that receives power is capable of acting as a USB Device.
The other USB ports are capable only of acting as USB Hosts.
Therefore a special cable must be used on the USB power port that it can simultanously act as USB Device
for the target host and receive external power from an power supply.
??? success "✮ ✮ ✮ Variant #1: Power supply + ready-made Y-splitter module"
* *x1* USB-C/Power Splitter Module ([US](https://www.pishop.us/product/usb-c-pwr-splitter/)/[UK](https://www.tindie.com/products/8086net/usb-cpwr-splitter)/[CA](https://www.buyapi.ca/product/usb-c-pwr-splitter/)).
* *x1* USB-C to USB-C cable (male-male) for connecting the Raspberry Pi to the splitter.
* *x1* USB-A to USB-C cable (male-male) for connecting the target host to the splitter.
* *x1* [Official USB-C Power Supply](https://www.raspberrypi.com/products/type-c-power-supply/).
??? note "... or Variant #2: Power supply + Y-splitter based on power blocker"
* *x1* USB-A to USB-A cable (male-male).
* *x1* [USB splitter](https://www.amazon.com/dp/B08C5FWQND).
* *x1* [USB Power Blocker](https://www.amazon.com/gp/product/B092MLT2J3) - Will go into the USB-A end towards the target host.
* *x1* [Official USB-C Power Supply](https://www.raspberrypi.com/products/type-c-power-supply/).
??? note "... or Variant #3: Power supply + DIY Y-splitter for soldering"
* *x1* USB-A to USB-C cable (male-male).
* *x1* Another cable USB-A to *any* (male-*any*).
* *x1* Any 5V 3A power supply with USB-A socket.
??? note "... or Raspberry Pi Zero 2 W"
* *x1* USB-A to USB-Micro cable (male-male).
* *x1* [Raspberry Pi Zero Camera Cable](https://www.amazon.com/Arducam-Raspberry-Camera-Ribbon-Extension/dp/B085RW9K13). *Not compatible with Auvidea B101*.
* *x1* [Official USB-Micro Power Supply](https://www.amazon.com/Capture-Streaming-Broadcasting-Conference-Teaching/dp/B09FLN63B3).
5. **Optional feature: ATX controller**
{!_diy_parts_atx.md!}
6. **Optional feature: VGA video capture**
If you want to capture VGA from your server instead of HDMI, buy the [VGA-to-HDMI converter](https://aliexpress.com/item/3256801728005613.html).
Some converters have issues with not supporting all resolutions and refresh rates.
*Kit parts suitable for assembly are also on [sale in Poland](https://3mdeb.com/shop/open-source-hardware/pikvm/).*
-----
## Setting up the hardware
1. **Video capture device**:
??? success "✮ ✮ ✮ HDMI-CSI bridge"
{!_diy_setup_video_csi.md!}
??? note "... or HDMI-USB dongle"
{!_diy_setup_video_usb.md!}
2. **USB cable and power supply**:
??? success "✮ ✮ ✮ Raspberry Pi 4"
??? success "✮ ✮ ✮ Variant #1: Power supply + ready-made Y-splitter module"
<img src="../_diy/v2_splitter_module.jpg" width=500>
??? note "... or Variant #2: Power supply + Y-splitter based on power blocker"
<img src="../_diy/v2_splitter_cable.jpg" width=500>
??? note "... or Variant #3: Power supply + DIY Y-splitter for soldering"
It is assumed that if you have followed this path, you know how to handle a soldering iron and a multimeter.
The Y-splitter can be soldered from two suitable USB cables. Check the attached diagram.
The appropriate USB pinout(s) can easily be found on Google.
Please note that if you make a Y-cable from two no-name cables, the colors of the wires may not match those shown.
Use a multimeter to make sure the connections are correct.
<img src="../_diy/v2_splitter_soldering.png" width=500>
**Video How-To: [Making a USB Y-splitter cable](https://www.youtube.com/watch?v=uLuBuQUF61o)**
??? note "... or Raspberry Pi Zero 2 W"
This board has two USB micro connectors: one for power supply (marked as `PWR`) and the second for emulating
a USB gadget (marked as `USB`). Both connectors have a common power line, so to prevent Raspberry power from entering
the USB port of the target host, it is required to make a special USB A-to-Micro cable without power line.
One way is to physically cut the power wire inside the USB cable.
An easier way is to stick a piece of duct tape, as shown in this picture:
<img src="../_diy/v2_tape_off.jpg" width=500>
Connect the power supply to the `PWR`, and your magic cable to the `USB`. Use the USB-A of the magic cable
to connect the device to the target host.
3. **Optional feature: ATX control**:
!!! warning "WORK IN PROGRESS"
-----
## First launch and usage
{!_diy_first_launch.md!}

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 KiB

@ -39,7 +39,8 @@ If you have a kit without a metal case, you can use our free 3D printing case dr
??? tip "Video Guide: Step by step with HAT device with or without the 3D-printed case"
![type:video](https://www.youtube.com/embed/-SRL92VJ870)
!!! warning "OLED glass can crack if force is used to install it, please handle with care and rock back and forth on the pins side to install."
!!! warning
OLED glass can crack if force is used to install it, please handle with care and rock back and forth on the pins side to install.
3. **Connect PiKVM** to the computer according to the diagram below:
@ -52,7 +53,9 @@ If you have a kit without a metal case, you can use our free 3D printing case dr
* Connect **Ethernet** to the network and **USB power** to the Raspberry Pi power supply.
4. **Carefully read [the "First steps" guide](first_steps.md){target=_blank}** - how to find a device on the network, how to log in there, change passwords, and so on. **Follow the steps described there and come back to this page**.
4. **Carefully read and follow [the "First steps" guide](first_steps.md){target=_blank}** -
how to find PiKVM on the network, how to log in there, change passwords, and so on.<br>
**Follow the steps described there and come back to this page.**
5. ??? note "If your kit includes the OLED display and/or the fan, you'll need to turn them on (this is only needed for the older V3 image for the HAT, in the box image everything is enabled by default)"
Log in to PiKVM and run these commands:
@ -79,7 +82,10 @@ If you have a kit without a metal case, you can use our free 3D printing case dr
{!_passwd.md!}
8. **Try to manage the computer using PiKVM with the Web Interface.** Make sure that you get an image and both keyboard and mouse are working. If something doesn't work, check out our [FAQ](faq.md) (it's really useful). If nothing helped, you can get support in our [Discord chat](https://discord.gg/bpmXfz5).
8. **Try to manage the computer using PiKVM with the Web Interface.**<br>
Make sure that you get an image and both keyboard and mouse are working.
If something doesn't work, check out our [FAQ](faq.md) (it's really useful).
If nothing helped, you can get support in our [Discord chat](https://discord.gg/bpmXfz5).
9. ??? note "Check the HDMI backpowering problem. ONLY applicable under specific circumstances. NOT getting NO SIGNAL."
Try restarting PiKVM using the `reboot` command executed in the terminal. If PiKVM hangs during boot (you can't get the Web Interface for a long time), then you are faced with this rare problem. **Don't worry, it's easy to fix.** Turn off the PiKVM, disconnect all cables from it, take a close look at the [diagram of its ports and jumpers](#io-ports-and-jumpers), and **remove jumper #14** (it is to the right of the CSI connector). Then you can connect and power up PiKVM again. Now everything will be fine. If you are interested in the technical background, it is described [here](https://www.kickstarter.com/projects/mdevaev/pikvm-v3-hat/posts/3296343). Also, just for information: not a single case of negative consequences from the removal of the jumper has been recorded.
@ -89,7 +95,10 @@ If you have a kit without a metal case, you can use our free 3D printing case dr
11. **You can also try the experimental [audio forwarding](audio.md){target=_blank}**.
12. Explore the features of PiKVM using the site's table of contents and have fun!
12. Configure access to PiKVM from the Internet using [port forwarding](https://docs.pikvm.org/port_forwarding)
or [Tailscale VPN](https://docs.pikvm.org/tailscale), if you need it.
13. Explore the features of PiKVM using the site's table of contents and have fun!
## Video modes
@ -129,7 +138,8 @@ PiKVM V3 supports maximum resolution 1920x1080@50Hz, 60Hz will not work. You can
??? note "GPIO pinout"
!!! warning "Before proceeding, make sure that the mb you are using has normal ATX headers"
!!! warning
Before proceeding, make sure that the mb you are using has normal ATX headers
* **ATX control**
- `power led = GPIO 24` - Used for reading the host power state.

@ -28,11 +28,14 @@
* Use the power supply and turn on PiKVM. The Mini comes with USB-C 5V power supply, and Plus with Barrel 12V. Use the appropriate connector on the **front** side. Please note that Plus can also work from 5V, in this case, do not connect a 12V power supply and don't create a significant power load on USB (external flash sticks, cameras, and so on).
!!! warning "Do not block the ventilation holes on the sides of the device. This is especially important for the V4 Plus, which has an active cooling."
!!! warning
Do not block the ventilation holes on the sides of the device. This is especially important for the V4 Plus, which has an active cooling.
2. Wait until PiKVM starts and shows a greeting on the built-in display. Do not turn off the device until it's fully booted for the first time.
3. **Carefully read [the "First steps" guide](first_steps.md){target=_blank}** - how to find a device on the network, how to log in there, change passwords, and so on. **Follow the steps described there and come back to this page**.
3. **Carefully read and follow [the "First steps" guide](first_steps.md){target=_blank}** -
how to find PiKVM on the network, how to log in there, change passwords, and so on.<br>
**Follow the steps described there and come back to this page.**
4. ??? note "Using Fahrenheit instead of Celsius on the OLED"
```
@ -50,9 +53,15 @@
{!_passwd.md!}
6. **Try to manage the computer using PiKVM with the Web Interface.** Make sure that you get an image and both keyboard and mouse are working. If something doesn't work, check out our [FAQ](faq.md) (it's really useful). If nothing helped, you can get support in our [Discord chat](https://discord.gg/bpmXfz5).
6. **Try to manage the computer using PiKVM with the Web Interface.**<br>
Make sure that you get an image and both keyboard and mouse are working.
If something doesn't work, check out our [FAQ](faq.md) (it's really useful).
If nothing helped, you can get support in our [Discord chat](https://discord.gg/bpmXfz5).
7. Explore the features of PiKVM using the site's table of contents and have fun!
7. Configure access to PiKVM from the Internet using [port forwarding](https://docs.pikvm.org/port_forwarding)
or [Tailscale VPN](https://docs.pikvm.org/tailscale), if you need it.
8. Explore the features of PiKVM using the site's table of contents and have fun!
-----

@ -1,6 +1,6 @@
### Some example wiring setups
# CSI (Geekworm) (Any brand will be the same)
# HDMI-CSI
<img src="csi_wiring.jpg" alt="drawing">
List of items: (WARNING! Links may dissappear or no longer work, this just gives you an idea)
@ -15,7 +15,7 @@ List of items: (WARNING! Links may dissappear or no longer work, this just gives
# Another CSI example using the PCB splitter
<img src="csi_wiring_w_pcb_splitter.jpg" alt="drawing">
# USB
# HDMI-USB
<img src="usb_capture_wiring.jpg" alt="drawing">
# Direct connect to target

@ -94,6 +94,7 @@ nav:
- "IPMI & Redfish integration": ipmi.md
- "Persistent storage": pst.md
- "Prometheus monitoring": prometheus.md
- "Production deployment": on_boot_config.md
- "Development":
- "HTTP API reference": api.md
- "Building PiKVM OS": building_os.md

Loading…
Cancel
Save