Skip to content

Configuring channels for scan mode

charlie-foxtrot edited this page Apr 24, 2023 · 18 revisions

Scan mode explained

Scan mode in RTLSDR-Airband resembles an analog scanner. It repeatedly cycles through a set of programmed channel frequencies and pauses when a signal is detected. Once the signal disappears, the squelch closes and scanning continues. Frequency switching is done by changing the device's center frequency, hence scanned frequencies can be arbitrarily far away from each other (there is no bandwidth restriction, like in multichannel mode). A single audio stream is produced out of all scanned frequencies.

Scanning speed in RTLSDR-Airband is currently hardcoded to 5 frequencies per second, which is a limitation induced by the current implementation of the demodulator. This may be improved in a future release.

Channel configuration

First you have to set the device mode to "scan", as shown below.

channels is a list of channels to be received. A channel is a group of settings enclosed in braces { }. When the device is working in scan mode, only one channel section is allowed in its config. If you configure more, you will get an error on startup.

Syntax

devices: ({
  mode = "scan";            # switches the device into scanning mode
  ...                       # other device settings
  channels: (
    {
      freqs = ( 126.3, 121.5, 128.225, 161.375 );
#     modulation = "am";
# or
#     modulations = ( "am", "am", "am", "nfm" );
#     labels = ( "Radar", "Tower", "Ground", "Emergency services" );
#     ampfactor = 1.0;
# or
#     ampfactor = (1.0, 1.5, 0.75, 1.0);
#     ctcss = 110.9;
# or
#     ctcss = (0, 0, 0, 110.9);
#     afc = 0;
#     notch = 100.0;
#     notch_q = 10.0;
#
#     squelch_threshold = -35.5;
# or
#     squelch_snr_threshold = 20;
#
#     bandwidth = 8000;
#     tau = 200;
      outputs: ( ... );
    }
  );
});

Explanation of keywords

  • freqs (list of frequencies, required) - this is the list of frequencies to be scanned.
  • modulation (string, optional) - channel modulation, either am (the default) or nfm. The latter is only available if NFM support has been enabled when building the program, otherwise you will get "unknown modulation" error on program start.
  • modulations (list of strings, optional) - works the same way as modulation, but it sets the modulation separately for every scanned frequency. The order of the modulations list entries must correspond to the order of frequencies in the freqs list and both lists must be of the same length.
  • labels (list of strings, optional) - assigns textual labels to scanned frequencies. Labels are sent as metadata in Icecast outputs. See Icecast metadata updates in scan mode for more details.
  • ampfactor (float or list of floats, optional) - amplification factor, ie. the volume knob for this stream. The default is 1.0, which means default volume (unchanged). Any positive value is allowed. Values between 0.0 and 1.0 cause the stream to be attenuated, while values above 1.0 cause it to be amplified. You can use this feature to change the volume of all outputs from this channel. NOTE: ampfactor can be set on a mixer output as well and will be applied afterward.
  • ctcss (float or list of floats, optional) - enables Continuous Tone-Coded Squelch System (CTCSS) support with a tone (or tones) at the given frequency (in Hertz). Default: disabled. See CTCSS for more details.
  • afc (integer, optional) - automatic frequency correction. The default is 0 (off). When turned on (by putting a positive number here) it will attempt to switch to adjacent FFT bin in case when the signal power there is higher than in the FFT bin chosen for the configured channel frequency. Most probably you won't need this in practice.
  • notch (float or a list of floats, optional) - enables notch filter. This is useful for eliminating narrowband interference, for example CTCSS tones. Default: disabled. See Notch filter for more details.
  • notch_q (float or a list of floats, optional) - configures the selectivity of the notch filter. The default is 10.0. See Notch filter for more details.
  • squelch_threshold (float or int or a list of floats or ints, optional) - sets the signal level threshold at which the squelch shall open. See Manual squelch setting for more details.
  • squelch_snr_threshold (float or int or a list of floats or ints, optional) - sets the signal-to-noise ratio threshold at which the squelch shall open. See Manual squelch setting for more details.
  • bandwidth (frequency or a list of frequencies, optional) - enables lowpass-filtering of the channelized I/Q signal (before demodulation). This might help in situations where neighboring channels are closely spaced and interfere with the channel of interest. See Limiting channel bandwidth for more details.
  • tau (int, optional) - sets the NFM deemphasis constant for the channel. See NFM deemphasis for more details.
  • outputs (list, required) - a list of outputs where the produced audio is to be sent. There must be at least one output configured.

Now you may want to read about:

or jump straight to:

Clone this wiki locally