Ultrafeeder and (auto)gain question

Dear reader, please follow my thoughts before I write the question.
Using recent ultrafeeder (docker) since a week, today I switched the main board from Pi3B+ to a Pi3-V1.2. Immediately I got a huge amount of planes, up to 150 nm away from self-soldered λ/4 spider antenna! I’ve been impressed and happy!
The spider is connected to cheap Dexatek DVB-T Dongle with Fitipower FC0013 amp, via 4m of RG58 cable. Antenna is on the roof, cable is fixed at many points.

Up to the replacement, I only saw 10 percent of the planes, most times less than 3 track signals per plane. In rare cases I got some at 30 nm, but 6 nm has been the usual range. So I believed, the Pi3B+ could be kind of broken.

But:
Later the day I rearranged the chaotic cables on my desk, placed head-spreaders on the chips, so I shut down and restarted the Pi3. Boom! Again I got the same worse performance I had with the Pi3B+. WTF happened?
So far I found the “good hours” using a gain of ~ 6dB, while the bad time used to go up to 59 dB. Please see the attached diagram. Via .env / ADSB_SDR_GAIN=6 file I forced the system to use 6 dB again, but no improvement?! Set it back to autogain resulted in 59 dB and still poor performance. Surrounding of my home is low to no other radio transmitters. Living in a village, the only radio is my Pi3 WiFi 2.4 GHz and of course the 2.4+5GHz WiFi AP. It is 10m away from spider antenna. Both WiFi are shielded from antenna by plasterboard, wood and concrete-made roof tiles. FM and DAB+ senders are 12 km away.

So the question is:
What are my tasks to find the root cause of bad signals and extremely increased gain? I do not own any HF equipment. Best I could get would be a 100 MHz scope. No help.

Cheers,
M.

Fitipower FC0013

That cannot tune 1090 properly and sits below it.

You need a rtl based tuner.

2 Likes

Honesty, I expected such reply a bit. But how did it work for half of Saturday? If the FC0013 is not able, the I would expect to fail all times, right?

No, it may see very strong or offset signals. But that equates to next to no range or very few packets/aircraft.

It’s top tunable realistic limit is 1100mhz. Throw in the usual electronic offsets it needs to account for and it’s just too unreliable.

Ok i kinda missed it, the graph doesn’t show the fixed 6 dB gain setting does it?
Can you show the log for readsb starting up for a fixed gain of 6?
I’m curious which tuner it is exactly and if the gain is being set correctly.
These lines are the relevant ones i need to see:

rtlsdr: using device #0: Generic RTL2832U (Realtek, RTL2832U, SN acars)
Found Rafael Micro R820T tuner
rtlsdr: tuner gain set to 15.7 dB

Also can you show the signal + misc graphs for when you manually set the gain to 6.

The screenshot is the last 24h. In the middle you see my 1st attempt to manually set 6 (dB).
I always have https://globe.adsb.fi/ opened in a second window, to compare what my setup is reading and what it is missing.
It was short before midnight. I sit east of HAJ, north of EDVM/ZNO, so nearly no planes in 25 km range, but a dozen in up to …75 km distance. After, say, 30 minutes I switched back to autogain. Then today at 0911 GMT+1 I switched back to 5.9 dB.

Will provide logs with 2nd reply, because the user limit.

