FlightAware Discussions

RTL Dongle Gain Question

I run Piaware 1.15 and use dump1090 on a Raspberry Pi B+ board with a RTL Dongle
Airflex 7 coaxial cable (similar to aircell 7) fed to the
Homemade 8element colinear up at about 25 feet
it is working fine as expected, around 4000 planes seen in a day

when I am using the RTL dongle for general receive before I changed it’s use to ADSB, I found too much noise was bought in with the wanted signal, so with this in mind I was wondering whether to play with the gain settings within the dump1090 program, as this seemed to help (using a program called HDSDR) max gain would be something like 50 and i found when putting it down to 42.1 the signal improved, so having it on max gain seemed to overload it.
I see my piaware sets it to max gain!

now a friend of mine who is also a licensed amateur radio operator is building me a filter to filter out the unwanted signals, so that may be a good way to go. a preamp is also on the cards

the question i ask is: can I use a program on the raspberry pi and if so what program? i would like it to monitor the actual adsb signal while i alter the gain within dump1090 parameters so I can set it to it’s optimal gain?

or is the piaware program written to allow the gain to be lowered if too much noise is detected from too much gain?

hope I have explained it as best as I can. So far I am really pleased with its results, I just think it can do that little better, monitoring other local adsb receivers they do over 5000 a day, But i presume this down to the equipment and antenna height?

Many Thanks


Followed your line of thought yesterday… Instead of monitoring i put the RTL stick into the PC and monitored it’s behaviour with SDRSharp. Suspected 900Mhz cell-tower interference but could not prove that. Instead found lots of FM broadcast (even without any antenna). So shielding the dongle might be an idea.

Lower gain settings could indeed provide better results. You can play with that using the “–gain” option in de PROG_ARGS line of
/etc/init.d/fadump1090.sh. For example putting it to auto gain requires:

PROG_ARGS="--quiet --net --net-ro-size 500 --net-ro-rate 5 --net-buffer 5 --gain -10

You could also play with enabling AGC.

--gain <db>              Set gain (default: max gain. Use -10 for auto-gain)
--enable-agc             Enable the Automatic Gain Control (default: off)

As to filters. I just gathered the parts for building this interdigital filter (will post progress somewhere over here). This page offers great reading on the do’s and dont’s. A cavity filter may also do the job since it only needs to handle a small bandwidth and would be easier to tune.

/paul (PA3DSB)

EDIT: corrected location of fadump1090.sh

Thanks for the information, Very Helpful, I shall post my results soon :slight_smile:

Great information, it made a major difference in my reception!

psellati, I wonder what settings you adjusted? and if you would share please?

as for

–gain Set gain (default: max gain. Use -10 for auto-gain)
–enable-agc Enable the Automatic Gain Control (default: off)

can you just add the --gain -10 to the file, or does that rely on --enable-agc being added/enabled??

My feeder is down at the moment as I am rearranging the shack, but hoping to have a play with these settings soon, I am unsure what gain setting is best to use and whether the gain in db is the same as it is in another program IE hdsdr or sharp?

so someone’s settings posted here would be much appreciated to try :slight_smile:



There are two different gain settings in librtlsdr, which those options control

–enable-agc enables the digital AGC within the RTL2832U. In practice I find this is not very helpful (it’s just scaling the data within the digital stage, so there’s no additional information being extracted)
–gain -10 enables the analog AGC in the tuner chip, which has more potential for being useful.
–gain (something else) will disable the analog AGC and directly set the tuner gain to that value in dB (or whatever the tuner supports that is nearby)

With a R820T tuner the tuner gain setting actually controls both the LNA (RF) gain and the mixer gain. You can’t control them independently via librtlsdr.

The analog AGC works best if you have a signal that stays at a particular strength for some time, to give the feedback loop some time to adjust - which doesn’t really hold for 1090MHz signals, as the bursts are very short (around 100us at most) and you will be getting a large range of signal strengths.

