GNSS-SDR operation with a Realtek RTL2832U USB dongle DVB-T receiver

7 minute read


This article describes what is probably one of the cheapest ways for experimenting with real-life signals and GNSS-SDR. This is product from a combined effort of many people, so let us only mention (to our knowledge) the very original source, the V4L/DVB kernel developer Antti Palosaari, who discovered an undocumented operation mode for some USB DVB-T dongles based on the Realtek RTL2832U chipset, enabling them to be used as a cheap Software Defined Radio (SDR) front-end. The key feature is that the chip allows transferring raw I/Q samples to the host, that in principle is the responsible for DAB/DVB+/FM demodulation. This is great news for a GNSS software receiver, since it covers the targeted frequency bands.

The RTL2832U outputs 8-bit I/Q-samples with a baseband sample-rate up to 3.2 MSPS, according to the specifications. However, the highest sample-rate without losing samples that has been tested so far is 2.8 MSPS. The frequency range is highly dependent of the used tuner. Dongles that use Elonics E4000 offer the widest possible range (64 - 1700 MHz with a gap from approx. 1100 - 1250 MHz). When used out-of-spec, a tuning range of approx. 50 MHz - 2.2 GHz is possible (with gap). More information about the devices compatibility is available at the OsmocomSDR Wiki.

The GNSS Galileo E1 and GPS L1 links are centered at 1575.42 MHz, and this band is covered by the E4000 tuner IC. The GNSS-SDR software can be configured to use the RTL2832U as a real-time signal source and thus, provide a low cost option (about 20 € or $25) to build a real-time software defined GPS L1 receiver. This article introduces the operation details and some performance measurements regarding this novel feature of GNSS-SDR.

OsmoSDR driver support

The GNSS-SDR support for Realtek RTL2832U dongles makes use of the OsmoSDR GNU Radio source block and driver. We implemented a new GNSS-SDR Signal Source adapter that instantiates OsmoSDR’s gr_hier_block2, which associated GNSS-SDR Signal Source name is Osmosdr_Signal_Source. The adapter’s source code is located at:

It makes use of the libgnuradio-osmosdr library, including the following headers:

#include <osmosdr_api.h>
#include <osmosdr_source_c.h>

Important: The compilation of the RTL2832U support in GNSS-SDR is optional and it requires the installation of the OsmoSDR library. See GNSS-SDR’s file for step-by-step building instructions with the optional OsmoSDR driver.

Configuring GNSS-SDR for GPS L1 real-time operation

In order to use a compatible USB DVB-T device it is necessary to select the Osmosdr_Signal_Source in the GNSS-SDR configuration file (gnss-sdr.conf) as the SignalSource block. In addition, the following parameters should be configured:

  • the baseband sampling frequency,
  • the RF center frequency,
  • the RF gain, and
  • the AGC operation.

Hereafter can be found a working configuration for the reception of a GPS L1 C/A signal:

;######### GLOBAL OPTIONS ##################
;######### CONTROL_THREAD CONFIG ############
;######### SIGNAL_SOURCE CONFIG ############

The recommended sampling frequency is 2 MSPS. This configuration enables the real-time receiver operation with 8 satellite channels in an Intel Core 2 quad Q9400 @ 2.66 GHz with 4 GB of RAM. In addition, we obtained the best results enabling the Automatic Gain Control (AGC) of the E4000 front-end.

RTL2832U oscillator accuracy and stability issues

It is known, as reported in Michele Bavaro’s GNSS blog, that the crystal oscillator used by the RTL2832U dongles has a very low accuracy. Our experiments with two different devices (EzCap 666 and Generic P160) confirm this issue. We used a high accuracy signal generator to generate an unmodulated carrier at GPS L1 link and we measured the carrier frequency error in the captured signal. The resulting deviations were in the order of 80 kHz for the EzCap and 14.8 kHz for the P160.

The local oscillator frequency inaccuracies cause two different effects in the GNSS receiver:

  1. The baseband signal is shifted to an Intermediate Frequency (IF), equal to the VCO deviation. It can be seen as an apparent Doppler shift. If the superposed Doppler shift (real signal Doppler + the parasitic IF) is beyond the acquisition Doppler search margins, the acquisition will fail.

  2. A deviation in the sample clock since local oscillator is used also for the Analog-to-Digital Converter (ADC) sample clock reference. This issue affects the tracking Delay Locked Loop (DLL) as there is a deviation in the theoretical sample clock frequency set in the receiver configuration file and the real sample frequency. If the deviation is high enough, the tracking DLL will lose the lock.