How could I access older logs? Ooops, I see /var/log is on tmpfs. So, ultrafeeder dropped it on restarting the container :frowning: we only have today 09:11 o’clock.

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service libseccomp2: starting
s6-rc: info: service 09-rtlsdr-biastee: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service libseccomp2 successfully started
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service startup: starting
[2025-01-26 09:11:45.831][09-rtlsdr-biastee-init] Device type is rtlsdr, checking for bias tee...
[2025-01-26 09:11:45.838][09-rtlsdr-biastee-init] READSB_ENABLE_BIASTEE is not set to either ON or OFF, skipping...
s6-rc: info: service 09-rtlsdr-biastee successfully started
[2025-01-26 09:11:45.911][01-print-container-version] [2025-01-26 09:11:45.911][01-print-container-version] Container Version: 20250108-124855_ab87f52_main, build date 2025-01-08 13:48:55 +0100
[2025-01-26 09:11:46.124][06-range-outline] Using cached HeyWhatsThat Range Outlines for these altitudes (in meters): 499,2999,9999,19998,29998
s6-rc: info: service startup successfully started
s6-rc: info: service timelapse1090: starting
s6-rc: info: service telegraf: starting
s6-rc: info: service tar1090-update: starting
s6-rc: info: service readsb: starting
s6-rc: info: service nginx: starting
s6-rc: info: service mlathub: starting
s6-rc: info: service mlat-client: starting
s6-rc: info: service graphs1090-writeback: starting
s6-rc: info: service collectd: starting
s6-rc: info: service cleanup_globe_history: starting
s6-rc: info: service aggregator-urls: starting
s6-rc: info: service adsbx-stats: starting
s6-rc: info: service timelapse1090 successfully started
s6-rc: info: service telegraf successfully started
s6-rc: info: service tar1090-update successfully started
s6-rc: info: service readsb successfully started
s6-rc: info: service tar1090: starting
s6-rc: info: service autogain: starting
s6-rc: info: service nginx successfully started
s6-rc: info: service mlathub successfully started
s6-rc: info: service mlat-client successfully started
s6-rc: info: service graphs1090-writeback successfully started
s6-rc: info: service collectd successfully started
s6-rc: info: service graphs1090: starting
s6-rc: info: service cleanup_globe_history successfully started
s6-rc: info: service aggregator-urls successfully started
s6-rc: info: service adsbx-stats successfully started
s6-rc: info: service tar1090 successfully started
s6-rc: info: service graphs1090 successfully started
s6-rc: info: service autogain successfully started
s6-rc: info: service legacy-services: starting
[2025-01-26 09:11:46.755][cleanup_globe_history] MAX_GLOBE_HISTORY not set - we will not expire any globe_history files
[2025-01-26 09:11:46.772][mlathub] No MLAT servers have been defined in MLAT_CONFIG and no external sources have been defined in MLATHUB_NET_CONNECTOR - no need to start MLATHUB
274 (process ID) old priority 0, new priority 5
s6-rc: info: service legacy-services successfully started
[2025-01-26 09:11:46.834][mlat-client] Started as an s6 service
[2025-01-26 09:11:46.841][adsbx-stats] AdsbExchange not configured - no stats package needed
[2025-01-26 09:11:46.901][mlat-client] Warning: MLAT_CONFIG not defined - MLAT will be disabled.
[2025-01-26 09:11:46.959][graphs1090] 458 (process ID) old priority 0, new priority 19
[2025-01-26 09:11:47.056][mlat-client] service stopping
[2025-01-26 09:11:47.090][readsb] invoked by: /usr/local/bin/readsb --net --quiet --lat 52.373577 --lon 9.915554 --uuid-file=/run/uuid --write-json=/run/readsb --write-state=/var/globe_history --json-trace-interval=15 --json-reliable=1 --net-json-port=30047 --net-ri-port=30001 --net-ro-port=30002 --net-sbs-port=30003 --net-sbs-in-port=32006 --net-bi-port=30004,30104 --net-bo-port=30005 --net-beast-reduce-out-port=30006 --net-api-port=30152 --heatmap-dir=/var/globe_history --heatmap=15 --net-sbs-reduce --json-location-accuracy=2 --stats-range --net-beast-reduce-interval=0.5 --net-connector=feed.adsb.fi,30004,beast_reduce_plus_out --net-heartbeat=35 --net-ro-interval-beast-reduce=0.12 --db-file=/var/globe_history/tar1090-update/aircraft.csv.gz --db-file-lt --device-type=rtlsdr --gain=5.9 --device=00000991 --ppm=33
[2025-01-26 09:11:47.090][readsb] [2025-01-26 09:11:47.090 CET] readsb starting up.
[2025-01-26 09:11:47.090][readsb] readsb version: 3.14.1645 wiedehopf git: 3efa2b1 (committed: Mon Jan 6 13:51:38 2025 0000)
[2025-01-26 09:11:47.090][readsb] Using lat: 52.373577, lon: 9.915554
[2025-01-26 09:11:47.097][readsb] loading state .....
[2025-01-26 09:11:47.137][readsb] actual range outline, read bytes: 368644
[2025-01-26 09:11:47.139][readsb]  .......... done, loaded 4 aircraft in 0.041 seconds!
[2025-01-26 09:11:47.139][readsb] aircraft table fill: 0.0
[2025-01-26 09:11:47.151][readsb] 30152: API output port                
[2025-01-26 09:11:47.151][readsb] 
[2025-01-26 09:11:47.152][readsb] 30002: Raw TCP output port            
[2025-01-26 09:11:47.152][readsb] 30005: Beast TCP output port          
[2025-01-26 09:11:47.153][readsb] 30006: BeastReduce TCP output port    
[2025-01-26 09:11:47.160][readsb] 30047: Position json output port      
[2025-01-26 09:11:47.162][readsb] 30003: SBS TCP output ALL port        
[2025-01-26 09:11:47.162][readsb] 32006: SBS TCP input MAIN port        
[2025-01-26 09:11:47.162][readsb] 32007: SBS TCP input MLAT port        
[2025-01-26 09:11:47.162][readsb] 32008: SBS TCP input PRIO port        
[2025-01-26 09:11:47.163][readsb] 32009: SBS TCP input JAERO port       
[2025-01-26 09:11:47.163][readsb] 30001: Raw TCP input port             
[2025-01-26 09:11:47.164][readsb] 30004: Beast TCP input port           
[2025-01-26 09:11:47.165][readsb] 30104: Beast TCP input port           
[2025-01-26 09:11:47.200][graphs1090] Generating all graphs
[2025-01-26 09:11:47.236][readsb] rtlsdr: using device #0: Dexatek DK DVB-T Dongle (Logilink VG0002A) (Realtek, DVB-T Dongle, SN 00000991)
[2025-01-26 09:11:47.308][readsb] Detached kernel driver
[2025-01-26 09:11:47.327][readsb] BeastReduce TCP output: Connection established: feed.adsb.fi (65.109.2.208) port 30004
[2025-01-26 09:11:47.557][readsb] Found Fitipower FC0013 tuner
[2025-01-26 09:11:47.623][readsb] rtlsdr: tuner gain set to  5.8 dB
[2025-01-26 09:11:48.605][readsb] Database update in progress!
[2025-01-26 09:11:48.981][readsb] Database update first part took 1.241 seconds!
[2025-01-26 09:11:48.982][readsb] Database update done! (critical part took 0.000 seconds)
[2025-01-26 09:11:51.606][tar1090-update] tar1090 version: 3.14.1702 tar1090-db version: 3.14.1634
[2025-01-26 09:11:51.745][tar1090-update] Using cached HeyWhatsThat Range Outlines for these altitudes (in meters): 499,2999,9999,19998,29998
[2025-01-26 09:11:51.842][tar1090] 1139 (process ID) old priority 0, new priority 19
[2025-01-26 09:11:56.053][collectd] [2025-01-26 09:11:56] plugin_load: plugin "logfile" successfully loaded.
[2025-01-26 09:12:47.245][graphs1090] Done with initial graph generation
[2025-01-26 09:12:03.696][telegraf] 2025-01-26T08:12:03Z I! Loading config: /etc/telegraf/telegraf.d/output.conf
[2025-01-26 09:12:03.703][telegraf] 2025-01-26T08:12:03Z I! Loading config: /etc/telegraf/telegraf.d/readsb_aircraft_json.conf
[2025-01-26 09:12:03.706][telegraf] 2025-01-26T08:12:03Z I! Loading config: /etc/telegraf/telegraf.d/readsb_receiver_json.conf
[2025-01-26 09:12:03.709][telegraf] 2025-01-26T08:12:03Z I! Loading config: /etc/telegraf/telegraf.d/readsb_stats_json.conf
[2025-01-26 09:12:03.712][telegraf] 2025-01-26T08:12:03Z I! Starting Telegraf 1.26.3
[2025-01-26 09:12:03.712][telegraf] 2025-01-26T08:12:03Z I! Available plugins: 235 inputs, 9 aggregators, 27 processors, 22 parsers, 57 outputs, 2 secret-stores
[2025-01-26 09:12:03.712][telegraf] 2025-01-26T08:12:03Z I! Loaded inputs: file (3x)
[2025-01-26 09:12:03.712][telegraf] 2025-01-26T08:12:03Z I! Loaded aggregators: 
[2025-01-26 09:12:03.712][telegraf] 2025-01-26T08:12:03Z I! Loaded processors: converter strings
[2025-01-26 09:12:03.712][telegraf] 2025-01-26T08:12:03Z I! Loaded secretstores: 
[2025-01-26 09:12:03.712][telegraf] 2025-01-26T08:12:03Z I! Loaded outputs: influxdb_v2
[2025-01-26 09:12:03.712][telegraf] 2025-01-26T08:12:03Z I! Tags enabled: host=ultrafeeder
[2025-01-26 09:12:03.712][telegraf] 2025-01-26T08:12:03Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"ultrafeeder", Flush Interval:10s

