FlightAware Discussions

Dump1090-mutability v1.15~dev and RTL-SDR V3 Bias-T Auto Switch-ON

The method posted on the RTL-SDR Blog is applicable to dump1090-fa only.
It does not apply to dump1090-mutability v1.15~dev, as ALL the dump1090-mutability service files (dump1090-mutability.service) are automatically generated by systemd-sysv-generator, and all the changes made by user are overwritten at restart / reboot.

However as the systemd-sysv-generator generates dump1090-mutability.service by reading from file `/etc/init.d/dump1090-mutability, I have added bias-t start and logging script in that file, and it works OK.

STEP-1

Build package rtl_biast

#First installed Packages needed to build and to fulfill dependencies
sudo apt-get install git  
sudo apt-get install cmake   
sudo apt-get install libusb-1.0   

#Now build rtl_biast
git clone https://github.com/rtlsdrblog/rtl_biast   
cd rtl_biast   
mkdir build   
cd build   
cmake ..   
make   


#TEST-1
cd src   
./rtl_biast -b 1   

usb_claim_interface error -6


#TEST-2
sudo systemctl stop dump1090-mutability   

./rtl_biast -b 1   
Found Rafael Micro R820T tuner

STEP-2:

(1) Open file /etc/init.d/dump1090-mutability in editor.

 sudo nano /etc/init.d/dump1090-mutability

(2) In the file opened, scroll down to following portion of code
(You can quickly reach there by pressing Ctrl+w, then typing do_start, then pressing Enter Key).

# Function that starts the daemon/service
#
do_start()
{
        # Return
        #   0 if daemon has been started
        #   1 if daemon was already running
        #   2 if daemon could not be started

(3) Insert following 2 lines

/home/pi/rtl_biast/build/src/rtl_biast -b 1 >> /var/log/biast.log 2>&1
date >> /var/log/biast.log

The lines should be inserted at location shown below:

# Function that starts the daemon/service
#
do_start()
{

/home/pi/rtl_biast/build/src/rtl_biast -b 1 >> /var/log/biast.log 2>&1
date >> /var/log/biast.log

        # Return
        #   0 if daemon has been started
        #   1 if daemon was already running
        #   2 if daemon could not be started

(4) Save file (Ctrl+o) and Close editor (Ctrl+x)

(5) Reload daemon to incorporate changes, then restart dump1090-mutability.

sudo systemctl daemon-reload
sudo systemctl restart dump1090-mutability

Check log

cat /var/log/biast.log
Found Rafael Micro R820T tuner
Tue May  1 14:25:06 EDT 2018

.

Explanation of code:
/home/pi/rtl_biast/build/src/rtl_biast -b 1” switches on the bias t
>> /var/log/biast.log 2>&1” sends output (stdout+stderr) to file /var/log/biast.log
date >> /var/log/biast.log” timestamps the log

.

If you are interested only in switching-on the bias-t, and are not interested in creating biast log, then only one short line (i.e. /home/pi/rtl_biast/build/src/rtl_biast -b 1) need to be added as shown below:

# Function that starts the daemon/service
#

do_start()
{

/home/pi/rtl_biast/build/src/rtl_biast -b 1

        # Return
        #   0 if daemon has been started
        #   1 if daemon was already running
        #   2 if daemon could not be started
4 Likes

Very useful and works excellent. I did as you advice. Had to restart the device and it worked.

BUT I had to change gain settings because just two aircraft showed up. Maybe this will help somebody one day.

bdc

Gain usually needs to be reduced to 20-25 when using this LNA.
With a long cable some more gain might be needed to compensate the losses.

1 Like

This is going to sound very strange but are you sure you have to switch the bias-t on?

I am currently running a 3.7.1 SD card image on a Pi3 B+ with the RTLSDR LNA and V3 stick, and everything is working without me using their bias-t enabling program. I have never been able to explain this. I’ve even emailed the RTLSDR people about it and they couldn’t figure it out either. I think they thought I was crazy or was doing something really wrong. This was even the case when I was running stock Raspbian with the piaware package.

Try it without the bias-t program and see what you get.

It’s indeed hard to believe.

Does anything change when you actually enable the bias-t?
(You could also try disabling the bias-t with the program)

Do you have an external power injector?

This is for dump1090-fa

Enable BiasT on RTL-SDR v3 before Dump-FA/Piaware start

No I do not. Using the program to turn it either on or off has no effect. The LNA remains powered, which is easy to tell with the RTLSDR Blog unit because it has a LED on the board.

I had wondered if the V3 stick was bad because the LNA was getting power no matter what computer I plugged it in to. I was even just plugging it into an iPhone charger, not a computer and the LNA was getting power.

I can’t explain it.

The RTLSDR people actually sent me a replacement, and it did the exact same thing. So I don’t know what’s going on. I don’t know why a simple iPhone charger would make the bias-t active. I don’t know why I don’t need to turn it on when using the 3.7.1 SD card image, but I don’t. The LNA works great though, I have it mounted at the antenna.

Didn’t even know the LNA has an LED, i guess you need to open it to see it?

Sounds like a defect on the RTLSDR dongles to be honest.

For most setups it’s not a problem i guess.
Mine definitely needs to be turned on.

Yes mine has an amber LED on the PCB that lights up when it’s receiving power.

What are you running for OS and PiAware in your setup?

Raspbian Stretch.

Never opened mine so i wouldn’t know. But a comment on their the device page seems to agree :slight_smile:
Curious how much that LED increases power consumption or if it’s necessary for some reason.

I just tried installing the bias-t software again and trying to turn it off. No effect at all. And I know that if the LNA is unpowered you basically can’t receive anything through it.

If you have time could you try the SD card image and see if you still need to turn the bias-t on?

Did you stop dump1090-fa?

Otherwise the device can’t be used by another program.

Anyway i do believe you, just really strange that you would get two dongles with that quirk.

The piaware sd-card image has no such function.
You don’t just want to turn on a bias-t, could damage the dongle if the antenna were to be shorted. So obviously the piaware sd-car doesn’t do that.

Won’t try it because i would need to switch dongles, i’m running an Airspy now.

Just for completeness, could you describe all components from the antenna to the RPi?

I’m not sure how the bias-t is switched on. Maybe some very very very strange interference could activate it? But that shouldn’t happen when it’s just connected to an iphone charger.

Yes I stopped Dump1090. The bias-t enabling program will throw an error if you don’t. I also had to disable some DVB drivers in modprobe.d. So I did all that, tried to turn off the bias-t, but it keeps running. The SD card image doesn’t come with the bias-t software but it’s easily installed, which is what I did. And my setup is as follows.

FlightAware Antenna > RTLSDR LNA > lightning arrestor > V3 stick > Pi 3B+

With a bunch of coax between the LNA, lightning arrestor, and V3 stick

The reason I asked is because there are some DVB drivers in some installs which can enable the bias-t if they get loaded automatically. Which is why I’d be curious for anyone else with a V3 stick running the SD card to see if their bias-t is turned on or not. It can be easily measured with a multimeter at the SMA connector. The bias-t software does not report back if the setting was successful, only that the command was sent. I’m pretty sure the FlightAware antenna is not DC shorted so there could be bias-ts running and people wouldn’t know it.

If bias-t is turned on by default, it will be a disaster for someone using a J-Pole antenna, or a Coaxial Collinear antenna with a shorted top.

Well it could be. There is protection on the V3 stick in case of shorts. I’m just curious why this is happening. The fact that I may have gotten 2 V3 sticks with a defect is just really unlikely. So I’m wondering if there’s something about Raspbian that’s turning the bias-t on without having to run the RTLSDR Blog software.