Linrad with rtlsdr with and the e4000 tuner.

Leif Asbrink leif at
Wed Jul 4 21:45:44 UTC 2012

Hello Steve,

> > We still have to add functions to set the IF-gain from external
> > applications, this is something on the todo-list.
> OK. Do you have an idea about the time scale? It would be
> a good thing from my perspective if this would be implemented
> before I release the next Linrad version. 
Since there was  no response on this I have released
a new version of Linrad with new versions of rtlsdr.c
and tuner_e4k.c to go with it.

Performance is now quite good. The noise figure is 7 dB
with a dynamic range of about 74 dB (saturation vd MDS in 500 Hz.)
When gain is reduced for a noise figure of 10 dB the dynamic
range is 80 dB, 6 dB below the theoretical limit.

The gain setting is clumsy, I just added some things that
seem similar to the existing routines. It seems to me that
a new approach would be desireable. If one wants to set
the gain of the E4000 chip by use of a single parameter
one has to use some of theIF gain controls as well as the
mixer gain and the lna gain. I have not been able to see
any effect of the enhanced gain.

I tried various bits blindly and found a setting that
eliminates the AGC in the RTL2832 chip. That is a significant
part of the performance improvement.

Today the rtlsdr with Linrad under Linux is not a toy. It is
a surprisingly good SDR receiver (in relation to cost.)
Performance is about 20 dB below what we find in standard
transceivers like IC706MKIIG and others.

I do not know how to proceed. I see two options:

1) librtlsdr is rewritten with a gain setting routine that 
operates on lna, IF and mixer gains in a way that optimizes

2) I will provide a Linrad specific library that supports
only the RTL2832/E4000 combination.

I expect the simple change required to disable AGC in RTL2832
to be implemented pretty soon. Hopefully ExtIO_RTLSDR.dll and
SDRSharp will soon be updated to remove the AGC. A gain setting
function would surely make these softwares far more useful.

I think the best way of setting the e4k gain would be to
place a matrix in tuner_e4k.c with as many rows as the
number of stages that we want to use for gain setting
and as many columns at the number of different nominal gains
ẅe want to supply. That would be a lot of code to remove
and not much to add - but I do not wish to take desicions 
for osmocom. Linrad-04.40 still uses its own callback and
I may have to supply source code  for todays version of
tlsdr to go with it. In case the standard library from 
osmocom implements AGC off and a sensible routine for manual 
gain control I will adapt Linrad to the standard library.

 Leif / SM5BSZ

More information about the osmocom-sdr mailing list