So as I mentioned, I was planning to make two projects. As the first one took a long time, I just had a couple of days to finish this one and publish it. Unfortunately, it didn't work due to couple of reasons:

  • Initial plan was to write some sort of wrapper to rtl_adsb and display an offline map as popular dump1090 uses Google Maps API and needs Internet connection. I was running out of time so decided to use dump1090 instead. So map displaying needs a WiFi connection.
  • Small screen meant that I cannot display the map on the LCD. No problem for me as I always carry my tablet with me. Entering the IP of Beaglebone Black on the tablet browser means I can view the map on a much bigger screen. This also means I can zoom in and out easily as the resistive touchscreen does not have multi-point touch capability.
  • At the very last minute, the cell phone charger I was planning to use went haywire and does not power anything! So the project was is not portable and sitting on my desktop instead of an enclosure.

Compiling ADS-B Software

The software I'm using is called dump1090. It is really nice and slim and has a couple of variants on the Internet. The one I used is from here. To compile it, you just have to do the following steps:

root@beaglebone:~# git clone git://github.com/antirez/dump1090
root@beaglebone:~# cd dump1090
root@beaglebone:~/dump1090# export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
root@beaglebone:~/dump1090# make






 

You have to do the export step as dump1090 will complain about not being able to find a package it needs to compile and give tons of errors. Also while at it, it may be best to change the center of the map. Lines 42-43 of gmap.html reads:

    CenterLat=45.0;
    CenterLon=9.0;






 

I changed these to (roughly) the coordinates of Tokyo. Now it reads:

    CenterLat=35.0;
    CenterLon=139.0;






 

And you are done. You can connect your RTL dongle and get messages on your console by typing

root@beaglebone:~/dump1090# ./dump1090 --interactive --net






 

--net option at the end enables the browser map option. This is my usual configuration.

 

Configuring WiFi Adapter

The WiFi adapter is really easy to configure. You just need the SSID and password of your access point. I just used the tutorial supplied by the manufacturer. You first need to encrypt your password. You can do this by:

root@beaglebone:~/Desktop# wpa_passphrase SSID password
network={
        ssid="SSID"
        #psk="password"
        psk=encrypted_password
}






 

Now open up the /var/lib/connman/wifi.config file and insert:

[service_home]
Type = wifi
Name = SSID
Passphrase = encrypted_password






 

You can probably enter multiple configurations to this file although this is not tested by me. You then unplug the Ethernet cable, and reboot your Beaglebone Black for it to connect through WiFi adapter.

 

Antenna

The stock antenna does not give you enough range so it's better that you make your own antenna. RTL dongle uses MCX connectors, which are small, so I bought both straight and right angled MCX jacks, a coaxial cable crimper and a few meters of 1.5C-2V coaxial cable. The cable I chose was locally available from Akihabara and it was a suitable size for the MCX connectors and the right impedance, 75 ohms, for the RTL dongle. I connected one straight and one right angled connector to short lengths of coaxial cable. Here you can see them before I put the heat shrink tubing on to blend in the crimped ferrule, 1 yen coin is for reference.

DSC_0157-600.jpg

My initial decision was to follow this tutorial and make a colinear antenna. But as it turns out, wavelength for 1090 MHz is roughly 275 mm and this means my antenna has to be about 55 cm long! Not suitable for mobile use. Then I decided to make a real simple dipole antenna via this tutorial. I directly soldered the center conductor and jacket to short lengths of wire, secured it to a chopstick for stability, trimmed the antenna to size and wrapped it with electrical tape.

DSC_0158-600.jpg

Now I have a real ghetto antenna for ADS-B.

 

Shell Scripts for Mobile Use

For mobile usage, I won't be connected through SSH, so I need some way to learn the IP address and then run dump1090. For this I created two separate shell scripts on the Desktop and made them executable. The first one is called wifi-ip.sh

#!/bin/bash
ifconfig ra0
sleep 5






 

This displays the information about the WiFi adapter, waits for 5 seconds, then exits. The wait is needed as it is run, it quickly displays the information and quits. The second one is called adsb.sh

#!/bin/bash
cd ~/dump1090
./dump1090 --interactive --net






 

For this one, the change directory command is needed as it cannot find the webpage if it's run from a different directory.

 

System

The system currently consists of a USB hub connected to the Beaglebone Black, WiFi adapter and RTL dongle connected to it. It's powered by the supplied 5 V adapter and sitting on my desktop. The range is not great as it sits indoors and ADS-B is line of sight. Once I get it mobile, I'm planning to go near Haneda Airport and see the traffic with it. I will upload the video of the system as soon as I'm able to receive some information of air traffic. Video has been finally converted.