1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-13 20:01:46 -05:00
sdrangel/plugins/samplesource/rtlsdr
2018-12-17 18:38:52 +01:00
..
CMakeLists.txt Fixes for Arch. Manual merge of pull request #183. DATV demod: fixed some of ffmpeg deprecation warnings 2018-06-13 00:20:51 +02:00
readme.md RTLSDR: offset tuning documentation 2018-11-27 00:15:48 +01:00
rtlsdr.pro Wndows builds: removed reference to now obsolete MinGW64 toolchain 2018-12-14 17:49:06 +01:00
rtlsdrgui.cpp Reverse API: RTL-SDR input changes (1) 2018-12-17 08:51:59 +01:00
rtlsdrgui.h Reverse API: right click dialog on start/stop button. Apply to RTL-SDR 2018-12-17 00:34:14 +01:00
rtlsdrgui.ui RTL-SDR: offset tuning support: REST API and version update 2018-11-26 13:31:51 +01:00
rtlsdrinput.cpp Reverse API: RTL-SDR input changes (3) 2018-12-17 18:38:52 +01:00
rtlsdrinput.h Reverse API: RTL-SDR input changes (2) 2018-12-17 15:00:13 +01:00
rtlsdrplugin.cpp Reverse API: RTL-SDR input changes (3) 2018-12-17 18:38:52 +01:00
rtlsdrplugin.h Removed direct reference to the DeviceSourceAPI in the source GUIs 2017-10-30 00:45:23 +01:00
rtlsdrsettings.cpp Reverse API: RTL-SDR input changes (1) 2018-12-17 08:51:59 +01:00
rtlsdrsettings.h Reverse API: RTL-SDR input changes (1) 2018-12-17 08:51:59 +01:00
rtlsdrthread.cpp Bumped to v3.14.0 and allow decimation by 64 on all input plugins (missing yet: BladeRF and RTLSDR) 2018-03-27 11:32:39 +02:00
rtlsdrthread.h RTLSDR: optimized decimator 2018-05-02 00:24:50 +02:00

RTLSDR input plugin

Introduction

This input sample source plugin gets its samples from a RTLSDR device.

Build

The plugin will be built only if the RTLSDR host library is installed in your system. If you build it from source and install it in a custom location say: /opt/install/librtlsdr you will have to add -DLIBRTLSDR_INCLUDE_DIR=/opt/install/librtlsdr/include -DLIBRTLSDR_LIBRARIES=/opt/install/librtlsdr/lib/librtlsdr.so to the cmake command line.

If you want to benefit from the direct sampling you will have to compile and install this library else the RTLSDR library is also provided by many Linux distributions. The SDRangel binary releases are compiled with the direct sampling option.

Interface

RTLSDR input plugin GUI

1: Common stream parameters

SDR Daemon source input stream GUI

1.1: Frequency

This is the center frequency of reception in kHz.

1.2: Start/Stop

Device start / stop button.

  • Blue triangle icon: device is ready and can be started
  • Green square icon: device is running and can be stopped
  • Magenta (or pink) square icon: an error occurred. In the case the device was accidentally disconnected you may click on the icon, plug back in and start again.

1.3: Record

Record baseband I/Q stream toggle button

1.4: Stream sample rate

Baseband I/Q sample rate in kS/s. This is the device sample rate (4) divided by the decimation factor (6).

2: Local Oscillator correction

This is the correction to be applied to the local oscillator in ppm.

3: Auto correction options

These buttons control the local DSP auto correction options:

  • DC: auto remove DC component
  • IQ: auto make I/Q balance. The DC correction must be enabled for this to be effective.

4: Decimated bandpass center frequency position relative the RTL-SDR center frequency

  • Cen: the decimation operation takes place around the RTL-SDR center frequency Fs
  • Inf: the decimation operation takes place around Fs - Fc.
  • Sup: the decimation operation takes place around Fs + Fc.

With SR as the sample rate before decimation Fc is calculated as:

  • if decimation n is 4 or lower: Fc = SR/2^(log2(n)-1). The device center frequency is on the side of the baseband. You need a RF filter bandwidth at least twice the baseband.
  • if decimation n is 8 or higher: Fc = SR/n. The device center frequency is half the baseband away from the side of the baseband. You need a RF filter bandwidth at least 3 times the baseband.

