Airwaves

RF Monitoring in the Ohio Valley

Archive for the ‘Uncategorized’ Category

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 , ,