FlightAware Discussions

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


#1

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


RTL-SDR V3 issues activating bias t
#2

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


#3

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:


#4

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


#5

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


#6

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


#7

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.


#8

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:


#9

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

VMT for your assistance and patience - much appreciated.


#10

OBJ: Your instructions were great. Thank you!

mike


#11

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: https://flightaware.com/adsb/piaware/
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?


#12

What happens if you run the command by hand?


#13

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.


#14

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


#15

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.


#16

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


#17

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 [https://www.rtl-sdr.com/rtl-sdr-blog-v-3-dongles-user-guide/] to the letter.

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

HTH
evangel