Software-defined radio (SDR)

You can get a cheap DVB-T usb dongle and connect it to the Raspberry Pi which act as the server, operating the DVB-T usb dongle and functioning as the SDR Remote Internet Server.

For the Rasberry Pi I am using the software tools from RTL-SDR: http://sdr.osmocom.org/trac/wiki/rtl-sdr

DVB-T dongles must based on the Realtek RTL2832U chipset since the chip allows transferring the raw I/Q samples to the host, which is officially used for DAB/DAB+/FM demodulation.

If you want to use it for hamradio / amateur radio you can use a special RTL SDR which covers 100KHz to 1.5GHz.
It contains the tuner itself and converter for HF bands plus a Low Noise Amplifier for HF.
My friend - Jani, HG8LFK - designed and built this special RTL SDR and that is what I am using for my Raspberry Pi.

You can order it from here: http://janielectronics.com/index.php?route=product/product&product_id=94

Let`s start the project... go to the SDR Configuration tab

Start SDR Server

Open Terminal and login. Enter:
rtl_tcp -a 192.168.1.110&


192.168.1.110 >>> example of an internal IP-Address
'&' at the end if you want to run the server after the terminal windows has been closed

SDR Server Configuration

On the Raspberry Pi (latest Wheezy) run the followings:

sudo apt-get install pkg-config
sudo apt-get install libusb-1.0
sudo apt-get install cmake

sudo apt-get install git

git clone git://git.osmocom.org/rtl-sdr.git

cd rtl-sdr/
mkdir build
cd build
cmake ../ -DINSTALL_UDEV_RULES=ON
make
sudo make install
sudo ldconfig


and now connect your DVB-T dongle and run the following (of course enter your own Raspberry Pi`s IP address) :

rtl_tcp -a 192.168.0.22

and now your Remote Software-defined radio (SDR) Server up and running !!!

Start a client application on your computer anywhere in the world, I prefer to use SDRSharp and select RTL-SDR/TCP and enter the IP address of
the Remote Raspberry Pi (port by defult:1234) and click Play. (Of course you need to make a port foward for the used port in your home router)

Now you can listen anything which can be heard by the Remote SDR Raspberry Pi Server from anywhere in the world !!!

This solution is useful for "Remote QTH" where you can connect it to your large array of yagis or HF beam or long wire antennas and listen in from anywhere over the Internet.

I have created a video record of the Raspberry Pi configuration and using the SDRSharp application.
Watch it in High Definition to see the linux commands.

Good luck with it!

YouTube: http://youtu.be/LYX-xYm1rtE


If you want to listen a broadcast radio station using your server default audio device, you can use the following command:

server:~$ sudo rtl_fm -f 101.7e6 -M wbfm -s 200000 -r 48000 - | aplay -r 48k -f S16_LE
Found 1 device(s):
0: Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Tuner gain set to automatic.
Tuned to 102016000 Hz.
Oversampling input by: 6x.
Oversampling output by: 1x.
Buffer size: 6.83ms
Sampling at 1200000 S/s.
Output at 200000 Hz.
Playing raw data 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono

This case I tuned to Radio Energy Bern (101.7) and output it to the server internal speakers using aplay as player.

If problem with the audio, ensure that the audio card is being picked up.

In a terminal excute this command.
Code:
lspci
That will list that hardware that is recognized, ensure that something in that list mentions audio.

If you have an audio device listed there, then try playing around with alsamixer
Code:
sudo alsamixer
This program allows you to check the various audio sources and outputs.
1. Check if the sliders are all the way up.
2. Make sure all of the channels are unmuted (00) <- should be highlighted green.

Raspberry PI ADS-B (1090MHz)
Aircraft Monitoring Network Server

If you have already configured your Raspberry Pi for SDR (see my article Remote Software-defined radio) then you can also use it for a flight traffic monitoring device.

SDR Server Configuration

To get a good reception on 1090MHz it is better to build an antenna tuned on this band.
Note:
On this high frequency you will have relatively high loss on any type of coaxial cable but if you add WIFI adapter to your Raspberry Pi then you can place it up on the roof near the ADS-B antenna, so there won`t be needed long coaxial cable, much less signal loss.

Raspberry Pi configuration is the following (once the SDR is configured):

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

Now let`s try, when you type "./dump1090 --interactive", if you've got everything installed, compiled and connected correctly then you should see a screen displaying aircraft being received by your Raspberry Pi.

./dump1090 --interactive

Now let`s make the Raspberry Pi act as a network server supplying flight traffic data captured by the SDR to your remote host, which can be for example a Plane Plotter software running on a Windows computer anywhere in the world.

We are telling now the Raspberry Pi to start the ADS-B in network mode.

./dump1090 --interactive --net

You should see the same display as before on the Raspberry Pi screen, but the extra command switches should enable a network server that will allow the Plane Plotte software running on your PC to connect to the Raspberry Pi.

To run the command so that it continues to work after you logout from the Raspberry Pi, you can run a command such as:

./dump1090 --quiet --net &

Next, you need to configure Plane Plotter to talk to the Raspberry Pi.

1) Start Plane Plotter on your PC.

2) Select Options => Mode-S Receiver => RTL dongle RPi dump1090 => Setup TCP/IP client.

3) In the window that appears, type in the IP address of your RPi on your local network, followed by ":30005". So in my case "192.168.0.22:30005". Then click OK.

4) Select Options => I/O settings.

5) In the dialog that appears check the Input data, Mode-S/ADS-B box, and select "RTL > RPi+Dump1090" from the list window to the right.

6) Press the green circle on the toolbar to start Plane Plotter monitoring. The planes that are appearing on the Raspberry Pi screen should now start to appear on your Plane Plotter screen.

See my screenshot showing the locally captured aircrafts in my area, near Bern Airport in Switzerland.

For example flight HB-AER is an airplane of Skywork Airlines.


Troubleshooting Tip

If you have problem like this:

zsolt@server:~$ rtl_tcp -a 192.168.0.12&
[2] 12894
[1] Done gnuradio-companion
zsolt@server:~$ Found 1 device(s):
0: Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM

Kernel driver is active, or device is claimed by second instance of librtlsdr.
In the first case, please either detach or blacklist the kernel module
(dvb_usb_rtl28xxu), or enable automatic detaching at compile time.

usb_claim_interface error -6
Failed to open rtlsdr device #0.



it means the kernel driver (dvb_usb_rtl28xxu) is incorrect, so you have to remove it from the memory first:



zsolt@server:~$ sudo rmmod dvb_usb_rtl28xxu

then it should work

zsolt@server:~$ sudo rtl_tcp -a 192.168.0.12&
[1] 14160
zsolt@server:~$ Found 1 device(s):
0: Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Tuned to 100000000 Hz.
listening...
Use the device argument 'rtl_tcp=192.168.0.12:1234' in OsmoSDR (gr-osmosdr) source
to receive samples in GRC and control rtl_tcp parameters (frequency, gain, ...)

but when you reboot your linux you will have the same problem so you have to blacklist this driver:

zsolt@server:~$ cd /etc/modprobe.d

zsolt@server:/etc/modprobe.d$ sudo nano blacklist-rtl.conf
add only the following text in the blacklist-rtl.conf and save and exit and reboot your server

blacklist dvb_usb_rtl28xxu

Admin