Tagged: drivers

An RTL-SDR ExtIO with Decimation and Tuner Bandwidth Controls

RTL-SDR experimenter Hayati Ayguen ( on GitHub) has released a version of rtl_tcp and an ExtIO module that allows access to normally hidden tuner settings. The ExtIO allows you to manually set the tuner bandwidth of the R820T/2 chip. It can be set almost anywhere between 350 kHz and 8000 kHz. In the standard drivers the tuner bandwidth is normally set at a size appropriate for the sample rate, but in this driver using a smaller bandwidth allows you to filter out unwanted signals whilst taking advantage of the decimation a higher sample rate gives you.

In addition to the tuner bandwidth settings, the ExtIO module also implements decimation controls. This allows you to reduce the displayed bandwidth without sacrificing the sample rate. At the same time the R820T/2 tuner bandwidth is reduced to the visible sample rate, improving filtering.

Hayati writes in the Readme file:

Tuner bandwidth is supported with E4000 and R820T tuners.
Changing bandwidth with R820T looks good and shows immediate differences in spectrum.
E4000 is not so nice, i can’t see any difference, for the bandwidths below 3400 kHz.
I also put in the wider bandwidths, even wider than the samplerate, which will produce aliasing!
These might be interesting for wide amplitude modulated signals, e.g. ADS-B.

Decimation of Samplerate is an option for very old and slow computers:
Before decimation, a very simple and fast low-quality filter (sum) is applied:
y(k) = sum over x( k * (1..decimation) ) ; x() = input samples from rtl_tcp
; y() = output samples to SDR app (HDSDR)
The sum produces values requiring more than 8 bit.
In addition to this soft-filter, minimize the tuner-bandwidth!
You will still receive aliases!!!, but a bit damped compared to directly sampling at the slower speed.
The reception’s center frequency (LO) is the most alias-free region.

The ExtIO interface. Enables tuner bandwidth and decimation controls.
The ExtIO interface. Enables tuner bandwidth and decimation controls.

A precompiled release of the ExtIO dll can be downloaded at github.com/hayguen/extio_rtl_tcp/releases. As the ExtIO connects via an rtl_tcp server, you will also need to download Hayati’s modified rtl_tcp server from github.com/librtlsdr/librtlsdr/releases/tag/win32_with_biasTee. To use the driver, first run rtl_tcp locally simply by double clicking on it, then open HDSDR and select the new ExtIO_RTL_TCP.dll file.

We tested out the tuner bandwidth functions and it appears to work well. For instance in the following image there is a strong pager signal near 157.9 MHz. At first the RTL-SDR is overloaded by the strong signal causing multiple images to appear on the spectrum. But after reducing the tuner bandwidth to 350 kHz the left side of the spectrum is attenuated, and the interfering pager signal is no longer too strong. 

The modified rtl_tcp software (and rtl_(adsb|fm|power|tcp)) also support access to the software activated bias tee on our V3 dongles via the -T flag.

Tuner Bandwidth Selection Example.
Tuner Bandwidth Selection Example.

Hayati has also uploaded some slides which show some of the effects of using various different tuner bandwidths.

Windows Version of the Fully Exposed RTL-SDR Driver now Available

Last week we posted about Milen Rangelov’s (gat3way) new RTL-SDR driver which has exposed filter and gain settings for the R820T/2 chip. This should let you tweak for optimal reception much better. Previously the driver was only available for Linux, however, now over on SourceForge user randaller has ported this driver to Windows.

To use the driver in SDR# simply unzip all the files into the SDR# folder, then while using the dongle in SDR# open the librtlsdr_wincontrol.exe file to open the control interface. The interface also has the ability to directly write values to a register, which together with the newly released register datasheet, can be useful for experimenting with the R820T2 chip.

The description reads:

Unpack all files to SDRSharp folder, start SDR# playback, then run controller exe file.
Do not forget to allow software to use UDP/32323 port in your firewall.

You may use this rtlsdr.dll with osmocom or other software, of course.
It is fully compatible to original one.

There are UDP server on 32323 port inside of rtlsdr.dll. It accepts and answers \n-terminated strings and accept two easy commands: get and set register. Examples:
g 5\n – will return value of R5
s 7 10 15\n – will set four lowest bits (mask 0x0f) of R7 with value 10
s 12 174 255\n – will write complete byte to R12
All values should be decimal.
You may use this feature to develop own gui controller with beauty knobs.

 

The driver GUI.
The driver GUI.

New Linux RTL-SDR Driver with Fully Exposed Controls

A new Linux based driver for the RTL-SDR has been released by Milen Rangelov (aka gat3way) which exposes all the adjustable settings on the R820T/2 tuner chips. This exposes adjustable sliders for settings like preselection, IF and notch filters and the multiple gain stages on the R820T/2. In the standard drivers the filters and gain settings are mostly set automatically, but manually adjusting them could yield better results. The filters are not very strong, but they could be used to help block out an interfering signal, increasing the dynamic range of the RTL-SDR.

Over on his post at r/rtlsdr Milen wrote the following about his driver:

