From time to time I'm taking Raspberry Pi to different places for radiospotting. In remote locations access to electricity and Internet can be limited therefore selfsufficient ADS-B setup with minimal number of components is highly desirable. So far mine has only 5 items:
Such setup allows 4+ hours of active spotting meaning all that time RealADSB app shows aircrafts in 150 miles radius consuming traffic feed transmitted by Raspberry Pi via Wi-Fi. Unfortunately absence of run time clock (RTC) on Pi creates a problem of keeping time on device up-to-date. When Internet is available ntpd can be used to sync the time with external server. Another option is GPS module which using time coming from satellites. Luckily iOS devices equipped with both RTC and GPS. It allows iOS app to ignore timestamps coming from traffic feed and utilize local date/time instead.
Software part consists of Stratux image downloaded from web site. After image was written to microSD card using Etcher and inserted into Raspberry I've started device and almost instantly saw Wi-Fi network with name stratux. So far so good. Stratux provides convenient web UI on http://192.168.10.1 that helps to monitor the system and diagnose the problems. Immediate problem I've experienced is USB stick not detected. It was solved by running command sudo rtl_eeprom -d 0 -s stratux:1090 in terminal, then removing and inserting back the stick and rebooting the Pi. Interestingly it takes more than a minute to get traffic feed on port 30003. After spending some time in ssh I found that Stratux heavily skewed towards GDL90 protocol and starts gen_gdl90 process first. In fact it makes sense since Stratux is intended for pilots with EFB most of which using GDL90 protocol. However it's not ideal for ground based spotting and judging by top output gen_gdl90 process consumes plenty of CPU power. In fact more than any other process in the system. Anyway you can stop right here and connect to Stratux with RealADSB iOS app or your favorite EFB. However if you up to the challenge and want to install adsb_hub for more capabilities such as consistent aircraft tracks and more efficient networking please read further. Just to illustrate the difference on picture below left half shows number of network packets when app using port 30003 and right half when connected to adsb_hub.
Out of the box Stratux OS image doesn't have Java runtime which is prerequisite for adsb_hub and installation requires changes in /etc/network/interfaces file to connect to Wi-Fi access point at home or office and download necessary packages from Internet:
In order to start on boot adsb_hub need to be added to /etc/rc.local file. Run sudo vi /etc/rc.local and insert before exit 0 in the end:
# Auto run adsb_hub
sudo /usr/bin/java -jar /home/pi/realadsb/adsb_hub.jar /home/pi/realadsb/dump1090.json >/dev/null &
All in all not that easy to setup but only need to be done once. For autostart there is another option to create adsb_hub systemd service. Process described pretty well here.