Linux Format

Track and scan planes

Use your Raspberry Pi to track aircraft or detect local devices to keep an eye on all kinds of data.

-

Over the last few years, there has been much talk of software-defined radio (SDR – see LXF273). This is a way for a generic piece of receiver hardware to be repurposed to scan different frequencie­s or be used for a whole variety of purposes.

One example of this is the Realtek RTL2832U+R820T2-based

USB stick (around £35), which was originally intended to be used as a TV receiver. For this project, we will briefly introduce how this receiver can be used to receive ADS-B signals from passing aircraft and how this informatio­n can be fed into a web service that aggregates signals from many users, from across the globe. The second thing we will discuss is how to use the same receiver to scan for any local devices that send data at 433MHz or 868MHz.

Plane tracking

ADS-B Exchange is a service that aggregates data from a huge number of receivers, which are situated across the globe. The project styles itself as the world’s largest source of unfiltered flight data. Some other services only display certain types of flights – for example, they exclude military aircraft. To install the project’s image, utilise the Raspberry Pi Imager to install a custom image, which can be downloaded from the following link: www.adsbexchan­ge.com/how-tofeed/adsbx-custom-pi-image.

Once written, the card can be put into your Raspberry Pi, the receiver can be connected via USB and it can then be connected to the power. After booting, connect to the ADSBx-config Wi-Fi SSID and, from a browser, visit http://adsbexchan­ge.local. Click on Wi-Fi Setup and add the details for your home network. Get reconnecte­d to your home network, visit the same address again and select Configure Receiver/ Location. From here, add your longitude and latitude, and select the Save And Reboot option.

A reboot later, connect to the same address again and explore the interface, which shows any detected planes or helicopter­s. If you wish, you can enable the Use Custom LED Indication­s setting, which repurposes the Pi’s LEDs to give you an idea of what is currently being detected. To determine whether your own instance is reporting data back to ADSB-Exchange, you can visit http://adsbexchan­ge.com/myip – this queries the database, using your internet-facing IP address. The initial password for the Pi user is adsb123 and this should be changed using the Change Password option from the web GUI. Once this has been changed, access via SSH and for the web GUI uses your new password. The local interface can display graphs of detected aircraft and a map display. Viewing from the following address displays aggregated data: https://globe. adsbexchan­ge.com.

Scanning at home

When preparing this tutorial, we were able to detect and interpret the data from an Oregon weather station. This data could then be used to feed online services or sent, via MQTT, to a local home automation system.

To set up the relevant software, first of all prepare a new installati­on of Raspberry Pi OS using the instructio­ns on the build your own Wi-Fi router project

(see opposite page). Once this has been completed, connect the receiver to a free USB port and install the necessary software:

$ sudo apt install rtl-433

Once installed, the following two commands can be used to scan at either 433MHz or 868MHz:

$ sudo rtl_433 -C si

$ sudo rtl_433 -f 868M -s 1024k

Running these commands for a few minutes each determines what devices are transmitti­ng on these frequencie­s and what useful informatio­n can be utilised from them. While running the commands, look for any old remote-controlled sockets, remotes and devices of that nature that could be utilised. Data returned can be reformatte­d into JSON and piped to an MQTT server, for further usage:

$ rtl_433 -F json -M utc | mosquitto_pub -t

home/rtl_433 -l

Further informatio­n about this useful tool can be found at https://github.com/merbanan/rtl_433.

 ?? ?? Live aircraft tracking data from our Raspberry Pi. Elon, is that you?
Live aircraft tracking data from our Raspberry Pi. Elon, is that you?

Newspapers in English

Newspapers from Australia