Skip to content

Latest commit

 

History

History

software

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Raspberry Pi Station - Software

WARNING: The Raspberry Pi Station is installed with the Raspberry PI OS 64-bit, which requires a Raspberry PI 3 (or above)

Download and Install the OS

On a workstation/laptop:

# Download
wget https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-11-19/2024-03-19-raspios-bookworm-arm64-lite.img.xz
ln -s 2024-11-19-raspios-bookworm-arm64-lite.img.xz raspios.img.xz
  • Insert the SD card and mark its device identifier (sdX):
# Find the inserted SD card device identifier
sudo dmesg | tail -n 25
# [output]
# ... scsi 12:0:0:0: Direct-Access     Generic  STORAGE DEVICE   0545 PQ: 0 ANSI: 0
# ... sd 12:0:0:0: Attached scsi generic sg6 type 0
# ... sd 12:0:0:0: [sdX] 30619648 512-byte logical blocks: (15.7 GB/14.6 GiB)
# ... sd 12:0:0:0: [sdX] Write Protect is off
# ... sd 12:0:0:0: [sdX] Mode Sense: 0b 00 00 08
# ... sd 12:0:0:0: [sdX] No Caching mode page found
# ... sd 12:0:0:0: [sdX] Assuming drive cache: write through
  • Install the OS on the SD card (/dev/sdX):
# Install the image to the SD card
xzcat raspios.img.xz | sudo dd of=/dev/sdX bs=4M status=progress
# [output]
#2768240640 bytes (2.8 GB, 2.6 GiB) copied, 44.0475 s, 62.8 MB/s

Bootstrap

  • Insert the SD card into the Raspberry Pi and connect both a keyboard and (HDMI) screen to it before switching the power on

  • Switch the power on

  • Follow the firstboot wizard:

    • choose your keyboard layout
    • specify the Raspberry Pi's username and password (e.g. pi/raspberry)
  • Configure the WLAN connection:

# Start the Raspberry Pi configuration utility
sudo raspi-config

# Set the Wireless LAN
# > 1 System Options > S1 Wireless LAN

# Verify an IP address is obtained (via DHCP)
ip addr show dev wlan0
# [output]
#inet 192.168.1.101/24 brd 192.168.1.255 scope global dynamic noprefixroute wlan0
  • Configure the timezone:
# Change the timezone
# (recommended: UTC)
sudo dpkg-reconfigure tzdata

SSH Access

  • Enable and start SSH:
# Enable and start the server
sudo systemctl enable ssh
sudo systemctl start ssh

# Verify the SSH server is enabled and running
sudo systemctl status ssh
# [output]
#ssh.service - OpenBSD Secure Shell server
#  Loaded: loaded (/lib/systemd/system/ssh.service; enabled; preset: enabled)
#  Active: active (running) since ...
## [on your workstation/laptop]

# Create an SSH key-pair (IF YOU DO NOT ALREADY HAVE ONE)
# WARNING: DON'T LOOSE IT! AND DO USE A PASSWORD!
ssh-keygen -t ed25519 -C "$(whoami)@$(hostname -f)"

# Display the SSH (public) key
cat ~/.ssh/id_ed25519.pub
# [output]
#<type>       <key>          <comment>
#ssh-ed25519 AAAAC3NzaC... jane@workstation.example.org

## [on the Pi]

# Add the SSH (public) key to the authorized keys list
mkdir -p /home/pi/.ssh
echo 'ssh-...' \
>> /home/pi/.ssh/authorized_keys

Configuration using Ansible

The rest of the configuration will be carried out with Ansible.

Please see the ad-hoc README to continue.

Power Management using Sleepy Pi

The Sleepy Pi is a power management hat that allows the Pi Station to be powered directly by the external 12Volt power supply and sport advanced power management to optimize its power consumption.

The Sleepy Pi comes from factory with a default program that features only push button power control; it needs to be re-programmed to provide the advanced power management abilities we need.

Please see the ad-hoc README to continue.

Development

Microsoft VS Code

This project includes all settings for thorough Microsoft VS Code integration.

Please make sure to open this directory as the VS Code Workspace Folder (such as to properly "hook" with the .vscode configuration directory).

QEMU-lated Raspberry Pi

The general-purpose QEMU emulator may come handy, should you want to test things out without having the hardware Raspberry Pi at hand.

Please see the ad-hoc README to continue.