.: RealADSB :.


Stratux

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:

  1. Raspberry Pi 3
  2. RadarBox USB FlightStick
  3. ADS-B 1090 MHz Indoor Antenna
  4. Tylt Portable Battery 5200mAh 5V/1A (+cable)
  5. iPad or iPhone with RealADSB app to see aircrafts on map

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:

  1. Replace iface wlan0 inet static with iface wlan0 inet dhcp in /etc/network/interfaces then reboot
  2. Find ip_of_raspberry and use SSH terminal to connect: ssh pi@ip_of_raspberry, it will ask password which is raspberry by default
  3. Next step is to download adsb_hub package. Command will be wget http://www.realadsb.com/dl/realadsb.zip
  4. Unzip the package using unzip realadsb.zip In case unzip is not found you can install it with command sudo apt-get install unzip
  5. Download Java runtime sudo apt-get install oracle-java8-jdk If some packages reported missing try sudo apt-get update and then repeat installation
  6. Then cd realadsb and run java -jar adsb_hub.jar dump1090.json
  7. Now you can connect from RealADSB iOS app using ip_of_raspberry

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
sleep 5
sudo /usr/bin/java -jar /home/pi/realadsb/adsb_hub.jar /home/pi/realadsb/dump1090.json >/dev/null &

  1. If autostart of adsb_hub after reboot works you can revert changes in /etc/network/interfaces file and reboot one more time
  2. Switch iOS device to stratux Wi-Fi network and use 192.168.10.1 in app to connect

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.