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.
Introduced new patched version with full registers set control.
Thx for sharing
Thx for sharing the project.
Are these controls exposed in sdrsharp or other windows versions?
You may use these controls with sdr#, rtl_tcp and in any other software, that uses rtlsdr.dll
I had ported this project to windows: https://sourceforge.net/projects/librtlsdr-wincontrol/
Awesome, Thank you! Was looking into doing this myself, glad you beat me to it.
A few notes:
1. This works OK with the Thumbnet N3 (btw, I know Akos had some problems with that model possibly causing his USB hub to blow out; will there be a review on this blog?).
2. I am using Ubuntu Xenial Xerus (16.04) 64-bit. It works OK but I had a little trouble getting r820tweak to run without errors. The trick (and this may be specific to the Thumbnet N3?) is to run gqrx and then run r820tweak:
> r820tweak gqrx #r820tweak GUI panel will fail to load but will still launch gqrx with driver
Also note that on Ubuntu install wxpython is a bit of a pain (PIP doesn’t want to work, use apt-get to install it).
3. I am really impressed by the effort that Milen has put into testing these settings and their effects. I had some questions on the Reddit thread (texasyojimbo over there) and he had really good answers to all of them. Well done Milen!
Thank you – that information was very helpful!
Thanks to the OP.
Works like a charm
Is available for windows ? When make for windows this driver ?
Will it be available for Windows based systems?