4a: Transverter mode open dialog

This button opens a dialog to set the transverter mode frequency translation options:

SDR Daemon source input stream transverter dialog

Note that if you mouse over the button a tooltip appears that displays the translating frequency and if translation is enabled or disabled. When the frequency translation is enabled the button is lit.

4a.1: Translating frequency

You can set the translating frequency in Hz with this dial. Use the wheels to adjust the sample rate. Left click on a digit sets the cursor position at this digit. Right click on a digit sets all digits on the right to zero. This effectively floors value at the digit position. Wheels are moved with the mousewheel while pointing at the wheel or by selecting the wheel with the left mouse click and using the keyboard arrows. Pressing shift simultaneously moves digit by 5 and pressing control moves it by 2.

The frequency set in the device is the frequency on the main dial (1) minus this frequency. Thus it is positive for down converters and negative for up converters.

For example with the DX Patrol that has a mixer at 120 MHz for HF operation you would set the value to -120,000,000 Hz so that if the main dial frequency is set at 7,130 kHz the RTLSDR of the DX Patrol will be set to 127.130 MHz.

If you use a down converter to receive the 6 cm band narrowband center frequency of 5670 MHz at 432 MHz you would set the translating frequency to 5760 - 432 = 5328 MHz thus dial +5,328,000,000 Hz.

For bands even higher in the frequency spectrum the GHz digits are not really significant so you can have them set at 1 GHz. Thus to receive the 10368 MHz frequency at 432 MHz you would set the translating frequency to 1368 - 432 = 936 MHz. Note that in this case the frequency of the LO used in the mixer of the transverter is set at 9936 MHz.

The Hz precision allows a fine tuning of the transverter LO offset

4a.2: Translating frequency enable/disable

Use this toggle button to activate or deactivate the frequency translation

4a.3: Confirmation buttons

Use these buttons to confirm ("OK") or dismiss ("Cancel") your changes.

5: Toggle low/high sample rate range

When button is on the sample rate can vary from 230 kS/s to 300 kS/s When button is off the sample rate can vary from 950 kS/s to 2400 kS/s

6: Device sample rate

This is the device sample rate in samples per second (S/s).

Use the wheels to adjust the sample rate. Left click on a digit sets the cursor position at this digit. Right click on a digit sets all digits on the right to zero. This effectively floors value at the digit position. Wheels are moved with the mousewheel while pointing at the wheel or by selecting the wheel with the left mouse click and using the keyboard arrows. Pressing shift simultaneously moves digit by 5 and pressing control moves it by 2.

7: Decimation factor

The I/Q stream from the RTLSDR ADC is downsampled by a power of two before being sent to the passband. Possible values are increasing powers of two: 1 (no decimation), 2, 4, 8, 16, 32, 64.

8: Direct sampling mode

Use this checkbox to activate the special RTLSDR direct sampling. This can be used to tune to HF frequencies.

9: Offset tuning

This controls the offset tuning. Some RF frontends like the obsolete E4000 implement this feature and it can seriously reduce the central DC peak without digital correction. This does not work for the R820T and R820T2 that are very popular on which it will produce no effect. However these RF frontends exhibit a central DC peak much smaller than on the E4000 and can be easly corrected digitally via control (3).

10: RF bandwidth

This controls the tuner filter bandwidth and can be varied from 350 kHz to 8 MHz. In practice depending on the value this appears to be larger and the filter center is slightly offset above the center frequency. This can still be very useful to eliminate or attenuate large signals outside the device to host I/Q stream passband.

11: RF gain and AGC

The slider sets RF gain in dB. The values are defined in the RTLSDR device and generally are: 0.0, 0.9, 1.4, 2.7, 3.7, 7.7, 8.7, 12.5, 14.4, 15.7, 16.6, 19.7, 20.7, 22.9, 25.4, 28.0, 29.7, 32.8, 33.8, 36.4, 37.2, 38.6, 40.2, 42.1, 43.4, 43.9, 44.5, 48.0, 49.6

The AGC checkbox can be used to switch on or off the RTL2838 AGC. This is independent of the gain setting as this AGC acts after the gain block.