Thanks to the GNSS-SDR flexibility, the software receiver can be configured to overcome both effects. On the one hand, the parasitic IF frequency can be cancelled using the Signal Conditioner block by enabling the frequency translating FIR filter as follows:

;######### SIGNAL_CONDITIONER CONFIG ############
;######### INPUT_FILTER CONFIG ############
;######### RESAMPLER CONFIG ############

On the other hand, the sample frequency error can be measured and taken into account by setting the estimated sample clock frequency value in the internal GNSS-SDR sampling frequency parameters as follows:


GPS active antenna

We used a ceramic patch antenna equipped with an internal Low Noise Amplifier (LNA) to reduce the overall noise figure. The picture below shows a picture of such Garmin GA27C GPS antenna exposing the ceramic patch over the LNA PCB.

Garmin's GA27C antenna
Garmin GA-27 active antenna without the plastic cover.

In order to connect the antenna to a DVB-T dongle it is necessary some hardware hacking:

  1. Assuming that the GPS antenna is equipped with a SMA M connector, it is required to build an RF cable to convert the SMA M connector to the MCX M connector in order to plug the GPS antenna to the DVB-T dongle.

  2. We must feed the LNA using a Bias-T network.

Some performance measurements and conclusions

Two different setups were assessed to receive and process GPS signals in real-time:

  • In the first one, we connected the DVB dongle to an active patch antenna using a custom 20 dB amplification and filtering circuit. The gain block provides also the +5 DC voltage required to power the active antenna internal LNA. More information of this circuit can be found at Arribas’ PhD Thesis1.

The following picture shows the DVB dongle (generic P160) + LNA + Active antenna setup.

Generic P160 DVB-T dongle connected to a GA-27 antenna using an external LNA circuit.
  • On the other hand, we also tested the direct connection of an active GPS antenna to the DVB dongle as well, using a standard bias-T network. This setup is shown in the the following picture:
Generic P160 DVB-T dongle connected to a GA-27 antenna using a bias-T network.

In those experiments, we used a Dell XPS M1530 laptop equipped with an Intel Core 2 Duo T9300 CPU with 4 GB of RAM. The operating system was Linux Ubuntu 12.04 and the GNU Radio version was 3.6.0.

GNSS-SDR was able to acquire, track, and obtain a position fix in both front-end setups. The antenna was placed on the roof of the CTTC building and remained static during the experiments.

The following pictures show some tracking data analysis using the GNSS-SDR intermediate data extraction and dump feature:


As a sanity check, we did some post processing analysis using the Matlab script based on the ones on Key Borre’s book2 and available at

The figure clearly show the GPS C/A navigation symbols, The PLL and DLL discriminator outputs are quite noisy, tough:

Tracking data analysis.
Tracking data analysis.

Finally, the obtained KML position file can be displayed by Google Earth as shown in the following picture. The yellow line represents the position evolution for a 10 seconds time lapse. The red arrow represents the true antenna position. In addition, we plotted also the height evolution. Considering that the Position Velocity and Time (PVT) solutions were estimated using 4 satellites and a really low sampling frequency of 1.2 MSPS, the estimated position error was in the order of 200 m.

GooGle Earth
GNSS-SDR estimated position analysis using Google Earth.

Summarizing this preliminary experiment, we can conclude that the GNSS positioning using low cost Realtek-based DVB-T dongles is feasible, and to the best of our knowledge, this is the first time that a GNSS software receiver supports the real-time operation with RTLSDR-based devices. This milestone enables the access to the full potential of GNSS services using a standard laptop and a extremely low cost hardware. Further measurements and improved support for RTLSDR devices are planned.

Update: Those experiments and the results were finally published in a paper3 presented at ION GNSS+ 2013.


  1. J. Arribas, GNSS Array-based Acquisition: Theory and Implementation, PhD Thesis, Universitat Politècnica de Catalunya, Barcelona, Spain, June 2012 

  2. K. Borre, D. M. Akos, N. Bertelsen, P. Rinder, S. H. Jensen, A Software-Defined GPS and Galileo Receiver. A Single-Frequency Approach, 1st edition, Boston: Birkhäuser, November 2006. 

  3. C. Fernández-Prades, J. Arribas, P. Closas, Turning a Television into a GNSS Receiver, in Proc. of the 26th International Technical Meeting of The Satellite Division of the Institute of Navigation (ION GNSS+ 2013), Nashville, TN, Sep. 2013, pp. 1492 - 1507. 

Leave a Comment