Rtl2838uhidir Sdr



Tuning the radio on an RTL SDR receiver, it’s very common to find the frequency read-out to be wildly inaccurate. To correct for this SDR applications request a PPM value which is unique to each RTL SDR USB dongle. To get your PPM value run the following command in the Linux CLI:

Nooelec NESDR SMArTee XTR Bundle - Premium RTL-SDR w/ Extended Tuning Range, Aluminum Enclosure, Bias Tee, 0.5PPM TCXO, SMA Input & 3 Antennas. DangerousPrototypes has just posted a link to a newer SDR application named REDHAWK. The REDHAWK GitHub page describes the project as, “REDHAWK is a software-defined radio (SDR) framework designed to support the development, deployment, and management of real-time software radio applications.

After several minutes you’ll have a read-out like the following:

Sdr

As you can see. the value averages out over time to give a stable reading. My USB dongle is off by 85 PPM so I’ll enter this to correct my frequency reading.

However I found afterwards that this still leaves me slightly off the mark, so using a graphical SDR application such as GQRX, tune to a known frequency then fine-tune the PPM value until the signal meets the tuning line in the middle. Typically I find mine is ~73 PPM using this method, this can vary by ~1-2 PPM but it’s enough to hit signals when tuned to the right frequency.

For a known frequency I suggest finding a local repeater, preferably on 70cm to 23cm for highest precision, but one that is most active is best. You might also use APRS which is always 144.8MHz in Europe, different frequencies in other regions but it’s reliable. Both these choices are NFM so you should hit them exactly in the centre of the broadcast when tuned correctly.
sm313 on YouTube tried using GSM mobile frequencies, this is a good choice because it’s a high frequency so has good precision and is constantly broadcasting, but you need to know what you’re looking for in a very wide-band signal so might not be that straight-forward.

If you have other suggestions please leave advice in the comments.

Introduction

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.

Rtl2838uhidir sdr sharp

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 Osmocom rtl-sdr 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 receiver can be configured to use the RTL2832U as a real-time signal source, thus providing 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 GNSS-SDR feature.

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 gr-osmosdr library, including the following header:

Important:The compilation of the RTL2832U support in GNSS-SDR is optional and it requires the installation of the gr-osmoSDR library. See GNSS-SDR’s README.md 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:

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 canceled using the Signal Conditioner block by enabling the frequency translating FIR filter as follows:

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.

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.

  • 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 following picture:

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:

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.

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 an extremely low cost hardware. Further measurements and improved support for RTLSDR devices are planned.

Rtl2838uhidir

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

Rtl2838uhidir Sdr

Update 2: New RTL-SDR Blog V3 dongles ship a < 1 PPM temperature compensated oscillator (TCXO), which is well suited for GNSS signal processing, and a 4.5 V powered bias-tee to feed an active antenna that can be enabled by software. Check out the Osmosdr_Signal_Source documentation for more details.

Full configuration file (updated for the current GNSS-SDR version):

Rtl Sdr Driver Install

References

Rtl2838 Sdrsharp

  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. ↩