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

I’m trying out a RTL-SDR V3 with a Uputronics filtered LNA which can be powered by BiasT, which the V3 dongle can provide.

However, I am running into a problem switching the BiasT on, as Dump1090-FA/Piaware have grabbed the dongle already and causes the error ‘usb_claim_interface error -6’ when I run the code to turn on the BiasT.

What I really need is to be able to set the BiasT first, then run Dump1090-FA/Piaware etc as normal.

Any of you coding Gurus able to help? I’m sure it’s not too difficult, but beyond my lowly Linux experience :confused:

Running Piaware 3.50 and FR24 add on programs with Raspbian OS.

Thanks in advance for any assistance.

Andy

You could add an ExecStartPre= line to dump1090-fa.service to run whatever you need immediately before dump1090-fa starts

You can either edit /lib/systemd/system/dump1090-fa.service directly - but be aware that your changes will be lost on package upgrade - or create a new file /etc/systemd/system/dump1090-fa.service.d/bias-t.conf that has only the ExecStartPre= line and it will be merged with the service file in /lib

1 Like

Obj, many thanks for your help and suggestions - I would think your 2nd suggestion would be the way to go, but still lost on how to achieve it :cry:

The command I have to start the program is ‘./rtl_biast -b 1’

How would I achieve this, or is it just a case of : ExecStartPre=./rtl_biast -b 1 in a file called bias-t.conf ??

If the above, think even I could achieve that :stuck_out_tongue:

Yes but you will need to provide the full path to rtl_biast

Thanks for the help - will give it a try in a while :smiley:

No joy I’m afraid :frowning:

I created the directory /etc/systemd/system/dump1090-fa.service.d (no dump1090-fa.service.d directory in system) and then in the new directory created the bias-t.conf file with ‘ExecStartPre=/home/pi/rtl_biast/build/src/./rtl_biast -b 1’ as the only line in the file - rebooted and no voltage on the dongle output.

I tried running ‘/home/pi/rtl_biast/build/src/./rtl_biast -b 1’ from the command line and the error message came up as my first post.

I want to place the amp in my attic where the cable comes in, so would be great to get this biast option working.

Any other ideas??

Oh, you might need a [Service] header in the file:



[Service]
ExecStartPre=/home/...


You can check if systemd is picking it up correctly by “sudo systemctl cat dump1090-fa.service”
“sudo systemctl status dump1090-fa” and “sudo journalctl -u dump1090-fa” are also useful for working out what it’s doing.

1 Like

OK will try that cheers - Have had another play and your option 1 is working, but would be nice to get it to survive an update :smiley:

Bingo!!! That got it - putting the [Service] into that config file :slight_smile:

VMT for your assistance and patience - much appreciated.

OBJ: Your instructions were great. Thank you!

mike

Hey Obj, I’m trying to enable this feature but I’m getting an error. I have created the directory /etc/systemd/system/dump1090-fa.service.d. Then I created the file bias-t.conf within that directory. in the bias-t.conf file I have the following:

[Service]
ExecStartPre=/home/pi/rtl-bias-tee/rtl_biast/build/src/rtl_biast -b 1

On reboot, dump1090-fa is not running (webpage is not loading) and "systemctl cat dump1090-fa.service
responds with this:

root@piaware:~# systemctl status dump1090-fa.service
● dump1090-fa.service - dump1090 ADS-B receiver (FlightAware customization)
Loaded: loaded (/lib/systemd/system/dump1090-fa.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/dump1090-fa.service.d
└─bias-t.conf
Active: activating (auto-restart) (Result: exit-code) since Sun 2017-11-05 13:12:47 PST; 10s ago
Docs: PiAware - ADS-B and MLAT Receiver - FlightAware
Process: 713 ExecStartPre=/home/pi/rtl-bias-tee/rtl_biast/build/src/rtl_biast -b 1 (code=exited, status=6)

Nov 05 13:12:47 piaware systemd[1]: dump1090-fa.service: Unit entered failed state.
Nov 05 13:12:47 piaware systemd[1]: dump1090-fa.service: Failed with result ‘exit-code’.

Any thoughts?

What happens if you run the command by hand?

if I issue “sudo service dump1090-fa stop”
then
“/home/pi/rtl-bias-tee/rtl_biast/build/src/rtl_biast -b 1”

it works fine

If I don’t first stop dump1090, I get this error
“usb_claim_interface error -6”

but following a reboot its not working.

Well… I may have had some issues with blacklists… for the hell of it, after I wrote my last reply, I rebooted again just to verify if things were as I said they were. Sure enough, things were now different. Now I was getting this:

Kernel driver is active, or device is claimed by second instance of librtlsdr.
In the first case, please either detach or blacklist the kernel module
(dvb_usb_rtl28xxu), or enable automatic detaching at compile time.

usb_claim_interface error -6

I re-did the modprobe blacklist file, rebooted, and now things are working as expected… I’ll keep an eye on things but for now at least, things seem to be working.

Also, thank you for all that you do on these forums. I get that for the most part you wouldn’t do it if you didn’t like it, but none the less, I for one appreciate all that you do here. Sometimes people forget that there is REALLY a lot of things going on behind the scenes with piaware/dump1090-fa, and everything has to work in unison for things to work at all. All anyone has to do is search the forums and see that you show a greal of patients with all of us… Thank you.

-J

Also, adding the LNA almost doubled my messages/second, I love it. My distance increased, but not by as much as I would have thought.

Well same dongle but working with 1090 mutability, but same error message when trying to turn on bias t, suggestions??

hi jib56

if error is usb_claim_interface error -6 usually has to do with blacklisting the device OR
another app has taken over the device.
if error is by bias T, means you have to run first the bias T and then the decoder (-mutability, -fa etc),
provided that you have followed the tutorial [RTL-SDR Blog V.3. Dongles User Guide] to the letter.

any reboot will reset (turn off) the bias T feature.

HTH
evangel

https://www.rtl-sdr.com/getting-the-v3-bias-tee-to-activate-on-piaware-ads-b-images/

Screenshot below is that of lower part of the following page:
https://www.rtl-sdr.com/getting-the-v3-bias-tee-to-activate-on-piaware-ads-b-images/

The link under “Credits” points to one of the posts in the thread you are browsing now:

I tried to follow the instructions on here today which are based on this thread I understand:
https://www.rtl-sdr.com/getting-the-v3-bias-tee-to-activate-on-piaware-ads-b-images/

Thank you for the information and for most part it worked, but I had to do one more thing at the end:

sudo systemctl daemon-reload

Without that the service would not start but complained that the service had “changed on disk”. After issuing that command (which came up as an instruction included in the error message), the service started and bias-t was enabled and working.

I am not using the Piaware image, just the light Raspian image and following the instructions here to install dump1090-fa: