Aircraft ACARS monitoring with RTL-SDR dongle & BeagleBone Black

In aviation, ACARS (an acronym for Aircraft Communications Addressing and Reporting System) is a digital datalink system for transmission of short messages between aircraft and ground stations via airband radio or satellite.

ACARS is also used to send information from the aircraft to ground stations about the conditions of various aircraft systems and sensors in real-time.



If you have a Raspberry Pi, it costs about 50EUR and an RTL USB dongle cost about 20 EUR, so the total 70EUR

Cost saving: 565-70= 495 EUR
Kinetic SBS-3 Virtual Radar

 


Installation

(note: need RTL-SDR support to be installed on your system first, guides on SignalRaiders.com)


Welcome to Ubuntu 12.04.3 LTS (GNU/Linux 3.8.13-bone30 armv7l)

ubuntu@ubuntu-armhf:~$ lsusb
Bus 001 Device 002: ID 0bda:2838 Realtek Semiconductor Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
ubuntu@ubuntu-armhf:~$ cd rtl-sdr/
ubuntu@ubuntu-armhf:~/rtl-sdr$ rtl_test
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
Found Rafael Micro R820T tuner
Supported gain values (29): 0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6

Info: This tool will continuously read from the device, and report if
samples get lost. If you observe no further output, everything is fine.

Reading samples in async mode...
lost at least 188 bytes
Signal caught, exiting!

User cancel, exiting...

ubuntu@ubuntu-armhf:~$ mkdir acars
ubuntu@ubuntu-armhf:~$ cd acars
ubuntu@ubuntu-armhf:~/acars$ wget http://sourceforge.net/projects/acarsdec/files/latest/download -O acarsdec-2.3.tar.gz

Saving to: `acarsdec-2.3.tar.gz'

100%[======================================>] 501,621 1.62M/s in 0.3s

2014-04-12 10:49:39 (1.62 MB/s) - `acarsdec-2.3.tar.gz' saved [501621/501621]

ubuntu@ubuntu-armhf:~/acars$ tar xvfz acarsdec-2.3.tar.gz
./acarsdec-2.3/
./acarsdec-2.3/Makefile
./acarsdec-2.3/soundfile.c
./acarsdec-2.3/syndrom.h
./acarsdec-2.3/acars.c
./acarsdec-2.3/test.wav
./acarsdec-2.3/output.c
./acarsdec-2.3/msk.c
./acarsdec-2.3/acarsdec.h
./acarsdec-2.3/alsa.c
./acarsdec-2.3/main.c
./acarsdec-2.3/README
./acarsdec-2.3/rtl.c
ubuntu@ubuntu-armhf:~/acars$ cd acarsdec-2.3
ubuntu@ubuntu-armhf:~/acars/acarsdec-2.3$ make
cc -Ofast -ftree-vectorize -funroll-loops -pthread -D WITH_RTL -D WITH_SNDFILE - D WITH_ALSA -c -o main.o main.c
cc -Ofast -ftree-vectorize -funroll-loops -pthread -D WITH_RTL -D WITH_SNDFILE - D WITH_ALSA -c -o acars.o acars.c
cc -Ofast -ftree-vectorize -funroll-loops -pthread -D WITH_RTL -D WITH_SNDFILE - D WITH_ALSA -c -o msk.o msk.c
cc -Ofast -ftree-vectorize -funroll-loops -pthread -D WITH_RTL -D WITH_SNDFILE - D WITH_ALSA -c -o rtl.o rtl.c
cc -Ofast -ftree-vectorize -funroll-loops -pthread -D WITH_RTL -D WITH_SNDFILE - D WITH_ALSA -c -o output.o output.c
output.c: In function 'outnet':
output.c:122:7: warning: ignoring return value of 'write', declared with attribu te warn_unused_result [-Wunused-result]
cc -Ofast -ftree-vectorize -funroll-loops -pthread -D WITH_RTL -D WITH_SNDFILE - D WITH_ALSA -c -o soundfile.o soundfile.c
soundfile.c:24:21: fatal error: sndfile.h: No such file or directory
compilation terminated.
make: *** [soundfile.o] Error 1
ubuntu@ubuntu-armhf:~/acars/acarsdec-2.3$ sudo apt-get install libsndfile1-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libflac-dev libogg-dev libvorbis-dev libvorbisfile3
The following NEW packages will be installed:
libflac-dev libogg-dev libsndfile1-dev libvorbis-dev libvorbisfile3
0 upgraded, 5 newly installed, 0 to remove and 33 not upgraded.
Need to get 1002 kB of archives.
After this operation, 4283 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y

