Skip to content

Operation Air Raspbian image step by step

Ingmar Jager edited this page Apr 26, 2020 · 4 revisions

Raspbian Image for Operation Air AIROne

Based on 2020-02-13-raspbian-buster.img

See:

Make bootable sd card [MacOS]

Check which disk number the sd card has

diskutil list
# or 
df -h

For example:

/dev/disk2 (external, physical)

Unmount disk

diskutil unmountDisk /dev/disk2

Copy image to sd card

sudo dd bs=1m if=2020-02-13-raspbian-buster.img of=/dev/rdisk2 conv=sync

Make backup of SD card [MacOS]

Unmount disk

diskutil unmountDisk /dev/disk2
sudo dd bs=1m if=/dev/rdisk2 of=airone_wr.img conv=sync

Before first boot

Add wifi info and touch ssh in boot dir (on the sd card in your computer)

At first boot

sudo apt update
sudo apt upgrade

Optional step for virtual on screen keyboard

sudo apt-get install matchbox-keyboard
sudo reboot

Run raspi configurator 'Welcome to Raspberry Pi'

Set location and timezone, but check use English language and US keyboard checkboxes.

In Network Options set hostname to AIROne

Choose a new password (opair2020)

Enable uart (serial) in raspi-config

sudo raspi-config
-> 5. Interfacing Optons
-> P6. Serial
-> No
-> Yes
-> Exit

Install other useful and required utilities

sudo apt install vim git 

Install python3 dependencies

pip3 install matplotlib numpy pyserial crcmod pyyaml gpiozero pygame

Clone python app

git clone https://github.com/OperationAIR/HumanInterface.git
cd HumanInterface

To launch app remote from ssh but on local RPi screen:

export DISPLAY=:0; src/main.py

Auto start app

https://www.freedesktop.org/software/systemd/man/systemd.service.html

  • run install script in scripts directory.

Thihs will copy airone.service to the systemd directory and enable the service. Thhis service will always restart the app after 5 seconds.

Change boot appearance

Replace splash image with custom image (png)

cd /usr/share/plymouth/themes/pix
sudo mv splash.png pix_splash.png
sudo cp ~/Desktop/OperationAIR_800_480.png ./splash.png

Open “/boot/config.txt” as root.

sudo vim /boot/config.txt

Then add below line at the end of the file.

disable_splash=1

/boot/cmdline.txt Original content

console=tty1 root=PARTUUID=ea7d04d6-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles

Change to:

console=tty3 root=PARTUUID=ea7d04d6-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles logo.nologo vt.global_cursor_default=0

Disable auto screen turn off

sudo vim /etc/lightdm/lightdm.conf

Add to [Seat:*] section

# don't sleep the screen
xserver-command=X -s 0 dpms

Hide mouse cursor when inactive

sudo apt install unclutter
sudo vim /etc/xdg/lxsession/LXDE-pi/autostart

# then add the following line:
unclutter -idle 5

Disable bluetooth

NOTE: Don't disable bluetooth like this, It will also disable uart. So just turn it off in the gui. Same for wifi.

In /boot/config.txt add

dtoverlay=disable-bt