- Got to the download page and retrieve install installXX.img for arm64.
- Flash the install firmware to a USB drive:
sudo dd if=/home/user/Downloads/installXX.img of=/dev/sdb
- Download a current version of the Raspberry Pi 4 UEFI Firmware, then unzip the files:
mkdir /tmp/rpi-firmware unzip Downloads/vXXX.zip -d /tmp/rpi-firmware
- Create a boot partition with at least 20 MB, for example with
parted
:sudo parted /dev/mmcblk0 (parted) mkpart Partition type? primary/extended? primary File system type? [ext2]? fat16 Start? 1M End? 50M (parted) set 1 boot on (parted) quit
- Mount the first partition of the SD card and copy the UEFI firmware:
sudo mount /dev/mmcblk0p1 /mnt sudo cp /tmp/rpi-firmware/* /mnt/
- Edit the
/mnt/config.txt
and disable the WIFI and Bluetooth adapters by adding the following lines:dtoverlay=disable-wifi dtoverlay=disable-bt
- Unmount the SD card:
sudo umount /mnt/
- Plug the SD card and USB drive into the RPi.
- When the UEFI logo appears, hit the ESC key to enter the setup.
- Use the boot options to boot the USB drive. If problems occur, have a look at AshyIsMe/openbsd-rpi4.
- Run the installer and install OpenBSD to suite your needs. The default settings should be fine in most cases.
- If you did overwrite the boot partition during installation, copy the files from
/tmp/rpi-firmware/
into the boot partition again. Don't forget to edit theconfig.txt
. - Go to the UEFI "Boot Maintenance Manager" > "Boot Options" and create a new boot entry with the EFI file.
- Change the boot order to boot the OpenBSD efi file first.
- Attach one UART adapter to each RPi.
- Connect the ground pins of both UART adapters.
- Connect the Tx pin of the sending RPi to the Rx pin of the receiving RPi.
- If you want to physically guarantee that there is no reverse channel, you can add a diode with a pull down or pull up resistor betwen the Tx and Rx pins. Alternatively, an optocoupler can be used to galvanically separate the circuits. Don't forget to disconnect the bluetooth and WLAN antennae.
- Flash the
arduino/arduino.ino
file on the Arduino. - Connect the Arduino via USB to the receiving RPi.
- Set up the power supply for both RPis.
Clone this repo or download the latest .zip file and extract. Then cd
into the directory.
- Copy the rc.d file:
cp ./etc/rc.d/diode_receive /etc/rc.d/
- Edit the device paths in
/etc/rc.d/diode_receive
. If you do not have an Arduino with LCD display connected, remove the--arduino
parameter. - Create the directory to which the received files are written.
- Copy the main program:
cp ./bin/diode_receive /usr/local/bin/
- Enable the service:
rcctl enable diode_receive rcctl start diode_receive
- Copy the rc.d file:
cp ./etc/rc.d/diode_send /etc/rc.d/
- Edit the device paths in
/etc/rc.d/diode_send
. - Create the directory from wich the files are read.
- Copy the main program:
cp ./bin/diode_send /usr/local/bin/
- Enable the service:
rcctl enable diode_send rcctl start diode_send
Transfer some files. If not all they are not appearing on the receiver, there were transmission errors. Reduce the bit rate in the rc.d scripts until you have no transmission errors. Alternatively, improve your hardware setup.