Skip to content

Configuring RTLSDR devices

Tomasz Lemiech edited this page Oct 18, 2021 · 11 revisions

Syntax

Configuration of RTLSDR dongle looks as follows. Settings which are commented out with # are optional and their default values are shown.

devices:
({
  type = "rtlsdr";
  index = 0;
# serial = "00000384";
  gain = 25.0;
# correction = 0;
# mode = "multichannel";
# sample_rate = 2.56;
# buffers = 10;
  centerfreq = 120.0;
  channels: ( ... );
});

Explanation of keywords

  • type (string, required) - indicates the receiver type
  • index (integer) - indicates which RTL device this section applies to. This is important when you have more than one RTL device connected at the same time. Alternatively you may provide serial number of the device using serial option.
  • serial (string) - another way to indicate which RTL device shall be used. The advantage over index is that this number does not change across reboots or when reconnecting dongles in different order. If both serial and index options are given, serial takes priority. To find out serial numbers of your dongles, launch rtl_test utility - it discovers all connected devices and prints their details.
  • gain (floating point number, required) - the gain value to be set on the dongle. Typical gain range for RTLSDR is from 0.0 to 49.6 dB. Reasonable values are between 20.0 and 40.0, however this depends on your antenna (ie. if it's located inside or outside or whether it's an active antenna or not) and reception conditions. Don't be tempted to set this to the max - it almost never gives good results.
  • correction (integer, optional) - use this if your dongle has a non-zero frequency tuning error, which requires correcting. Put correction value in ppm here. If the dongle tunes too high, this value shall be positive, negative otherwise. Default is 0.
  • mode (string, optional) - takes one of two values: "multichannel" or "scan". The default is "multichannel".
  • sample_rate (frequency, optional) - the sampling rate to be configured on the device. This is equal to the bandwidth which the device working in multichannel mode will cover. The default for RTLSDR is 2.56 Msps. It gives about 2.56 MHz of bandwidth (ie. plus and minus 1.28 MHz from the center frequency). This is the frequency range in which your channels of interest must fit in order to be received in multichannel mode.
  • buffers (integer, optional) - number of memory buffers to allocate for USB transfers. The default is 10. If you use more than three dongles simultaneously or you get error messages like "Failed to submit transfer 12!" you may need to lower this value.
  • centerfreq (frequency, required in multichannel mode) - the center frequency which the dongle shall be tuned to. Required in multichannel mode, ignored in scan mode.
Clone this wiki locally