Before diving into some of the more challenging and arcane "upper atmosphere" options to use RTL-SDR, we will do a recipe that's a little easier and more down to Earth, namely tracking planes.
This recipe is derived from a variety of sources, including David Scheltema's tutorial on Make Magazine (http://makezine.com/projects/tracking-planes-with-rtl-sdr/), which is a Debian variation on an RPi version. It also comes via the posts of David Taylor of Edinburgh, Scotland (satsignal.eu/raspberry-pi/dump1090.html) and Drew Fustini of Chicago, Illinois (element14.com/community/community/designcenter/single-board-computers/blog/2014/04/07/sdr-and-sbc-cheap-thrills-with-radio-waves) for Angstrom on the BBB. Additionally, Adafruit has a lesson for the RPi, which either borrows from or is inspired by the references mentioned before. All of these miss some steps, however, to make it fly on the current BeagleBone Black Debian distros, be it Wheezy or Jessie.
Here are the materials needed:
Perform the following steps:
$ sudo apt-get update && sudo apt-get upgrade
$ lsusb
The output should look similar to this, with the Realtek SDR dongle appearing:
Bus 001 Device 002: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838 DVB-T Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
# sudo -i
cmake
, a tool that we came across in an earlier chapter. As a reminder, cmake
is an alternative method to build packages and can be installed as follows:# apt-get install cmake
# apt-get install libusb-1.0-0-dev
# git clone git://git.osmocom.org/rtl-sdr.git # cd rtl-sdr # cmake ./ -DINSTALL_UDEV_RULES=ON # make
# make install
# cd # git clone https://github.com/antirez/dump1090.git # cd dump1090 # make
# echo "/usr/local/lib/" >> /etc/ld.so.conf
dump1090
directory:# cd /home/debian/dump1090 # ./dump1090
If your RTL dongle/scanner is operating as it should, the command will begin quickly dumping any nearby aircraft to standard output. If you use the small antenna that came with your dongle, its range will be very limited. Press Ctrl + C to interrupt the command.
$ ./dump1090 --interactive --net --net-http-port 8081
This last command and its options tell dump1090
to begin outputting data in a more viewable form. One version of this output is immediately visible in your terminal window, with the data refreshed continuously and sorted into tidy columns by flight number, altitude, speed of aircraft, latitude, and so on.
Even more interesting is the --net-http-port 8081
option, which sends the data via HTTP to a specified port—in this case, the 8081 port. With this option enabled, we can open a browser and access a web page with some JavaScript, and the Google Map API is available as part of the installed package.
http://beaglebone.local:8081/
http://192.168.7.2:8081/
http://your_bbb_ip:8081/
You will immediately see a Google Map along with a sidebar window showing a rollup of the data. Move the map around until it is positioned at your current location, and you should see plane icons appearing. Clicking on an icon pulls this particular flight's data into the frame.
Watch the icons closely to see what kind of general range your receiver and antenna are getting before the aircraft disappears from the screen.
18.221.154.151