Airwaves

RF Monitoring in the Ohio Valley

Archive for the ‘piaware’ tag

piaware — collecting data from dump1090 and forwarding to remote VRS

leave a comment

I run a piaware instance on an RPI3 here at home. I have a VPS at DigitalOcean running VRS (Virtual Radar Server). I had the need to get the Beast output from Dump1090 forwarded to the VRS box.

modesmixer2 ( from http://xdeco.org ) works perfectly for this task. With one instance of modesmixer2 I can connect to the local beast-output-port of Dump1090-FA on my RPI and then forward that data via an outbound connection to VRS on my VPS at DigitalOcean.

I could set it up so that modesmixer2 automatically starts, but I prefer to start up modesmixer2 manually after the RPI3 has been rebooted. And for this I use screen.

– RPI3 with Dump1090-fa listening for connections on localhost:30005 to output Beast results
– VRS on a remote VPS listening on TCP 30055 for an incoming connection

1. Install screen

sudo apt-get install screen

2. Make the directory for modesmixer2 to live

mkdir /home/pi/modesmixer2; cd /home/pi/modesmixer2

3. Download the RPI3 version modesmixer2 from http://www.xdeco.org

It’s a Google Drive link. So I had to download it to my PC and then upload it to my RPI3.

4. Unarchive the .tgz file into the /home/pi/modesmixer2 directory

5. Run screen with appropriate arguments

screen ./modesmixer2 –inConnect localhost:30005 –outConnect beast:104.###.###.###:30055

(once it is running, press CTRL-A then d to force screen into the background)

If I need to access the screen session later on, I simply type “screen -r”

Written by awadmin

August 14th, 2017 at 11:43 am

Posted in ADSB

Tagged with , , ,

Building rtl_biast on piaware 3.5

leave a comment

You may already have various things installed that I did not. I had to first do this:

sudo apt-get install cmake libusb-1.0.0-dev

Then, as the ‘pi’ user I did the following:

cd
git clone https://github.com/rtlsdrblog/rtl_biast
cd rtl_biast
mkdir build
cd build
cmake ..
make
cd src
./rtl_biast -b 1

When all finished, in /home/pi/rtl_biast/build/src there was rtl_biast

Sure, I could have done an sudo make install but chose not to install rtl_biast to a normal binary location. Instead I made note of its direct path, /home/pi/rtl_biast/build/src/rtl_biast

This FlightAware post provides directions (thanks to OBJ) on how to make rtl_biast fire before dump1090-fa is started so that the amp is enabled.

http://discussions.flightaware.com/post207274.html?hilit=rtl_biast#p207274

Remembering my previous note about where rtl_biast binary was deposited after the cmake, I did this:

sudo mkdir /etc/systemd/system/dump1090-fa.service.d
echo "[Service]" > /home/pi/bias-t.conf
echo "ExecStartPre=/home/pi/rtl_biast/build/src/rtl_biast -b 1" >> /home/pi/bias-t.conf
sudo mv /home/pi/bias-t.conf /etc/systemd/system/dump1090-fa.service.d/

Once you feel you’ve done everything correctly, reboot and then do:

sudo systemctl cat dump1090-fa.service

When you run that, note the output — specifically the last couple of lines. If you do not see the last three lines as shown below, you didn’t set up the ExecStartPre stuff properly.

Unit file of dump1090-fa.service changed on disk. Run ‘systemctl daemon-reload’.
# /lib/systemd/system/dump1090-fa.service
# dump1090-fa service for systemd

[Unit]
Description=dump1090 ADS-B receiver (FlightAware customization)
Documentation=https://flightaware.com/adsb/piaware/
Wants=network.target
After=network.target

[Service]
EnvironmentFile=/etc/default/dump1090-fa
EnvironmentFile=-/var/cache/piaware/location.env
User=dump1090
RuntimeDirectory=dump1090-fa
RuntimeDirectoryMode=0755
ExecStart=/usr/bin/dump1090-fa \
$RECEIVER_OPTIONS $DECODER_OPTIONS $NET_OPTIONS $JSON_OPTIONS $PIAWARE_DUMP1090_LOCATION_OPTIONS \
–write-json /run/dump1090-fa –quiet
Type=simple
Restart=on-failure
RestartSec=30
Nice=-5

[Install]
WantedBy=default.target

# /etc/systemd/system/dump1090-fa.service.d/bias-t.conf
[Service]
ExecStartPre=/home/pi/rtlstuff/rtl_biast/build/src/rtl_biast -b 1

That last three lines [in bold] have to be there. If they aren’t, then you know rtl_biast is not going to be triggered.

If all looks good, I’d recommend just doing a typical reboot of the device, or I suppose you could just restart dump1090-fa.

Written by awadmin

June 2nd, 2017 at 8:19 pm

Posted in Uncategorized

Tagged with , ,