RTL-SDR

From YobiWiki
Jump to: navigation, search

Contents

Resources

Trekstor DVB-T Stick Terres 2.0

19.99€ at Saturn in Berlin
It contains hopefully the RTL2832U, together with Elonics E4000 tuner
Seen by lsusb as 1f4d:c803 G-Tek Electronics Group, which matches Lifeview LV5TDeluxe according to osmocom

/var/log/syslog

New USB device found, idVendor=1f4d, idProduct=c803
New USB device strings: Mfr=1, Product=2, SerialNumber=3
Product: RTL2838UHIDIR
Manufacturer: Realtek
SerialNumber: 00000001
$ rtl_test -t
Found 1 device(s):
  0:  Lifeview LV5TDeluxe

Using device 0: Lifeview LV5TDeluxe
Found Elonics E4000 tuner
Supported gain values (14): -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 
Benchmarking E4000 PLL...
[...]
E4K range: 52 to 2212 MHz
E4K L-band gap: 1107 to 1241 MHz

Trekstor DVB-T Stick Terres mini

29.99€ at Saturn in Berlin
NOT based on RTL2832!!
NOT recognized by rtl_test

New USB device found, idVendor=187f, idProduct=0202
New USB device strings: Mfr=1, Product=2, SerialNumber=0
Product: MDTV Receiver
Manufacturer: MDTV Receiver
firmware: agent aborted loading dvb_nova_12mhz_b0.inp (not found?)
$ rtl_test -t
No supported devices found.

I promptly returned it to the shop.


Kali-packaged softwares

Install

Gnuradio v3.5 is available in LMDE but does not contain rtl-sdr support
Gnuradio v3.7 is available in Debian but most third party sw does not support yet the v3.7 API
Gnuradio v3.6 is available in Kali
See here how to add Kali repositories, which is the one we'll choose.
Add to /etc/apt/preferences.d/kali-package-repositories.pref

Package: /gnuradio/ /^gr-/ /hackrf/ /rtlsdr/ kalibrate-rtl /libosmo/ gqrx /multimon/ /uhd-/ /libvolk/
Pin: release n=kali
Pin-Priority: 990
apt-get install gnuradio gnuradio-dev gnuradio-doc libgnuradio-baz libgnuradio-grextras libgnuradio-iqbalance libgnuradio-osmosdr libgnuradio-osmosdr-apps \
  librtlsdr-bin hackrf-tools kalibrate-rtl rtlsdr-scanner gr-scan gqrx multimon-ng gr-air-modes

rtl-sdr

Is available in Debian as rtl-sdr and in Kali as librtlsdr-bin

rtl_test -t

Play radio, 96.3MHz:

rtl_fm -f 96.3e6 -W -s 200000 -r 48000 - | aplay -r 48k -f S16_LE

If needed, from sources:

git clone git://git.osmocom.org/rtl-sdr.git
cd rtl-sdr
mkdir build
cd build
cmake ../
make
cd ../build/src
./rtl_test -t

Sources contain one additional tool:

./rtl_power -f 88M:108M:125k -1 fm_stations.csv
./rtl_power -f 100M:1G:1M -i 5m -1 survey.csv

To analyze the result:

wget -O heatmap.py http://kmkeen.com/tmp/heatmap.py.txt
python heatmap.py survey.csv survey.png
python heatmap.py fm_stations.csv fm_stations.png

GNURadio

gqrx

gqrx

RTLSDR Scanner

rtlsdr-scanner

If needed, can also come from sources:

git clone https://github.com/EarToEarOak/RTLSDR-Scanner
cd RTLSDR-Scanner/git
ln -s ../../pyrtlsdr/rtlsdr
./rtlsdr_scan.py

kalibrate-rtl

kal

TODO

osmocom

osmocom_siggen
osmocom_siggen_nogui
osmocom_spectrum_sense
osmocom_fft

TODO

gr-scan

TODO

gr-air-modes

TODO

pyrtlsdr

Python wrapper for rtl-sdr

git clone https://github.com/roger-/pyrtlsdr

waterfall

