This document describes how to install all the required components required to use the services of the underwater camera:
The following actions install and configure the operating system of the Raspberry Pi.
userconf.txt with the content tux:$6$z0X5rMJqkjI1rfzN$Atw1Yz7tK2IThlV7bcrZypekdRM.fUH3I5aDvawax40ydzFhQnOm.q8Az3Q0WH0THnjlqLQAWXZGAwymm5dZF1 in the root folder of the SD-card (“bootfs” partition). This creates a user “tux” with password “xut” (openssl passwd -6 can be used on Linux to create your own password).config.txt:
enable_uart=1 to enable console access via the serial interface (GPIO14 & GPIO15).dtparam=i2c_arm=on to activate the I²C interface for the temperature and humidity sensor (DHT20).camera_auto_detect=1 to camera_auto_detect=0 to manually configure the used camera.dtoverlay=imx462 to load the camera overlay (for other camera sensors another overlay might be required).ssh without content in the root folder of the SD-card.sudo sh -c "echo i2c-dev > /etc/modules-load.d/i2c.conf" to be able to access I²C via files in /dev.sudo apt-get update.sudo apt install i2c-tools to install tools required for I²C communication.sudo apt install nodejs npm to install the JavaScript runtime environment.sudo bash -c 'echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf'./etc/network/interfaces.d/eth0 with the following content:
allow-hotplug eth0
iface eth0 inet static
address 192.168.1.1/24
sudo reboot now to apply all changes.sudo nmcli con down id <ssid> to disconnect.sudo bash -c 'echo "vm.swappiness=0" >> /etc/sysctl.d/swappiness.conf' to avoid using your SD-card as swap space.sudo sh -c "echo \"APT::Periodic::Enable \\\"0\\\";\" > /etc/apt/apt.conf.d/10periodic" to disable periodic update/upgrade./etc/fstab to use virtual memory for /tmp and /var/log. This reduces the load on the system and extends the lifetime of the SD-card.
tmpfs /tmp tmpfs defaults,noswap 0 0
tmpfs /var/log tmpfs defaults,noswap 0 0
sudo timedatectl set-timezone Etc/UTC to set the time zone to UTC.sudo reboot now to apply all changes.The underwater camera consists of four services. Follow the links to their repositories. There you’ll find instructions on how to install them.
To start a service automatically at boot time, the following steps are required:
Create a file with the extension “.service“ in /usr/lib/systemd/system with the following content and adapt “Description” and “ExecStart”:
[Unit]
Description=OctoWatch video service
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=tux
Group=tux
ExecStart=/home/tux/octowatch-videoservice/build/video_service
[Install]
WantedBy =multi-user.target
sudo systemctl daemon-reload to reload the configuration.sudo systemctl enable <service-name> to start the new service at boot (replace sudo reboot now to apply all changes.Raspberry Pi Configuration
I2C on Pi
Raspberry Pi Documentation: About the Camera Modules