I’ve had to set my stack of Pi Zero Ws back up from scratch due to a batch of failed / failing micro SD cards, including my PiAware device. To keep things simple, I created several vanilla Raspberry Pi OS Lite (Bookworm) SD cards to build upon from scratch. All seemed to go without a hitch, except for my PiAware device. After running (sudo apt update && sudo apt upgrade -y) to get the OS up to date, I installed the RTL-SDR drivers for my RTL-SDR v4 USB stick using these steps:
sudo apt update
sudo apt install libusb-1.0-0-dev git cmake
sudo apt install debhelper
git clone GitHub - rtlsdrblog/rtl-sdr-blog: Modified Osmocom drivers with enhancements for RTL-SDR Blog V3 and V4 units.
cd rtl-sdr-blog
sudo dpkg-buildpackage -b --no-sign
cd …
sudo dpkg -i librtlsdr0_*
sudo dpkg -i librtlsdr-dev_*
sudo dpkg -i rtl-sdr_*
Followed by a reboot. I then started following the process for installing PiAware, using the steps on this page: PiAware - dump1090 ADS-B integration with FlightAware - FlightAware
I followed the steps exactly as printed with no deviation. Before rebooting (following the installation of dump1090-fa) I changed my feeder-id to my existing site ID using the following command:
sudo piaware-config feeder-id (my site id)
After rebooting, I noticed my feeder wasn’t showing online on my stats page so I ran (piaware-status) and had the following response:
PiAware master process (piaware) is not running.
PiAware ADS-B client (faup1090) is not running.
PiAware ADS-B UAT client (faup978) is not running (disabled by configuration settings)
PiAware mlat client (fa-mlat-client) is not running.
Local ADS-B receiver (dump1090-fa) is running with pid 574.
dump1090-fa (pid 574) is listening for ES connections on port 30005.
faup1090 is NOT connected to the ADS-B receiver.
piaware is NOT connected to FlightAware.
dump1090 is producing data on localhost:30005.
Your feeder ID is (my site id) (configured at /etc/piaware.conf:9)
I ran (sudo systemctl enable piaware), which completed successfully and rebooted. On reboot, (piaware-status) produces the same response as above. I then ran (sudo systemctl start piaware), which started piaware without issue. My feeder was then showing online and feeding aircraft as normal. I tried another reboot but again, piaware did not start on boot. Again, running (sudo systemctl start piaware) starts piaware without issue. If I run (sudo service piaware status) immediately after a reboot, I get the following response:
× piaware.service - FlightAware ADS-B uploader
Loaded: loaded (/lib/systemd/system/piaware.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Fri 2024-07-19 00:01:57 BST; 3min 43s ago
Duration: 6.547s
Docs: PiAware - ADS-B and MLAT Receiver - FlightAware
Process: 444 ExecStart=/usr/bin/piaware -p /run/piaware/piaware.pid -plainlog -statusfile /run/piaware/status.json (code>
Main PID: 444 (code=exited, status=6)
CPU: 1.963s
Jul 19 00:01:50 PiZeroW1 systemd[1]: Started piaware.service - FlightAware ADS-B uploader.
Jul 19 00:01:57 PiZeroW1 piaware[444]: software failed to determine MAC address of the device. cannot proceed without it.
Jul 19 00:01:57 PiZeroW1 systemd[1]: piaware.service: Main process exited, code=exited, status=6/NOTCONFIGURED
Jul 19 00:01:57 PiZeroW1 systemd[1]: piaware.service: Failed with result ‘exit-code’.
Jul 19 00:01:57 PiZeroW1 systemd[1]: piaware.service: Consumed 1.963s CPU time.
If I then run (sudo service piaware start), the piaware service starts and then running (sudo service piaware status) produces the following response:
● piaware.service - FlightAware ADS-B uploader
Loaded: loaded (/lib/systemd/system/piaware.service; enabled; preset: enabled)
Active: active (running) since Fri 2024-07-19 00:12:49 BST; 6s ago
Docs: PiAware - ADS-B and MLAT Receiver - FlightAware
Main PID: 864 (piaware)
Tasks: 2 (limit: 387)
CPU: 2.838s
CGroup: /system.slice/piaware.service
└─864 /usr/bin/piaware -p /run/piaware/piaware.pid -plainlog -statusfile /run/piaware/status.json
Jul 19 00:12:49 PiZeroW1 systemd[1]: Started piaware.service - FlightAware ADS-B uploader.
Jul 19 00:12:53 PiZeroW1 piaware[864]: creating pidfile /run/piaware/piaware.pid
Jul 19 00:12:53 PiZeroW1 piaware[864]: ****************************************************
Jul 19 00:12:53 PiZeroW1 piaware[864]: piaware version 9.0.1 is running, process ID 864
Jul 19 00:12:53 PiZeroW1 piaware[864]: your system info is: Linux PiZeroW1 6.6.40+ #1784 Tue Jul 16 13:49:51 BST 2024 armv6l>
Jul 19 00:12:54 PiZeroW1 piaware[864]: Connecting to FlightAware adept server at piaware.flightaware.com/1200
Jul 19 00:12:54 PiZeroW1 piaware[864]: Connection with adept server at piaware.flightaware.com/1200 established
After starting the service, the feeder works once again without issue.
TL;DR the issue appears to be that the service cannot determine the MAC address when attempting to start the service on boot, but it determines the MAC address fine when started manually. I don’t even know where to start with this one, any ideas?