rtl_fm Squelch Questions

Marcus Müller marcus.mueller at ettus.com
Fri Feb 10 23:17:18 UTC 2017

Hi Martin,

I'll just address the question /what does the rtl_fm squelch do?/ very
shortly: from rtl_fm.c

	/* power squelch */
	if (d->squelch_level) {
		sr = rms(d->lowpassed, d->lp_len, 1);
		if (sr < d->squelch_level) {
			for (i=0; i<d->lp_len; i++) {
				d->lowpassed[i] = 0;
		} else {
			d->squelch_hits = 0;}

The signal enters the squelch after being low-pass filtered, then the
RMS (basically, the power) is calculated and saved in ´sr´; if that is
below the squelch threshold, the signal is zeroed out. If it's above,
the signal passes to the next state. The squelch_hits just implement
kind of a hysteresis.

So, yeah, a couple lines below:

    /* todo, fm noise squelch */

:) Soooo, maybe you'd want todo that?

CTCSS might be so low in frequency that their instantaneous amplitude
might be sensed as energy or not, depending on how close they are to the
LO (might get killed by the DC block).

So, basically, the squelch is only sensitive to power.

Best regards,
On 10.02.2017 22:22, Martin McCormick wrote:
> 	I have been playing with the rtl_fm program and most of
> it works amazingly well but I can not seem to get the squelch to
> stay open when receiving signals.
> 	I have not tried to analyze the source yet so I am asking
> what principle drives this squelch?
> 	In the analog world, the best squelches for FM receivers
> tend to be noise-driven and use a high-pass filter to filter out
> normal audio. When the noise drops below a preset threshold, the
> squelch opens.
> 	For AM receivers, a cheap and easy solution is to monitor
> the AGC and open the squelch when there is AGC voltage above a
> preset level.
> 	What I am noticing is that if I set the l value to a
> point just above where the noise stops, signals do open the
> squelch but even strong signals will not keep it from flickering
> on and off constantly.
> 	If I set the l value any lower, the squelch is always
> open so that is not the issue.
> 	I have tried signals that are absolutely full-quieting,
> with and without CTCSS and the squelch opens briefly, closes for
> a fraction of a second, opens for another fraction of a second
> and randomly flickers on and off for the whole transmission.
> 	On rare occasions, the squelch opens when the signal
> starts, stays open and then closes properly after the carrier
> leaves.
> Some of these signals are even ever so slightly noisy and I have
> heard this situation with and without PL tones or CTCSS so that
> doesn't seem to matter.
> 	Finally, I thought it might have something to do with too
> narrow a bandwidth so I increased the sampling rate to 24 K which
> made no difference at all.
> 	If the signal has voice on it, the flickering doesn't
> seem to be effected by the words.
> 	Basically, what is this squelch responding to to keep flapping?
> Martin McCormick WB5AGZ

More information about the osmocom-sdr mailing list