2020-03-01 15:36:43 +00:00
2019-11-22 22:24:11 +00:00
2020-03-01 15:36:43 +00:00

Step by step setup guide for pi zero w & uv4l

Image

Download the last stretch image from here:

http://ftp.jaist.ac.jp/pub/raspberrypi/raspbian_lite/images/raspbian_lite-2019-04-09/2019-04-08-raspbian-stretch-lite.zip

And install it on your pi with a program like Etcher

Networking & SSH

Once it's flashed, open the partition that appears and create two new files:

  • ssh (blank)
  • wpa_supplicant.conf

The file ssh can be blank, but the contents of wpa_supplicant.conf should look as follows:

country=UK
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
ssid="WIFI_SSID"
scan_ssid=1
psk="WIFI_PASSWORD"
key_mgmt=WPA-PSK
}

Change the password

Just do eet:

pi@raspberrypi:~ passwd

raspi-config

First, set up the camera, the RAM split and expand the disk with the rpi-config command:

pi@raspberrypi:~ $ sudo raspi-config

First set up camera with option 5:

raspi-config-mainscreen

Then choose P1 Camera:

raspi-config-mainscreen

Then go back to the main screen and choose option 7:

raspi-config-mainscreen

First Expand Filesystem A1:

raspi-config-mainscreen

Then return to option 7 again and choose A3 memory split:

raspi-config-mainscreen

Set this to 128mb and then exit raspi-config. When prompted to restart, select yes - this is to ensure the disk is resized before we updated.

Update the system

First install screen, so that you don't have to worry about a disconnect mid update:

pi@raspberrypi:~ $ sudo apt update && sudo apt install screen -y

Then start screen and update:

pi@raspberrypi:~ $ screen
pi@raspberrypi:~ $ sudo apt upgrade -y

This will take some time...

raspi-config-mainscreen

UV4L Packages

Once updates are complete install uv4l packages.

First, install the gpg key for the repo, so the pi trusts it:

pi@raspberrypi:~ $ curl http://www.linux-projects.org/listing/uv4l_repo/lpkey.asc | sudo apt-key add -
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed  
100 26703  100 26703    0     0   116k      0 --:--:-- --:--:-- --:--:--  116k
OK

Then add the repository to apt sources and use the cat command to check the contents of the file after to confirm:

pi@raspberrypi:~ $ echo -e "\ndeb http://www.linux-projects.org/listing/uv4l_repo/raspbian/stretch stretch main" | sudo tee -a /etc/apt/sources.list

deb http://www.linux-projects.org/listing/uv4l_repo/raspbian/stretch stretch main
pi@raspberrypi:~ $ cat /etc/apt/sources.list
deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi

deb http://www.linux-projects.org/listing/uv4l_repo/raspbian/stretch stretch main
pi@raspberrypi:~ $

Then update the your apt sources and install the uv4l packages:

pi@raspberrypi:~ $ sudo apt update && sudo apt install uv4l uv4l-raspicam uv4l-raspicam-extras -y

Then reboot to autoload kernel modules:

pi@raspberrypi:~ $ sudo reboot
Description
UV4L on Focal Fennec
Readme 231 KiB