Setup for feeding data from my Raspberry Pi to:
- Flightradar24 (ADS-B)
- FlightAware (ADS-B)
- airplanes.live (ADS-B)
- ADSBhub (supporting SafeSky) (ADS-B)
- LiveATC (audio)
Hardware:
- Raspberry Pi 4 Debian Bullseye, arm64
- Mode-S Beast MkII (USB ADS-B receiver)
- CM108 USB sound card with bias voltage removed from mic input (see how to)
- Scanner radio
The Raspberry Pi will be configured to start each feeding service automatically after it boots.
Install Beast Splitter
This tool redistributes the data stream coming from the Mode-S Beast so multiple software can read from it.
- Install git
$ sudo apt-get install -y git
- Download sources
$ git clone https://github.com/flightaware/beast-splitter.git
- Install dependencies
$ sudo apt-get install -y libboost-all-dev debhelper
- Build and install
$ cd beast-splitter $ dpkg-buildpackage -b $ sudo dpkg -i ../beast-splitter_8.2_arm64.deb
- Configure
Set
$ sudo nano /etc/default/beast-splitter
ENABLED="yes"
andOUTPUT_OPTIONS="--listen 30005:R"
# Configuration for beast-splitter. # This is a shell-script fragment. # Lines beginning with "#" are ignored. # Set to "yes" to allow starting beast-splitter with this configuration. ENABLED="yes" # Input options for beast-splitter. # This tells beast-splitter where to read data from. # You should provide one of --net or --serial here INPUT_OPTIONS="--serial /dev/beast" #INPUT_OPTIONS="--net remotehost:remoteport" # Output options for beast-splitter. # This tells beast-splitter where to send output to, # either by establishing an outgoing connection (--connect) # or by accepting inbound connections (--listen) OUTPUT_OPTIONS="--listen 30005:R"
- Restart service
$ sudo systemctl restart beast-splitter
sudo bash -c "$(wget -O - https://raw.githubusercontent.com/abcd567a/piaware-ubuntu-debian-amd64/master/install-piaware.sh)"
Configure:
sudo piaware-config feeder-id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
sudo piaware-config allow-manual-updates yes
sudo piaware-config allow-auto-updates yes
sudo systemctl restart piaware
It should automatically detect the data stream from Beast Splitter. The FlightAware feed should now be up and running.
$ sudo bash -c "$(wget -O - http://repo.feed.flightradar24.com/install_fr24_rpi.sh)"
Important setup steps
Step 1.3 - Would you like to participate in MLAT calculations? (yes/no)$:no
...
Would you like to use autoconfig (*yes*/no)$:no
...
Step 4.1 - Receiver selection:
1 - DVBT Stick (USB)
-----------------------------------------------------
2 - SBS1/SBS1er (USB/Network)
3 - SBS3 (USB/Network)
4 - ModeS Beast (USB/Network)
5 - AVR Compatible (DVBT over network, etc)
6 - microADSB (USB/Network)
Enter your receiver type (1-7)$:4
...
Step 4.2 - Please select connection type:
1 - Network connection
2 - USB directly to this computer
Enter your connection type (1-2)$:1
...
Step 4.3A - Please enter your receiver's IP address/hostname
$:localhost
Step 4.3B - Please enter your receiver's data port number
$:30005
The FlightRadar24 feed should now be up and running.
$ curl -L -o /tmp/feed.sh https://raw.githubusercontent.com/airplanes-live/feed/main/install.sh
$ sudo bash /tmp/feed.sh
See https://airplanes.live/how-to-feed/
$ wget https://opensky-network.org/files/firmware/opensky-feeder_latest_arm64.deb
# Notice: use arm64 instead of armhf when on 64 bit OS
$ sudo dpkg -i opensky-feeder_latest_armhf.deb
See https://opensky-network.org/community/projects/30-dump1090-feeder
Use "SBS" data protocol, port 30003 (requires 30003 output from FR24 feeder).
https://www.adsbhub.org/howtofeed.php
Install Darkice. This software is used for streaming audio to Icecast servers.
$ sudo apt-get install libmp3lame0 libtwolame0
$ sudo apt-get install -y darkice
Create the file /etc/darkice.cfg
(this is the file darkice
reads by default)
[general]
duration = 0
bufferSecs = 5
reconnect = yes
[input]
device = plughw:1,0 # sound device
sampleRate = 44100 # 22050 or 44100
bitsPerSample = 16 # only use 16
channel = 1 # use mono
[icecast2-0]
bitrateMode = cbr
format = mp3
bitrate = 16
server = audio-in.liveatc.net
port = 8010
sampleRate = 22050
lowpass = 3500
mountPoint = ASSIGNED-BY-LIVEATC
password = ASSIGNED-BY-LIVEATC
name = FEED-DESCRIPTION
description = FEED-DESCRIPTION
url = http://www.liveatc.net
genre = ATC
public = no
Create /lib/systemd/system/darkice.service
:
[Unit]
Description=DarkIce live audio streamer
[Service]
Restart=always
RestartSec=3
ExecStart=darkice
ExecStop=/usr/bin/pkill darkice
CPUSchedulingPolicy=fifo
CPUSchedulingPriority=4
[Install]
WantedBy=multi-user.target
Then activate the new service
$ sudo systemctl daemon-reload
$ sudo systemctl enable darkice
$ sudo systemctl start darkice
Darkice should now be streaming to LiveATC. Use alsamixer
to adjust the volume:
$ alsamixer -c 1
List the available audio devices using cat /proc/asound/modules
. This should give an output similar to this:
0 snd_bcm2835
1 snd_usb_audio
2 vc4
3 vc4
Create the file /etc/modprobe.d/alsa-base.conf
and specify which index each audio device should get. Since the Darkice config specifies device = plughw:1,0
the USB sound card should have index 1. Setting vc4 index=-2
ensures that the micro-HDMI outputs are never used as default audio device. More info here.
options snd_bcm2835 index=0
options snd_usb_audio index=1
options vc4 index=-2