# ... from here, the following is repeating thousands times, because of a failure in telegraph's certificate store setup:
# this hat nothing to do with the signal problem. Telegraph is using an outdated certificate, somehow.
# When I open https://planes.##redacted##.kg in Firefox and download the certificate, is is indeed for the right A record and with no CNAME.

[2025-01-26 09:12:14.283][telegraf] 2025-01-26T08:12:14Z E! [outputs.influxdb_v2] When writing to [https://planes.##redacted##.kg:46086]: Post "https://planes.##redacted##.kg:46086/api/v2/write?bucket=ads-b&org=Laerm": tls: failed to verify certificate: x509: certificate is valid for megaleise.##redacted##.com, influx.megaleise.##redacted##.com, not planes.##redacted##.kg
[2025-01-26 09:12:14.283][telegraf] 2025-01-26T08:12:14Z E! [agent] Error writing to outputs.influxdb_v2: failed to send metrics to any configured server(s)
[2025-01-26 09:12:23.858][telegraf] 2025-01-26T08:12:23Z E! [outputs.influxdb_v2] When writing to [https://planes.##redacted##.kg:46086]: Post "https://planes.##redacted##.kg:46086/api/v2/write?bucket=ads-b&org=Laerm": tls: failed to verify certificate: x509: certificate is valid for megaleise.##redacted##.com, influx.megaleise.##redacted##.com, not planes.##redacted##.kg
[2025-01-26 09:12:23.858][telegraf] 2025-01-26T08:12:23Z E! [agent] Error writing to outputs.influxdb_v2: failed to send metrics to any configured server(s)
...

(sorry for redacting the DNS names, my security setup is not done so far, it is planned for this night)

I also wondering a little about log entry

rtlsdr: tuner gain set to  5.8 dB

because this setting:

fluglotse@flightradar:/opt/adsb $ grep ADSB .env
ADSB_SDR_SERIAL=00000991
ADSB_SDR_PPM=33
#ADSB_SDR_GAIN=autogain
ADSB_SDR_GAIN=5.9

Not necessarily, if it is very close to its limit the pll could be going out of lock sometimes and you will not receive any signals. On other occasions it might lock and work. Unfortunately the FC0013 doesn’t have a lock indicator for you to check if it is actually locked.

1 Like

It sets the closest available gain setting.
Which apparently is 5.8 for this tuner.

I’m not that familiar with the Fitipower tuners, only know that they don’t work / don’t work well.
But might be as Lawrence says and it’s not stable at that frequency.
Suppose you could try if cooling it better leads to stable reception.
Possibly removing the plastic shell.

I’ve changed the code for
ADSB_SDR_GAIN=auto
(not autogain, that’s legacy)
So you can try that if you want to but i doubt it helps with the issue.
(be sure to docker compose pull and up to get the new container image)

Here is some items that might be useful:
https://github.com/wiedehopf/adsb-wiki/wiki/adsb-receiver-shopping-list

If you don’t mind ordering from aliexpress, this is a good SDR for 1090:
https://aliexpress.com/item/1005005466363998.html

The influx errors are just that, influx errors. Solution for that would just be to disable influx, it’s not a good implementation for an exporter anyhow (or at least i don’t think it is).

docker logs usually drop when the container is recreated, that’s normal unless you change the docker log driver to something like journal.
Anyhow that’s all the log i wanted to see.

I just ordered some hours before your post, this one:
https://de.aliexpress.com/item/1005005952682051.html
hoping it’s the right.

Ok, did it. but the temp was always below 42°C as my medical temperature meter said.

started a new try and replaced the HF-plug with a better one, just to ensure.

I switched back to and repulled from Package docker-adsb-ultrafeeder · GitHub (the one without “telegraf” in the name). At least until I found the storage where telegraf holds the invalid certificates. Seemingly it does not refresh certs if the validity is still in range. Letsencrypt issuing 3 month validity, but my ISP is rotating the IP in a different pattern. So I guess this problem will solve itself within 8 weeks - until then I will map the cert storage to shared folder with Caddy’s certstore.

Finally,
A friend owns another, much bigger DVB-T stick. I’ll inspect if this has a better amplifier the next days.

It’s not specialized for 1090 MHz like the one i linked. (also no LNA builtin)
If it’s a genuine one it’s not bad though.
rtl-sdr com stuff is quality gear.

Now it is failing and restarting every 15s, failing again, …

readsb version: 3.14.1646 wiedehopf git: 2f1e4e0 (committed: Sun Jan 26 09:04:05 2025 0000)
...
[2025-01-26 15:33:05.027][readsb] rtlsdr: using device #0: Dexatek DK DVB-T Dongle (Logilink VG0002A) (Realtek, DVB-T Dongle, SN 00000991)
[2025-01-26 15:33:05.126][readsb] BeastReduce TCP output: Connection established: feed.adsb.fi (65.109.2.208) port 30004
[2025-01-26 15:33:05.271][readsb] Found Fitipower FC0013 tuner
[2025-01-26 15:33:05.322][readsb] FATAL: rtlsdr: error getting tuner gains
[2025-01-26 15:33:05.322][readsb] [2025-01-26 15:33:05.322 CET] sdrOpen() failed, exiting!
[2025-01-26 15:33:05.336][readsb] not saving state: SDR failed
[2025-01-26 15:33:05.338][readsb] [2025-01-26 15:33:05.338 CET] Abnormal exit. uptime:  0d  0h  0m 0.445s

No matter of “auto” or “autogain” or 5.9 (tried all).

That’s my bad, ty for letting me know.
Fixed the code, containers are rebuilding, that will take 15 minutes or so.

I tested the previous change but only with an Rafael tuner.

The code won’t change anything for gain set to 6 anyhow, so that can’t really fix your issue.
Thought at first it was an autogain issue but it seems not to be.

okay, thanks!
I’ll pull around 16:00 GMT and check it again. From this time on only with “ADSB_SDR_GAIN=auto” and only the version without telegraph.

One question - my graduation in EE was looong time ago - “LNA” is for “Low Noise Amp”, right?

And just FIY some background:
we want to export plane distances/trails to an existing local InfluxDB. Reason is to distinguish traffic noise between railways and planes in a second step. The Influx is already connected to a number of DNMS noise sensors from luftdaten.info project. Recently we can not blame the politicans and railroad authorities about noise, without suppressing measurement while planes are crossing less than 10.000 ft away from the microphones.

this just produces errors, it shouldn’t have any impact on readsb functionality.

I feel like you would want to write your own importer for influx with the appropriate data and granularity.
Just run telegraf on the /data/aircraft.json pretty sure that’s what the telegraf in the container does.

1 Like

Is there anything I could support your work a bit better?

Could set up another Pi3, with graphical screen and Kbd, install git, C++ and whatever, so we could test the readsb without waiting for container got built?

If so, please point to a description of minimal setup :wink:

If by chance you would sit in Germany, I could donate + send you one of the USB sticks. Just for fun and research. I have 3 from earlier DVB-T use.

1 Like

Nah ty i don’t want to seriously support Fitipower tuners :slight_smile:

The first change was a good idea because the number of tuner gain settings seems to correlate with the tuner model.
Good enough approximation anyhow.
Just because i don’t know how rtl agc works on the non-standard tuners.
This way it’s never used on the non-standard tuners.

The builds are automated, just takes a bit.

You can always compile readsb yourself. (or run this script: Automatic installation for readsb · wiedehopf/adsb-scripts Wiki · GitHub)
But it’s really not necessary for this, the error was pretty blatant.

You did a great job again!

It is up and running again, Gain = 19.7, got some nearby tracks within minutes.
Performance graphs starting to be good-looking!
So I can continue to rig up the surrounding eco-system.
Supporting the cheap sticks will help me to survive the waiting for the AliExpress shipment :wink:

Thank You very, very much for investigation and support!