The idea in brief is to modify the librtlsdr code so that an unix domain socket server receives i2c register set/get commands and executes them. It only works for r820t tuners. This modified rtlsdr library is then dynamically preloaded by means of LD_PRELOAD and used by the SDR software. This is actually what happens when you call r820tweak <program>. This way, no modifications to both gr-osmosdr source and the SDR program are required, instead of waiting for them to implement those controls, we kind of have a separate program that tweaks them.

The GUI program is a simple wxpython client, it currently exposes the following settings:

LNA, Mixer, VGA gain stages – the 3 variable gain stages

LPF/HPF filter cutoff – these control the “width” of the r820t2 lowpass/highpass filters, those filters are relatively sharp and this in turn is very useful to increase the dynamic range by fitlering out strong signals “close” to the weak signal you are hunting. Those are among the nicest features to play with, together with the gain stages.

LPNF cutoff – apparently there is also a low pass notch filter, however this doesn’t work as I expected. Anyway, still useful as a kind of variable attenuator.

Filter bandwidth – there is a bandpass filter which isn’t quite “sharp” at all, centered at the center frequency. Kind of additional filter, easier to manipulate than the rest of them, but not that powerful. May provide some extra dynamic range. Behaves kind of weird when gqrx decimation is used.

As far as the gain stages are concerned – the LNA gain is the first stage and thus the most important – it determines the SNR. Mixer gain is less important (unless the signal is too weak). The VGA gain should be almost always set to zero as it doesn’t contribute to the SNR at all while keeping the dongle warmer and so more thermal noise.

In the R820T2 i2c register specs there are some other interesting features, currently unexposed. One of them is the band selection filter (lo/med/high) which apparently is even used in the librtlsdr driver. I found changing that has absolutely no effect for me unfortunately. It might have provided opportunities for better reception around the “verge” where the librtlsdr driver switches them (approx. at 310MHz and 588MHz). But switching them has absolutely no effect.

The new fully adjustable driver by gat3way.
The new fully adjustable driver by gat3way running in GQRX.

New SDR# RTL-SDR Driver with LNA/Mixer/VGA Gain Settings and Decimation

A new SDR# driver for the RTL-SDR that comes with manual settings for the LNA/Mixer and VGA gain stages as well as software decimation (in Russian use Google Translate) has been released on rtl-sdr.ru. The three seperate gain stages offer much greater control over optimization of signal SNR and interference management. The decimation feature allows you to sacrifice some bandwidth for increased ADC bit resolution. This means that using the decimation feature can significantly improve the SNR of a signal. Update: It turns out that decimation is already used in the existing SDR# code, so using decimation in the new driver won’t improve the real SNR, only the visible SNR – so there will be no audible improvement. It will however allow you to effectively zoom in on the spectrum without loosing visible resolution. Also it allows you to use a higher sample rate (2.8 MSPS) which will improve SNR, whilst maintaining a reasonably sized (small enough) visible bandwidth for narrowband signals.

The driver is based on Oliver Jowet’s modified driver so it should also have the capability to tune down to 13 MHz or lower. To use the plugin simply download the zip file and copy the files into the SDR# folder, replacing all existing files. Previously we posted about another driver with similar capabilities, but this driver was never released to the public. There was also another driver with just the three gain settings released earlier which this driver appears to be based on.

New RTL-SDR Driver with LNA/Mixer/VGA Gain Settings and Software Decimation
New RTL-SDR Driver with LNA/Mixer/VGA Gain Settings and Software Decimation

New R820T Driver with LNA/Mixer/VGA Gain Settings

A few weeks ago we posted about an unreleased modified RTL-SDR driver for SDR# by mm6dos which had controls for the three separate gain stages available in the R820T and some extra controls for controlling software decimation and the IF filter. While that particular driver has not yet been released, a modified driver from randaller, another driver coder has been released. His modified driver enables the LNA/Mixer/VGA gain controls, but does not enable any IF filter or decimation settings.

In the standard R820T driver one of the gain stages is locked to a pre-specified value and the the gain slider is a function of the other two gain values. Having full manual control over all three gain stages may help with optimizing signal SNR levels and reducing noise.

To install the driver simply extract the contents of the zip file from the sourceforge download into the sdrsharp folder. Then open the SDRSharp.exe.Config file in a text editor and add the line  in the section. Then in SDR# you can choose “RTL-SDR / GUSB” from the source menu to use the new driver.

Modded Driver with Extra Gain Controls
Modded Driver with Extra Gain Controls

Demo of a New R820T Driver with extra Gain, Decimation and IF Filter Adjustments

Over on YouTube user mm6dos has uploaded a video showing a new driver he helped develop for the R820T tuner which is used in the most commonly purchased RTL-SDR dongles. He writes:

A short demonstration of a new non-gpl RTL2832U / R820T driver specifically written for SDR#. The R820T tuner actually contains a configurable IF filter and 3 separate gain stages. Unfortunately Osmocom’s implementation has fixed this filter and one of the gain stages. Aliasing and overloading is significantly reduced using this driver.

Currently we don’t have a source for the download of this driver, but we assume that it will be released soon. The videos below show the driver in action, with the first video showing the IF filter adjustments and the second video showing the software decimation feature.