Personally I run with --gain 48 - one notch down from max gain on a R820T. Max gain (the default) seems to add a disproportionate amount of noise. For strong/close signals or with an amplified antenna you might want a lower gain to avoid clipping in the ADC stage.

Newbie question:
How can i measure the signals received by my RT dongle and the RPi?
Any suggestions of programs or do I need a different equipment?



using the “–gain” option in de PROG_ARGS line of


Example: PROG_ARGS="–quiet --net --net-ro-size 500 --net-ro-rate 5 --net-buffer 5 --gain -10

I enabled the AGC and I am receiving 200+NM with the same antenna and configuration.


–gain , Set gain (default: max gain. Use -10 for auto-gain)
–enable-agc ,Enable the Automatic Gain Control (default: off)


I have noticed in using the RTL1090 that elevation means everything, even with the stock antenna one can max out the range of 1090MHZ reception (250 NM at most). Being on the 7th floor of a building with sight lines into the next county (one grain elevator a block away being the only barrier), the range of reception is limited only by the frequency itself.

With that, I cannot imagine that a higher gain antenna would result in much more range without an associated higher rate of interference.

People using the Radarcape beast claim up to 330 / 340nm on the FR24 site - but at $600+ they are not in the same ballpark.

330nm would be well below the horizon, it seems unlikely unless there are some odd reception conditions going on or you’ve put the receiver on top of a mountain.

Could someone explain how to do adjust the gain? (for dummies) I am wanting to try it out, but having some issues figuring out how to modify the code.
I tried to

sudo nano /ect/init.d/fadump1090.sh

but the file appears empty…

There was a typo in that command…

etc, not ect


sudo nano /etc/init.d/fadump1090.sh

My apology for the confusion :blush: Original post has been corrected.

I just did this, setting the gain -10 and enable AGC. Results are preliminary but it appears to have added roughly 1/3 to the number of tracks, on a subjective basis. PiAware -debug used to report roughly 250 messages every 5 minutes this time of day, after the tweek I am seeing well over 400, with the mag mount whip antenna cut down to 68mm.

First, SAVE A BACKUP COPY of fadump1090.sh thusly:

pi@piaware cd /etc/init.d //change to appropriate directory pi@piaware /etc/init.d sudo cp fadump1090.sh fadump1090.sh.orig //make a copy of the original file

Make a gain parameters adjustment working file thusly:
pi@piaware /etc/init.d $ sudo cp fadump1090.sh fadump1090.sh.gain_adj // make a gain adjustment working file

Edit the file to add gain tweeks as you wish per thread above:
pi@piaware /etc/init.d $ sudo nano fadump1090.sh.gain_adj // edit the working file to make desired parameter adjustments. Write output to fadump1090.sh.gain_adj

Make your changes active by overwriting the original fadump1090.sh file:
pi@piaware /etc/init.d $ sudo cp fadump1090.sh.gain_adj fadump1090.sh // copy edited file to overwrite original fadump1090.sh (remember you have a backup of this, right?)

Reboot to reload everything:
pi@piaware /etc/init.d $ sudo reboot // reboot the system to use new settings

To see what is currently running for parameters:
After reboot, to confirm parameters:
pi@piaware $ ps -eaf | grep du // look for dump1090 process and observe parameters currently in effect

Note that words after “//” are comments, not commands. If you do this, be CAREFULL and be ready to burn another microSD to get your system back running if need be.

I would only add make a backup of your microSD first.

Good idea, but I am not actually sure how to do this. Maybe the Windows microSD image writer program can copy the working microSD image to a PC’s disk and then write it back out to a different microSD card? That would be my first thing to try to do a backup of the microSD.

I’ve been futzing around with the parameter for fadump1090 since I started logging… i’m running -gain 48 right now. -gain 10 and -autogain performed worse for me. Again, ymmv…

This is what I use on my Windows 8.1 machine to backup and reset SD Card images for my Pi. This is not to be taken as an endorsement, it is just something I found and it has worked so far.