git clone https://github.com/keenerd/rtlsdr-waterfall
cd rtlsdr-waterfall
ln -s ../pyrtlsdr/rtlsdr 
sudo apt-get install python-pyglet
./waterfall.py
use: waterfall.py <lower freq> <upper freq>
   frequencies in hertz
   example: waterfall.py 929e6 930e6
   arrow keys pan and zoom (shift for bigger steps)
   brackets to adjust gain
   click and drag to select
   A for autocorrelation
   C for constellation
   esc to quit
./waterfall.py 92e6 93e6

Quite detailed waterfall
Select with mouse -> constellation (C) or autocorrelation (A)

rtlizer

git clone https://github.com/csete/rtlizer
./build
./rtlizer 640x360+0+0

Quite fast to scan quickly with arrow keys

SDR#

sudo apt-get install mono-complete monodevelop
sudo apt-get install libportaudio2
svn co https://subversion.assembla.com/svn/sdrsharp/trunk sdrsharp.svn
cd sdrsharp.svn/
monodevelop

Open file .sdl
If opened as text, modify version 12 -> 11 and open again
Switch to Release; Build All; Exit
cd Release/ Edit SDRSharp.exe.config
=> enable RTLSDR

ln -s /usr/lib/x86_64-linux-gnu/libportaudio.so.2 libportaudio.so
ln -s /usr/lib/x86_64-linux-gnu/librtlsdr.so.0 librtlsdr.so
mono SDRSharp.exe

ADS-B

rtl_adsb

rtl-sdr contains already a basic decoder:

 Use:	rtl_adsb [-R] [-g gain] [-p ppm] [output file]
	[-d device_index (default: 0)]
	[-V verbove output (default: off)]
	[-S show short frames (default: off)]
	[-Q quality (0: no sanity checks, 0.5: half bit, 1: one bit (default), 2: two bits)]
	[-e allowed_errors (default: 5)]
	[-g tuner_gain (default: automatic)]
	[-p ppm_error (default: 0)]
	filename (a '-' dumps samples to stdout)
	 (omitting the filename also uses stdout)

dump1090

Dumping ADS-B aeronautic data from 1090MHz

sudo apt-get install librtlsdr-dev
git clone https://github.com/antirez/dump1090.git
make

Usage:

./dump1090
./dump1090 --help
./dump1090 --interactive --net --enable-agc --metric

With "--net" go to http://127.0.0.1:8080

Actually this fork is much more advanced:

git clone https://github.com/MalcolmRobb/dump1090
make

Antenna

I decided to construct my own 1090MHz antenna and I chose a folded dipole to coax 4:1 balun because the folded dipole makes it more rigid than 2 wires dandling in opposite directions and the balun is very easy to do out of coax cable.
Instructions: half wavelength is ~137mm, so is the dipole length. Length of the coax balun is about 90mm with a velocity factor of 0.66.
That's it.
See pic from Wikipedia for wiring.

To be held vertically
Antenna1090.jpg

Here is a quick test done with dump1090 (MalcolmRobb's fork) on the balcony (south-south-east) on 10/11/2013 at 23:37, a time when the sky was quite calm.

Dump1090 1.png

I'm located in Brussels and the farthest aircraft seen is GFA6, travelling from London to Bahrain and passing over Bitburg, 183 km away from my little antenna.
Not that bad!

To compare, here is the exhaustive list of aircrafts by flightradar24 at the same time:

Dump1090 201311102337 flightradar.png

DAB

rtltcpaccess

It allows to run the Terratec NOXON DAB MediaPlayer under wine, replacing the original RTL283XACCESS.dll by a hook to rtl_tcp

git clone https://github.com/steve-m/rtltcpaccess
./dab_install.sh

Run in a window:

rtl_tcp

Then in another one:

wine "$(winepath -u "C:\Program Files\NOXON Media\NOXON DAB MediaPlayer\NOXON DAB MediaPlayer.exe")"

SDR-J

cf http://www.sdr-j.tk/index.html
TODO

DVB-T

After all it's initially a DVB-T receiver, isn't it?


Personal tools
Namespaces

Variants
Actions
Navigation
Tools