Get:1 http://ports.ubuntu.com/ubuntu-ports/ precise/main libvorbisfile3 armhf 1. 3.2-1ubuntu3 [16.3 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports/ precise/main libogg-dev armhf 1.2.2~ dfsg-1ubuntu1 [63.7 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports/ precise/main libflac-dev armhf 1.2.1 -6 [198 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports/ precise/main libvorbis-dev armhf 1.3 .2-1ubuntu3 [439 kB]
Get:5 http://ports.ubuntu.com/ubuntu-ports/ precise/main libsndfile1-dev armhf 1 .0.25-4 [285 kB]
Fetched 1002 kB in 0s (1287 kB/s)
Selecting previously unselected package libvorbisfile3.
(Reading database ... 26050 files and directories currently installed.)
Unpacking libvorbisfile3 (from .../libvorbisfile3_1.3.2-1ubuntu3_armhf.deb) ...
Selecting previously unselected package libogg-dev.
Unpacking libogg-dev (from .../libogg-dev_1.2.2~dfsg-1ubuntu1_armhf.deb) ...
Selecting previously unselected package libflac-dev.
Unpacking libflac-dev (from .../libflac-dev_1.2.1-6_armhf.deb) ...
Selecting previously unselected package libvorbis-dev.
Unpacking libvorbis-dev (from .../libvorbis-dev_1.3.2-1ubuntu3_armhf.deb) ...
Selecting previously unselected package libsndfile1-dev.
Unpacking libsndfile1-dev (from .../libsndfile1-dev_1.0.25-4_armhf.deb) ...
Setting up libvorbisfile3 (1.3.2-1ubuntu3) ...
Setting up libogg-dev (1.2.2~dfsg-1ubuntu1) ...
Setting up libflac-dev (1.2.1-6) ...
Setting up libvorbis-dev (1.3.2-1ubuntu3) ...
Setting up libsndfile1-dev (1.0.25-4) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
ubuntu@ubuntu-armhf:~/acars/acarsdec-2.3$ sudo apt-get install libasound2-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
libasound2-doc
The following NEW packages will be installed:
libasound2-dev
0 upgraded, 1 newly installed, 0 to remove and 33 not upgraded.
Need to get 70.6 kB of archives.
After this operation, 418 kB of additional disk space will be used.
Get:1 http://ports.ubuntu.com/ubuntu-ports/ precise-updates/main libasound2-dev armhf 1.0.25-1ubuntu10.2 [70.6 kB]
Fetched 70.6 kB in 0s (334 kB/s)
Selecting previously unselected package libasound2-dev.
(Reading database ... 26369 files and directories currently installed.)
Unpacking libasound2-dev (from .../libasound2-dev_1.0.25-1ubuntu10.2_armhf.deb) ...
Setting up libasound2-dev (1.0.25-1ubuntu10.2) ...
ubuntu@ubuntu-armhf:~/acars/acarsdec-2.3$ sudo apt-get install librtlsdr
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package librtlsdr
ubuntu@ubuntu-armhf:~/acars/acarsdec-2.3$ make
cc -Ofast -ftree-vectorize -funroll-loops -pthread -D WITH_RTL -D WITH_SNDFILE - D WITH_ALSA -c -o soundfile.o soundfile.c
cc -Ofast -ftree-vectorize -funroll-loops -pthread -D WITH_RTL -D WITH_SNDFILE - D WITH_ALSA -c -o alsa.o alsa.c
cc main.o acars.o msk.o rtl.o output.o soundfile.o alsa.o -o acarsdec -lm -pthre ad -lrtlsdr -lsndfile -lasound
ubuntu@ubuntu-armhf:~/acars/acarsdec-2.3$ touch run-acars
ubuntu@ubuntu-armhf:~/acars/acarsdec-2.3$ nano run-acars

add the following in the "run-acars" file:

./acarsdec -p -0 -r 0 131.525 131.550 131.725 131.825



// please note the -p parameter is the ppm correction for your dongle,
// 131.525 131.550 131.725 131.825 are the frequencies are for Europe



ubuntu@ubuntu-armhf:~/acars/acarsdec-2.3$ chmod +x run-acars
ubuntu@ubuntu-armhf:~/acars/acarsdec-2.3$ ./run-acars
Found Rafael Micro R820T tuner
Exact sample rate is: 1000000.026491 Hz

[#4 (F:131.825 L:-16 E:0) 12/04/2014 10:55:14 --------------------------------
Aircraft reg: .HL8227 Flight id: KE0914
Mode: 2 Msg. label: H1
Block id: 7 Ack: !
Msg. no: D26D
Message :
#DFB18,107.1,0,01.6,0.01,0.02,00.6
V1,269,043,0.63,0.25
V2,329,154,0.31,0.21
:



[#3 (F:131.725 L:-12 E:0) 12/04/2014 10:55:54 --------------------------------
Aircraft reg: .HB-IOF Flight id: LX238C
Mode: G Msg. label: 13
Block id: 5 Ack: !
Msg. no: M02A
Message :
LSZH,1055,1115

[#3 (F:131.725 L:-11 E:0) 12/04/2014 10:56:07 --------------------------------
Aircraft reg: .HB-IOF Flight id: LX238C
Mode: G Msg. label: 13
Block id: 5 Ack: !
Msg. no: M02A
Message :
LSZH,1055,1115



[#4 (F:131.825 L:-20 E:0) 12/04/2014 11:03:09 --------------------------------
Aircraft reg: .F-HAXL Flight id: SEXLF6
Mode: 2 Msg. label: Q0
Block id: 5 Ack: !
Msg. no: S69A
Message :



[#3 (F:131.725 L:-27 E:2) 12/04/2014 11:03:13 --------------------------------
Aircraft reg: .D-AIKR Flight id: LH0410
Mode: E Msg. label: Q0
Block id: 5 Ack: !
Msg. no: S47A
Message :
and now you have the Aircraft messages :)

You can feed the output to another computer running for eg PlanePlotter (http://www.coaa.co.uk/planeplotter.htm)

./acarsdec -v -n 192.168.0.16:4321 -p 0 -r 0 131.525 131.550 131.725 131.825

where 192.168.0.16:4321 is the Plane Plotter PC's IP address and listening port.