One of the most popular USB gadget in the last years, not only in the ham radio world, is the USB SDR dongle based on the RTL2832 chip.
Many users choose to install this device on Windows platforms because is very easy to configure and to operate it. But, for permanent operation, a Windows client computer or laptop, working continuously, is not an economical solution, from any point of view: occupied space, power consumption, remote administration and so on.
In many cases, the small Raspberry Pi box can replace successfully a Windows solution. At the beginning, the usage of Linux OS is not an easy task for a Windows user, but after few simple projects this will be not an obstacle.
A very simple project, for a Raspberry Pi and USB SDR dongle, is the receiving of the ADS-B signals transmitted by the commercial aircrafts on 1.09 GHz.
ADS-B (Automatic Dependent Surveillance Broadcast) is a cooperative monitoring traffic/protocol used by an aircraft to to send it GPS position, speed, direction and status to other air participants and control towers.
Before start, please note that is important to use only a SDR dongle equipped RTL2832 and tuner R820T. USB sticks with E4000 tuner are not suitable for ADS-B !
Before starting the installation, begin with a general update of the operating system, followed by the upgrading of the installed packages:
# sudo apt-get update ; updates the packages list with the information about the newest versions of packages
# sudo apt-get upgrade ; upgrades the packages according with the newest versions
The following step is the installation of the git repository fetch code, necessary to clone applications from the repository.
# sudo apt-get install git-core
If your Raspbian OS already has this package, you will get a message which informs that you run the up-to-date version.
Next, you have to install the drivers for RTL-SDR USB dongle. First commands set will install the packages which has to be compiled:
# sudo apt-get install git
# sudo apt-get install cmake
# sudo apt-get install libusb-1.0-0-dev
# sudo apt-get install build-essential
The second commands group will install and compile the driver source for the USB dongle:
# 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
The installation is successfully if you don't receive any message after last command execution. If so, the SDR dongle can be connected to an USB port of Raspberry Pi.
A small remark is necessary at this point: many RTL-SDR dongles usually heat up during operation. This is a normal behavior, but this heat means also a high current absorption from the Raspberry Pi. For this reason, it is recommended to use an USB hub, self-powered, in order to protect the Raspberry and to avoid transmitting the heat to the computer.
After you connect the USB dongle to your Raspberry Pi, continue with the following commands:
# cd ~
# sudo cp ./rtl-sdr/rtl-sdr.rules /etc/udev/rules.d/
# sudo reboot
After the system reboots, it remains to check if the Raspberry see the SDR USB device, with the next command:
# rtl_test -t
If the dongle is recognized, the OS returns information about the connected device, like below:
Found 1 device(s):
0: ezcap USB 2.0 DVB-T/DAB/FM dongle
Using device 0: ezcap USB 2.0 DVB-T/DAB/FM dongle
It is possible to get an error message, "Failed to open the rtlsdr device", which is caused by some chipset with gaps in frequency coverage. You can ignore this error while you are sure that it is used a RTL2832 chip.
Next step is the installation of dump1090 application. For this, you have to go to the pi directory, using the command cd /home/pi, followed by:
# git clone git://github.com/MalcolmRobb/dump1090.git
Because this is only the source code, you need to compile it, entering the below commands:
# cd dump1090
# make
If the compilation ends without error, you can finally lauch the application, with the following command:
# ./dump1090 --interactive -net
or
# ./dump1090 --interactive --net &
if you wish to keep the running process in background after you logged out from Raspberry Pi.
Using the above command format, the application will provides the flight information captured from the planes to any connected web browser via default port 8080. If you wish to change it (for example, 8000), insert the following option:
# ./dump1090 --interactive --net --net-ro-port 8000 &
For more options available for dump1090 application, you can use:
# ./dump1090 --help