i would like to rename the exectables. Please share your opinion.
Yes, I think it makes sense.
Really love the performance of this decoder. Thanks for sharing!
Since yesterday it stops working always after a few seconds with output like this:
11:56:05.689 [Watchdog] Sample drop: ~6862 IQ pairs (~2.85917 ms of stream) lost; cumulative deficit ~88 IQ pairs.
11:56:09.890 [Watchdog] Sample drop: ~7079 IQ pairs (~2.94958 ms of stream) lost; cumulative deficit ~7200 IQ pairs.
11:56:09.890 [Watchdog] 2 sample drops in the last 60 s (threshold: more than 1). The host cannot sustain this sample rate. Initiating shutd
11:56:10.090 [Watchdog] Sample drops during this run: 2 event (s), worst gap ~7461 IQ pairs.
Any idea how to resolve? Restarting the Raspberry did not help. Even compiling latest version of stream1090 did not.
it‘s an Raspberry 5 with SSD and lots of CPU headroom. Issue is the same with 2.4 and 2.56 Msps sample rate.
Did run stable for a few weeks before.
Hi, that’s interesting and it’s due to a recent addition to stream1090: Sample-drop monitor: make USB/FIFO sample loss visible and bounded by enricolorenzoni59 · Pull Request #74 · mgrone/stream1090 · GitHub
Can you confirm which model of RTL-SDR you are using?
How are you starting stream1090?
Can you try this env var and see if it helps? STREAM1090_MAX_DROPS_PER_MIN=0
Can you run this for a few seconds and see if you observe any “dropped sample” message? rtl_test -s 2400000
Can you check if your PPM is quite far from 0? rtl_test -p
Thanks!
Enrico
Hi,
I’m using an FlightAware Pro Stick Plus v1.0 (the blue one including the 1090 MHz filter). Maybe relevant: It’s connected via an USB extension cable of 3 meters length to the Raspberry Pi.
I’m starting it via SSH and the following command:
nohup /home/pi/stream1090/build/stream1090 -s 2.56 -u 12 -q -d /home/pi/stream1090/configs/rtlsdr.ini | socat -u - TCP4:localhost:30001 &
I’ll try the given env var setting.
rtl_test -s 2400000 is showing “lost at least 52 bytes” direct after starting. Same with rtl_test -s 2560000: “lost at least 32 bytes”. But then it seems to be stable.
rtl_test -p indicating a cumulative PPM close to 0 but it’s bit shaky:
lost at least 140 bytes
real sample rate: 2047845 current PPM: -75 cumulative PPM: -75
real sample rate: 2048010 current PPM: 5 cumulative PPM: -35
real sample rate: 2048131 current PPM: 64 cumulative PPM: -2
real sample rate: 2047985 current PPM: -7 cumulative PPM: -3
real sample rate: 2047999 current PPM: 0 cumulative PPM: -2
real sample rate: 2048000 current PPM: 0 cumulative PPM: -2
real sample rate: 2047888 current PPM: -54 cumulative PPM: -9
real sample rate: 2048101 current PPM: 50 cumulative PPM: -2
real sample rate: 2047890 current PPM: -53 cumulative PPM: -8
real sample rate: 2048105 current PPM: 51 cumulative PPM: -2
real sample rate: 2047995 current PPM: -2 cumulative PPM: -2
real sample rate: 2047856 current PPM: -70 cumulative PPM: -8
real sample rate: 2048014 current PPM: 7 cumulative PPM: -6
real sample rate: 2048109 current PPM: 53 cumulative PPM: -2
real sample rate: 2047857 current PPM: -70 cumulative PPM: -7
real sample rate: 2048134 current PPM: 66 cumulative PPM: -2
Thanks for taking care! Was keen on getting latest version due to the non existing Mode S hex codes produced by unhandled (?) decoding errors in previous versions. Seen lots of ‘FF’ or ‘00’ during the last weeks…
Update: Does not help unfortunately:
pi@raspberrypi:~ $ /home/pi/stream1090/build/stream1090 -s 2.56 -u 12 -q -d /home/pi/stream1090/configs/rtlsdr.ini | socat -u - TCP4:localhost:30001
[Stream1090] RTL-SDR backend: external librtlsdr
[Stream1090] build 260905
[Stream1090] Input sampling speed: 2.56 MHz
[Stream1090] Output sampling speed: 12 MHz
[Stream1090] Input to output ratio: 16:75
[Stream1090] Number of streams: 12
[Stream1090] Size of input buffer: 8256 samples
[Stream1090] Size of sample buffer: 38700 samples
Found Rafael Micro R820T tuner
[RtlSdrDevice] Tuner: R820T/R820T2
10:55:25.646 [RtlSdrDevice] No tuner_bandwidth configured for this R820T/R820T2 tuner; automatic IF filter selection depends on the sample rate and librtlsdr implementation. Set it explicitly (for example, 3000000 at 2.4 or 2.56 Msps) to make the tuner state reproducible.
[RtlSdrDevice] Tuner bandwidth setting: auto (derived by librtlsdr from sample rate)
Allocating 15 zero-copy buffers
10:56:07.915 [Watchdog] Sample drop: ~6725 IQ pairs (~2.62695 ms of stream) lost; cumulative deficit ~6854 IQ pairs.
10:56:11.116 [Watchdog] Sample drop: ~6668 IQ pairs (~2.60469 ms of stream) lost; cumulative deficit ~226 IQ pairs.
10:56:11.116 [Watchdog] 2 sample drops in the last 60 s (threshold: more than 1). The host cannot sustain this sample rate. Initiating shutdown.
10:56:11.317 [Watchdog] Sample drops during this run: 2 event(s), worst gap ~6865 IQ pairs.
pi@raspberrypi:~ $ echo $STREAM1090_MAX_DROPS_PER_MIN
0
Or here again:
pi@raspberrypi:~ $ /home/pi/stream1090/build/stream1090 -s 2.56 -u 12 -q -d /home/pi/stream1090/configs/rtlsdr.ini | socat -u - TCP4:localhost:30001
[Stream1090] RTL-SDR backend: external librtlsdr
[Stream1090] build 260905
[Stream1090] Input sampling speed: 2.56 MHz
[Stream1090] Output sampling speed: 12 MHz
[Stream1090] Input to output ratio: 16:75
[Stream1090] Number of streams: 12
[Stream1090] Size of input buffer: 8256 samples
[Stream1090] Size of sample buffer: 38700 samples
Found Rafael Micro R820T tuner
[RtlSdrDevice] Tuner: R820T/R820T2
10:57:04.588 [RtlSdrDevice] No tuner_bandwidth configured for this R820T/R820T2 tuner; automatic IF filter selection depends on the sample rate and librtlsdr implementation. Set it explicitly (for example, 3000000 at 2.4 or 2.56 Msps) to make the tuner state reproducible.
[RtlSdrDevice] Tuner bandwidth setting: auto (derived by librtlsdr from sample rate)
Allocating 15 zero-copy buffers
10:57:22.447 [Watchdog] Sample drop: ~13579 IQ pairs (~5.3043 ms of stream) lost; cumulative deficit ~13614 IQ pairs.
10:57:26.248 [Watchdog] Sample drop: ~8920 IQ pairs (~3.48438 ms of stream) lost; cumulative deficit ~41 IQ pairs.
10:57:26.248 [Watchdog] 2 sample drops in the last 60 s (threshold: more than 1). The host cannot sustain this sample rate. Initiating shutdown.
10:57:26.449 [Watchdog] Sample drops during this run: 2 event(s), worst gap ~13614 IQ pairs.
So I switched back to an older version downloaded and compiled on August 12th. Seems to be stable at least for the moment.
Thanks, that’s useful. I suspect that the drop detector is not working well in your setup. Can you try this improved version please?
git clone --branch fix/rtlsdr-drop-detector --single-branch https://github.com/enricolorenzoni59/stream1090.git stream1090-drop-test
cd stream1090-drop-test
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j2
/home/pi/stream1090-drop-test/build/stream1090 …
Thanks
Thanks a lot for taking instant care and providing that test build. It runs stable at the moment. I’ll continue to watch it for a while and give you an update.
We will open up stream1090 to a wider set of devices. Namely libiio. 12-bit ADCs only for now.
Hi!
Thanks for providing another useful tool to ADS-B community.
Would it be easy to implement dump1090-fa adaptive gain in stream1090 ?
@enricolorenzoni59 How would you approach auto gain? I would prefer if that would stay a device specific thing. So one implementation for librtl default, one for the hacked librtl, one for airspy and one for the ant.
Hi @nikall and @mgrone , yes, autogain is definitely device-specific.
I have some local experiments that I haven’t pushed yet.
@nikall would you be interested in beta testing it? If so, which hardware are you running?
Hi
I’m in a situation where I am open to test things. I’m facing an issue in my area for the last one month with the reception. It seems something strong interferes at 1078MHz. I was told in another thread that stream1090 may offer me some SW filtering solution (I already use LNA/SAW but it doesn’t provide much of an improvement). On the other hand, I consider very practical the Adaptive Gain of dump1090-fa because at least in my case, it offered me a way to considerably increase range and airplanes reception (readsb auto-gain implementation didn’t offer me the same advantages).
Sounds good, that’s an interesting challenge for sure!
So you are using an RTL-SDR? Which model?
Yes sorry I forgot to mention the dongle I use. It’s a RTL2832U clone of Blog V4 but I also own an original Blog V4. The one I use is in a blue aluminum case which I bought from Aliexpress. I prefer it because it has the LNA/SAW onboard.
Thanks. Please follow the instructions here: stream1090/RTLSDR-AUTOGAIN-TEST.md at rtlsdr-autogain · enricolorenzoni59/stream1090 · GitHub
Where should I sent the logs from a 30 minutes run ?
One more question. I piped the output to readsb and let it ran for 3 hours. My impression is that your implementation of auto-gain (or adaptive ?) it’s mostly similar to readsb auto-gain meaning optimized for crowdy environments (close to busy airports). Is it so ?
Hi, I’ve sent you a DM with my email address. The current algorithm was created by observing several hours of traffic in London, with frequent near planes. But it brings the gain up when the noise floor is not high enough, while readsb tends to remain on lower gain (the author prefers to receive close airplanes better). How is it doing so far? Do you have any chart to compare it with other implementations?
No charts or other fancy things ![]()
Just from empirical perspective it seems way more sensitive than readsb implementation (which in my case it was like a fixed gain) but not up to dump1090-fa in terms of customization and its fast reaction to loud messages and jumping between gains. I had some far away planes but I missed many others too that even now with the noise issue I face the last month, dump1090 can still get a dozen of planes at distances more than 300km.
Are you planning to expose some customization parameters for the auto-gain ?
Can I get graphs1090 to interact with stream1090 ?
Stream1090 can feed either readsb or dump1090-fa, and graphs1090 works with either of those decoders. Installation instructions for graphs1090 can be found here:
