Installing linrad and rtl-sdr on Linux

1,271 views
Skip to first unread message

Paulino Kenji Sato

unread,
Jul 6, 2012, 3:39:52 PM7/6/12
to ultra-c...@googlegroups.com
Hello,
Some days ago I received my dongle purchased on ebay, and make it work on Linux.
I think that linrad is more simple what GNU Radio (gr-baz) to just
listen know modulation or inspect some band spectrum.
And, is very easy to install.

How to install linrad and rtl-sdr on Linux (and others).
This procedure was done in a Debian 6.0.5 32Bits.
No other modules is loaded to provide support to this DVB-T dongle.
Commands preceded by # denote needs of root privileges.

Packages dependencies:
git
build-essential
cmake
libusb-1.0-0-dev
nasm
libx11-dev
libxext-dev
libusb-dev

Using a non root user, create some work directory and download:
mkdir ~/tmp/sdr-sdr
cd ~/tmp/sdr-sdr
wget http://www.sm5bsz.com/linuxdsp/archive/lir03-40.tbz
wget http://sm5bsz.com/linuxdsp/archive/rtlsdr/librtlsdr.c
wget http://sm5bsz.com/linuxdsp/archive/rtlsdr/tuner_e4k.c

Using git, obtain the source of rtl-sdr, build and install:

git clone git://git.osmocom.org/rtl-sdr.git
cd rtl-sdr/src
mv librtlsdr.c librtlsdr.c.ori
cp ../librtlsdr.c .
mv tuner_e4k.c tuner.e4k.c.ori
cp ../tuner_e4k.c .
cd ..
mkdir build
cd build
cmake ../
make
# make install
The path /usr/local/lib should be present on ld.so.conf.
# ldconfig

Copy the rtl-sdr/rtl-sdr.rules to /etc/udev/rules.d/
# cp ../rtl-sdr.rules /etc/udev/rules.d/

Testing the installation and the dongle, [re]plug the dongle.
$ rtl_test -t
Found 1 device(s):
0: Generic RTL2832U (e.g. hama nano)

Using device 0: Generic RTL2832U (e.g. hama nano)
Found Elonics E4000 tuner
Supported gain values (18): -1.0 1.5 4.0 6.5 9.0 11.5 14.0 16.5 19.0
21.5 24.0 29.0 34.0 42.0 43.0 45.0 47.0 49.0
Benchmarking E4000 PLL...
[E4K] PLL not locked for 51000000 Hz!
[E4K] PLL not locked for 2181000000 Hz!
[E4K] PLL not locked for 1091000000 Hz!
[E4K] PLL not locked for 1226000000 Hz!
E4K range: 52 to 2180 MHz
E4K L-band gap: 1091 to 1226 MHz

Now, installing Linrad.
cd ~/tmp/sdr-sdr
tar -xf lir03-40.tbz
cd linrad-03.40/
./configure

Ignore some MISSING libs and hardware support.

For 32 bits
make xlinrad
Or, for 64 bits
make xlinrad64

To run linrad, create some directory, like ~/linrad and copy xlinrad
or xlinrad64 and *.lir files.

mkdir ~/linrad/
cp xlinrad *lir ~/linrad/
cd ~/linrad
./xlinrad

Now, configure and enjoy.
After, initial configuration questions, open A/D and D/A set up
screen, pressing U.
Press A to RX hardware selection, choose H for RTL2832u, select the dongle [0]
and set desired sample rate. Now, configure the output, B. Return to main screen
pressing X twice, and write configuration, W.
Select demodulation mode, E for FM, and have fun.
If you is newbie on linrad, download this guide from the site of ON4KHG.
http://www.on4khg.be/SDR.html#Linrad%20parameters

References:
http://www.sm5bsz.com/linuxdsp/hware/rtlsdr/rtlsdr.htm
http://sdr.osmocom.org/trac/wiki/rtl-sdr
http://wiki.spench.net/wiki/USRP_Interfaces



73s
Paulino

Jasper Ragworth

unread,
Jul 9, 2012, 4:01:27 AM7/9/12
to ultra-c...@googlegroups.com
If ever a piece of software needed tooltips, it's linrad. Perhaps I'm just spoilt by fancy GUIs. On the plus side, linrad uses a fraction of the CPU of gnuradio-companion and gqrx for simple listening.
Reply all
Reply to author
Forward
0 new messages