@ -23,34 +23,6 @@ Stand-alone IP KVM device with web interface with various video capture options
## Before assembling
On the Pi3, flash http://downloads.raspberrypi.org/raspbian_lite/images/raspbian_lite-2017-09-08/. As of this writing you may use the latest Stretch version, however this was the version used successfully.
On the Pi0, flash http://downloads.raspberrypi.org/raspbian_lite/images/raspbian_lite-2017-03-03/. You must use this version for this to work. There aren't really security implications since the Pi0 can only be accessed from a serial session on the Pi3.
Before putting the SD into the Pi0, add this to the end of /boot/config.txt:
```
dtoverlay=dwc2
enable_uart=1
```
Before putting the SD into the Pi3, create a blank file called `SSH` on the boot drive to enable SSH.
Also, if you will be connecting via Wifi, create a file in boot called `wpa_supplicant.conf` that uses unix based line feeds. To ensure that is the case, use `Notepad++` or another editor that allows you to change line feed types (bottom right), or copy the `config.txt` file and rename it. Include the following:
To test the ability to reboot the computer via the relay board, run:
```
/opt/diy-ipmi/Pi3/rebootServer.py
```
Test this script to see if it resets the computer. If you are interested, look in the python script to see the numbers associated with which of the 8 relays you could use for multiple computers.
Next, set up the HTTP server.
```
read -s -p "Password for web IPMI console (user 'ipmi'): " IPMIPASS
echo ""
echo "ipmi:${IPMIPASS}" | sudo tee --append /var/www/ipmipasswd
sudo lighty-enable-mod fastcgi-php
echo '' | sudo tee --append /etc/lighttpd/lighttpd.conf
You should now be able to access the IPMI console at `http://<RaspberryPi3IP>/`. From here you can set up SSL and port forwarding to the device as your situation requires.
## Managing multiple servers
Multiple servers can be managed by using multile USB capture devices (one per server), multiple USB-to-Serial adapters each with their own Pi0 (one per server), and using one of the 8 relays on the relay board as the reset button. Once installed, edit `/etc/ipmi.conf`. The format should be:
```
[My first server]
TTY=/dev/ttyUSB0
VID=/dev/video0
INP=1
PIN=2
[My second server]
TTY=/dev/ttyUSB1
VID=/dev/video1
INP=1
PIN=3
```
- When hooking up multiple TV tuners and USB-to-Serial devices to Pi0s, it is recommended to use a powered USB hub.
- The `INP` field is `1` for s-video or `0` for composite. You can actually use one capture device for two servers by using both inputs.
- The `PIN` value is the pin on the relay board. The valid values are `2`, `3`, `4`, `17`, `27`, `22`, `10`, `9`.
## Tips
If you're using this on a Linux headless machine that's not running X11, it's easier to read the console if things are nice and big. Disabling the video driver is an easy way to accomplish this as it will just default to a generic NTSC or PAL signal. For instance, with an nVidia card, you could follow these directoins: https://askubuntu.com/questions/481414/install-nvidia-driver-instead-of-nouveau
To enable SSL, you need a combined PEM file which can be created by:
To reset the keyboard controller run this on the Pi3:
```
/opt/diy-ipmi/Pi3/resetPi0HID.sh
```
If you get wierd USB errors, make sure your power brick is strong enough and that you're not trying to power the HDMI to S-Video converter via the Pi3.