Skip to content

Configuring MiriSDR devices

charlie-foxtrot edited this page Mar 8, 2026 · 8 revisions

libmirisdr-4 is an open-source alternative to SDRPlay binary driver (Mirics is the chipset brand which SDRPlay RSPs are based on). However, as of December 2017, it works properly with RSP1 only. For other RSP types (RSP2, RSP/1A) gain control does not work too well, so the better option is to use SoapySDR with SoapySDRPlay plugin and SDRPlay native closed source driver. libmirisdr-4 should work fine for RSP1 and various Mirics-based DVB-T dongles which are detected as RSP1 device.

Syntax

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

devices:
({
  type = "mirisdr";
  index = 0;
# serial = "00000384";
  gain = 6;
# correction = 0;
# mode = "multichannel";
# sample_rate = 2.56;
# num_buffers = 10;
  centerfreq = 120.0;
# tau = 200;
  channels: ( ... );
});

Explanation of keywords

  • type (string, required) - indicates the receiver type
  • One of the following is required, if both are given, serial takes priority:
    • serial (string) - serial number of the MiriSDR device. The advantage over index is that this number does not change across reboots or when reconnecting dongles in different order.
    • index (integer) - index number of the MiriSDR device.
  • gain (int, required) - the gain value to be set on the device. Use miri_sdr tool supplied with libmirisdr-4 to find out the range for your device.
  • correction (integer, optional) - use this if your dongle has a non-zero frequency tuning error, which requires correcting. libmirisdr-4 library currently lacks support for configuring correction in ppm. You can pass the appropriate value in Hertz instead. If your receiver tunes too high, the value shall be positive, and 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 is 2.56 Msps. Values up to about 8.96 Msps usually work well, which gives about 9 MHz of bandwidth (ie. plus and minus 4.5 MHz from the center frequency). However the receiver loses sensitivity at the band edges, so in practice maximum usable bandwidth is about 7 MHz. This is the frequency range in which your channels of interest must fit in order to be received in multichannel mode.
  • num_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.
  • tau (int, optional) - Device value, overrides global value if set, can be overridden at per-channel level, see NFM deemphasis

Clone this wiki locally