Select your language

Raspi1, 3

Upgrade Buster (Debian 10) auf Bookworm (Debian 12).

Aktualisierung des intallierten Systems

sudo apt update
sudo apt upgrade -y
sudo reboot

Ändern der Paketquellen

sudo nano /etc/apt/sources.list

#deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
deb http://raspbian.raspberrypi.org/raspbian/ bookworm main contrib non-free rpi

sudo apt update
sudo apt upgrade
sudo apt dist-upgrade
sudo reboot

--> ssh auf raspi1 nach reboot scheitert.

Quelle: https://raspberrytips.com/update-raspberry-pi-latest-version/

Neuinstallation des OS (Raspi1)

SD durch den RaspberryPi Imager v1.8.1 mit OS "Bookworm 64bit" neu installiert

Setup SD-Karte

Mit dem Programm 'RaspberryPi Imager' auf dem Mac.
Das Programm installiert und modifiziert ein Image auf der Karte:

  • aktivieren von SSH
  • setzen eines Users und Kennworts
  • aktivieren von WLAN mit SSID und Passwort (mi-base)
  • Regionale und Sprach-Settings

Nach Reboot prüfen der Installation:

cat /etc/os-release
sudo raspi-config

Update OS

Aktualisieren der Installation:

sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get dist-upgrade -y
sudo reboot

Konfiguration

Feste IP-Adresse

Beim gemeinsamen Einschalten von Switch und Raspi bekommt dieser keine IP-Konfiguration über DHCP. Deshalb eine optionale feste Adresse hinterlegt:

sudo nano /etc/dhcpcd.conf

Anpassung in dhcpcd.conf:

# It is possible to fall back to a static IP if DHCP fails:
# define static profile
profile static_eth0
static ip_address=192.168.2.xx/24
static routers=192.168.2.x
static domain_name_servers=192.168.2.x 8.8.8.8

# fallback to static profile on eth0
interface eth0
fallback static_eth0

Bash verbessern

nano .bash_aliases

# Aliases
# alias alias_name="command_to_run"# Long format list
alias ll="ls --color=auto -alF" # Print my public IP
alias myip='curl ipinfo.io/ip'

 

Installation Software 

Tools installieren

cd ~
sudo apt-get install bluez-hcidump
sudo apt-get install git

Mosquitto-Client

sudo apt install mosquitto mosquitto-clients
sudo systemctl enable mosquitto

Bluetooth Monitor (AndrewjFreyer)

cd /opt
sudo git clone https://github.com/andrewjfreyer/monitor
cd monitor/
cd /opt/monitor sudo bash monitor.sh

Ausgabe:

cat: .previous_version: No such file or directory
> updated monitor.sh (v. Unknown) -> (v. 0.2.200)...
> warning: monitor.service not installed. Install service? (y/n) y
> mosquitto preferences file created. please customize.
> public MAC address list file created. please customize.
> beacon MAC address list file created. please customize.
Created symlink /etc/systemd/system/multi-user.target.wants/monitor.service → /etc/systemd/system/monitor.service.
Created symlink /etc/systemd/system/network.target.wants/monitor.service → /etc/systemd/system/monitor.service.

Konfiguration:

sudo nano address_blacklist
sudo nano known_static_addresses
sudo nano mqtt_preferences

sudo nano behavior_preferences (Datei war nicht vorhanden)

more /etc/systemd/system/monitor.service
sudo bash monitor.sh -u -x -tdr
sudo systemctl restart monitor.service
more /etc/systemd/system/monitor.service

sudo nano /etc/systemd/system/monitor.service

[Service]
User=root
ExecStartPre=/bin/sleep 20
ExecStart=/bin/bash /opt/monitor/monitor.sh -x -tdr &
WorkingDirectory=/opt/monitor
Restart=always
RestartSec=10

 System-Monitoring Sensoren

 xycyxyc

sudo -s 
cd /opt/
git clone https://github.com/Sennevds/system_sensors
cd system_sensors/
apt-get install python3-dev
apt-get install python3-apt
apt-get install python3-pip

pip3 install -r requirements.txt --> Fehler: error: externally-managed-environment
pip3 install -r requirements.txt --break-system-packages
sudo nano ./src/settings.yaml
nano /etc/systemd/system/system_sensor.service
sudo systemctl enable system_sensor.service
sudo systemctl start system_sensor.service

...