You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DEMOD_2400X: alternative 2.4 MHz demodulator (branch for feedback, not a PR yet) #332
I've been working on an alternative Mode S demodulator for 2.4 MHz SDR input
and would welcome feedback, or someone trying it, before opening a pull
request. It's on a branch based on dev:
git clone -b demod-2400x-dev https://github.com/CharlesBaud/dump1090.git
cd dump1090 && make RTLSDR=yes SOAPYSDR=yes
(An early version was briefly opened as #330 against master; this replaces it.)
What it does
Upsamples the 2.4 MHz I/Q to 12 MHz with a polyphase filter and searches
for preambles at every 12 MHz position.
Refines each frame's arrival time for MLAT: no bias across sub-sample
phases.
A coherent second pass uses the carrier phase to rescue frames that fail
the CRC.
The heavy parts are starch kernels (generic, ARM NEON for ARMv7 and
AArch64, x86 AVX2), all bit-identical, which starch-benchmark -V checks.
Switching it off
--no-demod2400x: the stock demodulator, with output byte-identical to dev (checked on UC8, SC16, SC16Q11 and --modeac).
--no-coherent: DEMOD_2400X without the second pass.
Results
60 s capture from a Pi 4 with an RTL-SDR (Pro Stick Plus), decoded with --throttle --fix:
Stock
DEMOD_2400X
+ coherent
Messages
73,146
84,545 (+16%)
93,827 (+28%)
DF17
10,352
11,830
13,365
Global CPR positions
3,510
3,977
4,538
Demodulation CPU, Pi 4
4.0 s
5.8 s
7.5 s
The gain is mostly weak, distant aircraft. Running live on a Pi 4 as the
dump1090-fa service, mlat-client stays synchronised with about 265 nearby
receivers. A Pi 3B runs it at about 39% of one core.
Documentation on the branch
README-demod2400x.md: design and full results.
NOTES-demod2400x.md: development notes, plus a "For reviewers" section
listing every change to existing upstream files.
COHERENT-demod2400x.md: the coherent second pass.
Open questions
Anything you'd want split out or changed before it could be reviewed as a
pull request.
Generative AI
Much of the code and text was written with Claude Code, to my design and
under my review and testing. AI-DISCLOSURE.md on the branch says which
parts.
You are all very welcome to try this out there are some scripts to install and put back the older driver in the commit.
thanks for letting us try something completely new.
I just compiled it and give it a try. It sounds like it will fit my case. I live in a mountainous area with no direct line of sight of the closest airport plus a very strong interference at 1078Mhz (most likely a military radar) that started around last August and ruined my long range reception.
At a first glance it uses almost double the CPU compared to "vanilla" dump1090 (i run it on a thin client with a Pentium silver J5005 CPU). One thing to note though is that I use adaptive dynamic range and adaptive burst which both do a respectful use of CPU.
It's very soon to draw any conclusion. I'll let it run for a day or two so to have some data to compare.
Yes its 2x CPU nothing is for free - there's a lot more AVX2 usage. Interestingly that's better than the arm/neon. Its only probably another Watt of power but it may force you to fit a heatsink. I am looking at reducing the load but its a compomise.
Nothing beats a cavity filter in that situation about $100 but check the frequency response first on the datasheet, you may need to retune to get the response you want ant that needs a network analyser. Other thing to try would be manual gain setting of the SDR including the LNA. A raw dump of the IQ samples with a wider bandwidth into some standard RTL software may show you the issue.
The coherent pass sounds interesting (I have not looked at the code yet) - I think I looked at this a long time back but actual transponders didn't seem to reliably maintain phase between bits (or at least my experimental code didn't see it)
Have you looked at DO-260C at all? It phase-modulates the data bits to overlay some more data, which will presumably entirely break the coherent pass, but something like it will be needed to actually demodulate that data anyway. I always assumed that this would be beyond the reach of a 2.4MHz demodulator, but maybe not? Going to be a while before DO-260C transponders are in the wild, though.
Yes it will reject DO-260C. The idea it is always tries the new magnitude demod first and only uses the coherent one if that fails. DO-260C (8-PSK) is not currently being rolled out its still just in the demonstration phase. Have a read through the readme's there an interesting section on some of the aircraft chirps. The real aim is to get another 2-3dB of sensitivity. Claude could not find any 8-PSK chirps. I sure we could knock up a 8-PSK demod but nothing is using it and I think think is more designed to add signatures so aircraft cannot be so easilly spoofed however MLAT does address some of that.
On the power CPU usage I may add some lines of code which revert back to calling the orignal demod2400() if the occupancy if the FIFO starts to get large (say 2/3). That way if there is not enough CPU then the demod will continue to work rather than throwing packets away. There's something already there to make sure the demod2400AC() works in the new mode.
After some hours of running I can tell for sure that I receive more positions per aircraft. The range thing hasn't improved but I will have to run it longer to be sure.
One question though. Do I have to run it with --fix and --throttle ?
Don't know but its the same as the stock code. Yes if interference is the issue it maybe you can recover more signals but if they go below the interference floor rather than the noise. It would be worth recoding some IQ data directly and taking a look at the interference. Modern SDR's don't have good blocking performance and can produce DC offsets from out of band signals. My experience is mainly with the AD9361 device. Is the interference there all the time, could it be a cell tower?
It would be worth recoding some IQ data directly and taking a look at the interference
How do I do that ?
I have a RTL-SDR blog clone, the one with the LNA/SAW built in. It worked very good (better than the original RTL-SDR blog V4 + LAN/SAW that I also have) until the interference appeared but even so it still performs better than the other combination.
Here a screenshot of from the graphs1090.
You can clearly see the difference in CPU usage after I installed the demod_2400X.
And here is a scan showing the interference that I'm trying to overcome.
Yes the increase in CPU is expected I will keep trying to prune the code but 2x for a 4-5dB gain I think it is not unrealistic. To do the sampling properly we do need to up sample to 12MHz. The stock code is lower power but in this day of better processors we can do better.
Your scan is interesting let me have a think. Certainly it is fairly continuous - radar usually chirp. Yes its going to go straight through the SAW.
What I can see:
The SAW passband 1065-1110MHz
A repeated signal every 14MHz probably a clock from you board getting into the RX front end.
Strong stuff at 960MHz etc which is getting through the SAW stopband - so have a tower very close to you guess.
1078MHz signal narrow band with gaps which goes straight through your SAW - I would have a listen to this maybe a NBFM telemetry signal. The nature of the signal mat tell you what it is.
Aviation Navigation: DME and TACAN are ground-based transponders used to measure the distance from an aircraft. If you are near a mountain area, it is highly plausible that a DME beacon is transmitting on this frequency - AI.
I know we are a bit off topic sorry.
Nothing beats a cavity filter but I don't think you will get one with enough stop band without moving the centre frequency which requires a network analyser and some skill. I would try manual gain setting reduction on the SDR in the RF front end it maybe dump1090 drivers can do this and you can modify. The blocking will not be picked up by the 2.4MHz BW IQ signal. Being into RF my approach would be to mix down the signal with a high IP3 mixer and then pass through a IF SAW before going into an SDR.
The good news is since I can see your LNA noise floor (at least I think I can) there should be an RF gain setting that works for you. It looks like you need to drop the LMT (front end) gain in the device usually the internal LNA. Unfortunately the standard API only offers a single gain setting which probably does the back end gain first which is not what you want. You will have to dig into the rtl driver and modify for that chip.
OK I would pull off the rtl-sdr driver from git hub. In tuner_r8200x.c I would change the manual gain control mode to:
for (i = 0; i < 15; i++) {
if (total_gain >= gain)
break;
// Mixer step 1
if (mix_index < 15) {
total_gain += r82xx_mixer_gain_steps[++mix_index];
}
if (total_gain >= gain)
break;
// Mixer step 2 (doubling up on mixer to heavily favor it)
if (mix_index < 15) {
total_gain += r82xx_mixer_gain_steps[++mix_index];
}
if (total_gain >= gain)
break;
// LNA step (only happens after two mixer steps)
if (lna_index < 15) {
total_gain += r82xx_lna_gain_steps[++lna_index];
}
}
This will favour winding down the LNA first. Run in manual mode and you may wish to play with the VGA gain. Because there's and external LNA (20dB) and SAW loss (3dB) the internal LNA does not need anywhere near the maximum gain for the NF to be preserved. There's now far too much front end gain so you 1078MHz signal goes straight through the SAW and clobbers the mixer in the RF chip.
Thank you very much for you time. Yes I do have a cell tower close to me and the radar is probably a DME/TACAN because it's a mixed military/civilian airport. The 14MHz step noise it was there even before the 1078MHz appears.
OK, I don't want to ruin this thread with my off topic.
Two questions only.
The code above is a "drop in" piece of code ? Shall I put/replace the part starting with for (i = 0; i < 15; i++) { and just before the /* set LNA gain */ ?
Do you think based on your experience that a cavity filter should make this situation better or is just a waste of money ?
I'm a hobbyist and I'm trying to keep the budget at the bare minimum.
Yes the code increases mixer gain in preference to LNA gain. You will need to experiment and use manual gain mode in dump1090, I would also look at the VGA gain mode in the manual case it may be set too low in the code there's a different value used in auto mode. I think you could get a win here. by dropping the LNA gain by 10dB or so. You can see what that piece of code is doing by writing a separate test program. Note the gain is in .1dB steps. You could try gain=400 (40dB). You can also get an AI tool to write you a python raw dump program and a waterfall display if you want to see what's going on, instead of dump1090.
I could not find an off the shelf filter which would have the necessary rejection at 1078MHz you would need to have it retuned.
Yes I would raise the issue under the rtl-sdr repository its not really to do with dump1090.
Activity
nikallian commentedon Oct 21, 2026
Hi,
thanks for letting us try something completely new.
I just compiled it and give it a try. It sounds like it will fit my case. I live in a mountainous area with no direct line of sight of the closest airport plus a very strong interference at 1078Mhz (most likely a military radar) that started around last August and ruined my long range reception.
At a first glance it uses almost double the CPU compared to "vanilla" dump1090 (i run it on a thin client with a Pentium silver J5005 CPU). One thing to note though is that I use adaptive dynamic range and adaptive burst which both do a respectful use of CPU.
It's very soon to draw any conclusion. I'll let it run for a day or two so to have some data to compare.
CharlesBaud commentedon Oct 22, 2026
Yes its 2x CPU nothing is for free - there's a lot more AVX2 usage. Interestingly that's better than the arm/neon. Its only probably another Watt of power but it may force you to fit a heatsink. I am looking at reducing the load but its a compomise.
Nothing beats a cavity filter in that situation about $100 but check the frequency response first on the datasheet, you may need to retune to get the response you want ant that needs a network analyser. Other thing to try would be manual gain setting of the SDR including the LNA. A raw dump of the IQ samples with a wider bandwidth into some standard RTL software may show you the issue.
mutability commentedon Oct 22, 2026
The coherent pass sounds interesting (I have not looked at the code yet) - I think I looked at this a long time back but actual transponders didn't seem to reliably maintain phase between bits (or at least my experimental code didn't see it)
Have you looked at DO-260C at all? It phase-modulates the data bits to overlay some more data, which will presumably entirely break the coherent pass, but something like it will be needed to actually demodulate that data anyway. I always assumed that this would be beyond the reach of a 2.4MHz demodulator, but maybe not? Going to be a while before DO-260C transponders are in the wild, though.
CharlesBaud commentedon Oct 22, 2026
Yes it will reject DO-260C. The idea it is always tries the new magnitude demod first and only uses the coherent one if that fails. DO-260C (8-PSK) is not currently being rolled out its still just in the demonstration phase. Have a read through the readme's there an interesting section on some of the aircraft chirps. The real aim is to get another 2-3dB of sensitivity. Claude could not find any 8-PSK chirps. I sure we could knock up a 8-PSK demod but nothing is using it and I think think is more designed to add signatures so aircraft cannot be so easilly spoofed however MLAT does address some of that.
CharlesBaud commentedon Oct 22, 2026
On the power CPU usage I may add some lines of code which revert back to calling the orignal demod2400() if the occupancy if the FIFO starts to get large (say 2/3). That way if there is not enough CPU then the demod will continue to work rather than throwing packets away. There's something already there to make sure the demod2400AC() works in the new mode.
nikallian commentedon Oct 22, 2026
@CharlesBaud
After some hours of running I can tell for sure that I receive more positions per aircraft. The range thing hasn't improved but I will have to run it longer to be sure.
One question though. Do I have to run it with
--fixand--throttle?CharlesBaud commentedon Oct 22, 2026
Don't know but its the same as the stock code. Yes if interference is the issue it maybe you can recover more signals but if they go below the interference floor rather than the noise. It would be worth recoding some IQ data directly and taking a look at the interference. Modern SDR's don't have good blocking performance and can produce DC offsets from out of band signals. My experience is mainly with the AD9361 device. Is the interference there all the time, could it be a cell tower?
nikallian commentedon Oct 22, 2026
How do I do that ?
I have a RTL-SDR blog clone, the one with the LNA/SAW built in. It worked very good (better than the original RTL-SDR blog V4 + LAN/SAW that I also have) until the interference appeared but even so it still performs better than the other combination.
Here a screenshot of from the graphs1090.
You can clearly see the difference in CPU usage after I installed the demod_2400X.
And here is a scan showing the interference that I'm trying to overcome.
https://immich.home.kg/s/1078Mhz
CharlesBaud commentedon Oct 22, 2026
Yes the increase in CPU is expected I will keep trying to prune the code but 2x for a 4-5dB gain I think it is not unrealistic. To do the sampling properly we do need to up sample to 12MHz. The stock code is lower power but in this day of better processors we can do better.
Your scan is interesting let me have a think. Certainly it is fairly continuous - radar usually chirp. Yes its going to go straight through the SAW.
What I can see:
Aviation Navigation: DME and TACAN are ground-based transponders used to measure the distance from an aircraft. If you are near a mountain area, it is highly plausible that a DME beacon is transmitting on this frequency - AI.
I know we are a bit off topic sorry.
Nothing beats a cavity filter but I don't think you will get one with enough stop band without moving the centre frequency which requires a network analyser and some skill. I would try manual gain setting reduction on the SDR in the RF front end it maybe dump1090 drivers can do this and you can modify. The blocking will not be picked up by the 2.4MHz BW IQ signal. Being into RF my approach would be to mix down the signal with a high IP3 mixer and then pass through a IF SAW before going into an SDR.
The good news is since I can see your LNA noise floor (at least I think I can) there should be an RF gain setting that works for you. It looks like you need to drop the LMT (front end) gain in the device usually the internal LNA. Unfortunately the standard API only offers a single gain setting which probably does the back end gain first which is not what you want. You will have to dig into the rtl driver and modify for that chip.
https://www.rtl-sdr.com/new-sdr-rtl-sdr-driver-lnamixervga-gain-settings-decimation/
CharlesBaud commentedon Oct 22, 2026
OK I would pull off the rtl-sdr driver from git hub. In tuner_r8200x.c I would change the manual gain control mode to:
for (i = 0; i < 15; i++) {
This will favour winding down the LNA first. Run in manual mode and you may wish to play with the VGA gain. Because there's and external LNA (20dB) and SAW loss (3dB) the internal LNA does not need anywhere near the maximum gain for the NF to be preserved. There's now far too much front end gain so you 1078MHz signal goes straight through the SAW and clobbers the mixer in the RF chip.
nikallian commentedon Oct 22, 2026
@CharlesBaud
Thank you very much for you time. Yes I do have a cell tower close to me and the radar is probably a DME/TACAN because it's a mixed military/civilian airport. The 14MHz step noise it was there even before the 1078MHz appears.
OK, I don't want to ruin this thread with my off topic.
Two questions only.
or (i = 0; i < 15; i++) {and just before the/* set LNA gain */?I'm a hobbyist and I'm trying to keep the budget at the bare minimum.
Thank you!
CharlesBaud commentedon Oct 23, 2026
Yes the code increases mixer gain in preference to LNA gain. You will need to experiment and use manual gain mode in dump1090, I would also look at the VGA gain mode in the manual case it may be set too low in the code there's a different value used in auto mode. I think you could get a win here. by dropping the LNA gain by 10dB or so. You can see what that piece of code is doing by writing a separate test program. Note the gain is in .1dB steps. You could try gain=400 (40dB). You can also get an AI tool to write you a python raw dump program and a waterfall display if you want to see what's going on, instead of dump1090.
I could not find an off the shelf filter which would have the necessary rejection at 1078MHz you would need to have it retuned.
Yes I would raise the issue under the rtl-sdr repository its not really to do with dump1090.