How to show gain setting

Gang I have been tuning my primary receiver and the last bit is to get it set to the optimal gain for my area. Right now the process is running with Automatic Gain set at the command line and I can see it cycle the gain setting while I monitor my receiver’s stats based on the stat themselves, I can see a message rate of 600/sec go to 300/sec and then change to 400, 500, etc as the system continues to try different gain settings. What I would like to do is lock it in at the peak and I have no way of showing that setting (that I can see).

When I run:

sudo systemctl status dump1090-fa -l

● dump1090-fa.service - dump1090 ADS-B receiver (FlightAware customization)
   Loaded: loaded (/lib/systemd/system/dump1090-fa.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2018-12-10 11:17:04 EST; 22h ago
     Docs: https://flightaware.com/adsb/piaware/
 Main PID: 422 (dump1090-fa)
   CGroup: /system.slice/dump1090-fa.service
           └─422 /usr/bin/dump1090-fa --device-index 0 --gain -10 --ppm 0 --net-bo-port 30005 --max-range 360 --net --

Dec 10 11:17:04 brain1090 systemd[1]: Started dump1090 ADS-B receiver (FlightAware customization).
Dec 10 11:17:04 brain1090 dump1090-fa[422]: Mon Dec 10 11:17:04 2018 EST  dump1090-fa 3.6.3 starting up.
Dec 10 11:17:05 brain1090 dump1090-fa[422]: rtlsdr: using device #0: Generic RTL2832U (Realtek, RTL2832U, SN 00001000)
Dec 10 11:17:05 brain1090 dump1090-fa[422]: Found Rafael Micro R820T tuner
Dec 10 11:17:05 brain1090 dump1090-fa[422]: rtlsdr: enabling tuner AGC

it does not show me the gain in use at this moment, just the -10 in the command line. So with all that said, is there a way for me to show the setting at any given moment?

That is the line that tells you the gain that is set.
Or rather when you don’t set -10 (AGC) the gain is normally displayed.

I get that but what I am trying to do is find out what gain setting is yielding the best results so that I can set that setting in the configuration instead of AGC. I am monitoring the system and I have seen it go from almost 700 messages/sec to 50 messages/sec then back up to 500 messages/sec in the last hour and not in a gradual way that would indicate less traffic in the area so clearly the tuner is running through settings.

1 Like

AGC when used for ADS-B effectively just ramps up to max gain and sits there (and for obscure reasons the AGC’s “max gain” is slightly higher than what you can manually set). It’s not actually changing the gain in practice. The change in message rate is probably just normal variation (it is very dependent on what the SSRs are doing)

1 Like

Then why the disparate messages/second rate? If I set the gain by establishing it in the config I see a steady reading for hours on end.

1 Like

Doesn’t much matter why your message rate goes up and down, it’s probably not because of AGC.

Just try different gain settings manually.
It’s not that hard.
Or read one of the hundreds of threads on the topic.

Anyway there is no way to tell which gain the AGC is at.

This whole thing should be automated. The network is missing lots of messages because this isn’t auto-tuning to the ideal gain.

AGC is discouraged because, in most cases, it is too slow to react.
These devices were meant for TV reception, where the signal strength doesn’t vary very much.

A few people have report that it works well for them, however, they are in the minority.

@brainstomp

Make RSSI column visible in your SkyView’s Plane table as per instructions below, then click the RSSI column title to sort “High to Low” and “Low to High”.

After sorting “High to Low”, check RSSI column, and if there are too many messages above -3dBFS, reduce gain.

.

1 Like

Ended up running the mod that @abcd567 suggested and running through the gain settings one at a time for 10 minutes each. Ended up at 49.6 with minimal numbers of anything over -3dBFS in the list at a glance. Thanks for the help. Attached is my last 24 hours of rate and DbFS higher than -3.

dump1090-localhost-local_rate-24h

Tuning your settings matters.
Can you tell when I started tinkering with them again?
Next is to change my cable to something ultra low attenuation like LMR400.

That graph package is flawed in regards to >-3dBFS.

Checking in the local map is quite sufficient though in my experience.
(If you want to fix the graph check this post Optimize Gain - which would you chose - #174 by wiedehopf)

Also as you have 2 stations anyway you could choose to set one of them at a gain which would lose you close in aircraft but may capture ones far away better.
Depending on the setup that may not help though if the noise is too strong.
(Increasing gain does not help receiving weaker signals because they drown in noise)

You also need to consider if you are already maxed out due to terrain :wink:

2 Likes

My 2nd station is not really a reliable thing to use for me as it is also a testbed/dev station for other Pi stuff. I just happen to run a second receiver on it with a less than optimal receiver & antenna combo because I can.

I did make the changes to the graphs per your suggestion, let us see what comes from them over the next 24 hours and I’ll adjust as necessary from there.

I also plan to move my primary antenna to a better location over the weekend. My house is an A frame and the antenna is on the side of the A instead of at the peak of the A right now. That combined with a lower attenuation cable should add quite a bit to what I am able to see.

Attached is the compass rose map of my coverage. My antenna is on the South East corner of the house and the A frame is blocking direct views to the west and north west. The antenna move will also get the few trees that are in my vicinity out of the way.

Not strictly correct.
The AGC of the 820T/T2 is controlled by an analogue voltage on Pin 14.
The datasheet says:

Demodulator AGC output voltage range from 0.6V to 2.5V.
(in our case, the demodulator is the RTL chip).

If you were to monitor Pin 14, you can determine the AGC gain.
image

1 Like

Please see page 21

item “4.4 AGC Control”