Raspberry Pi als passives Flugzeugradar mit dump1090 und DVB-T USB-Stick

Ein grauer Endnovembertag, eine geschlossene tiefhängende Wolkendecke, irgendwo da oben säuseln die Turbinen der Flugzeuge.
Urlaub wäre gut, aber die fliegen ohne mich. Doch wohin und wer fliegt da?
Flugzeuge senden ein Transpondersignal auf 1090MHz. Dieses Signal enthält Standort,Geschwindigkeit, Höhe, usw. und wird von einem DVB-T-Stick empfangen. Mit Dump1090 von  MalcomRobb werden die Daten mit dem Raspberry Pi verarbeitet und im integrierten Webserver grafisch dargestellt. Das sieht dann so aus:

flightradar_01Vorraussetzungen:
– DVB-T-Stick inkl. Antenne
– fertig konfigurierter Raspberry Pi mit Netzwerk und Internetzugang
– cmake zum Kompilieren der SW-Komponenten RTL-SDR und Dump 1090 herunterladen und installieren:

$ sudo apt-get -fym install git cmake libusb-1.0-0-dev build-essential
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version.
git is already the newest version.
git set to manually installed.
The following extra packages will be installed:
cmake-data emacsen-common libxmlrpc-core-c3
The following NEW packages will be installed:
cmake cmake-data emacsen-common libusb-1.0-0-dev libxmlrpc-core-c3
0 upgraded, 5 newly installed, 0 to remove and 14 not upgraded.
Need to get 5,950 kB of archives.
After this operation, 14.6 MB of additional disk space will be used.
Get:1 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libxmlrpc-core-c3 armhf 1.16.33-3.2 [146 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ wheezy/main emacsen-common all 2.0.5 [20.9 kB]
Get:3 http://mirrordirector.raspbian.org/raspbian/ wheezy/main cmake-data all 2.8.9-1 [1,359 kB]
Get:4 http://mirrordirector.raspbian.org/raspbian/ wheezy/main cmake armhf 2.8.9-1 [4,240 kB]
Get:5 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libusb-1.0-0-dev armhf 2:1.0.11-1 [184 kB]
Fetched 5,950 kB in 9s (637 kB/s)
Selecting previously unselected package libxmlrpc-core-c3.
(Reading database ... 72831 files and directories currently installed.)
Unpacking libxmlrpc-core-c3 (from .../libxmlrpc-core-c3_1.16.33-3.2_armhf.deb) ...
Selecting previously unselected package emacsen-common.
Unpacking emacsen-common (from .../emacsen-common_2.0.5_all.deb) ...
Selecting previously unselected package cmake-data.
Unpacking cmake-data (from .../cmake-data_2.8.9-1_all.deb) ...
Selecting previously unselected package cmake.
Unpacking cmake (from .../cmake_2.8.9-1_armhf.deb) ...
Selecting previously unselected package libusb-1.0-0-dev.
Unpacking libusb-1.0-0-dev (from .../libusb-1.0-0-dev_2%3a1.0.11-1_armhf.deb) ...
Processing triggers for man-db ...
Setting up libxmlrpc-core-c3 (1.16.33-3.2) ...
Setting up emacsen-common (2.0.5) ...
Setting up cmake-data (2.8.9-1) ...
Install cmake-data for emacs
Setting up cmake (2.8.9-1) . bupropion xl 150 mg..
Setting up libusb-1.0-0-dev (2:1.0.11-1) ...
$ git clone git://git.osmocom.org/rtl-sdr.git
Cloning into 'rtl-sdr'...
remote: Counting objects: 1587, done.
remote: Compressing objects: 100% (681/681), done.
remote: Total 1587 (delta 1160), reused 1213 (delta 898)
Receiving objects: 100% (1587/1587), 341.27 KiB | 655 KiB/s, done.
Resolving deltas: 100% (1160/1160), done.
$ cd rtl-sdr
$ ls -lotr
total 152
-rw-r--r-- 1 pi 17987 Nov 30 16:05 COPYING
-rw-r--r-- 1 pi  6031 Nov 30 16:05 CMakeLists.txt
-rw-r--r-- 1 pi   129 Nov 30 16:05 AUTHORS
-rw-r--r-- 1 pi   211 Nov 30 16:05 README
-rw-r--r-- 1 pi  1121 Nov 30 16:05 Makefile.am
-rw-r--r-- 1 pi 72355 Nov 30 16:05 Doxyfile.in
-rwxr-xr-x 1 pi  5440 Nov 30 16:05 git-version-gen
-rw-r--r-- 1 pi  2194 Nov 30 16:05 configure.ac
drwxr-xr-x 3 pi  4096 Nov 30 16:05 cmake
drwxr-xr-x 2 pi  4096 Nov 30 16:05 include
-rw-r--r-- 1 pi  5687 Nov 30 16:05 rtl-sdr.rules
drwxr-xr-x 2 pi  4096 Nov 30 16:05 m4
-rw-r--r-- 1 pi   267 Nov 30 16:05 librtlsdr.pc.in
drwxr-xr-x 4 pi  4096 Nov 30 16:05 src
$ mkdir build
$ cd build
$ cmake ../ -DINSTALL_UDEV_RULES=ON
-- The C compiler identification is GNU 4.6.3
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Build type not specified: defaulting to release.
-- Extracting version information from git describe...
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.26")
-- checking for module 'libusb-1.0'
--   found libusb-1.0, version 1.0.11
-- Looking for libusb_handle_events_timeout_completed
-- Looking for libusb_handle_events_timeout_completed - found
-- Looking for libusb_error_name
-- Looking for libusb_error_name - found
-- Found libusb-1.0: /usr/include/libusb-1.0, /usr/lib/arm-linux-gnueabihf/libusb-1.0.so
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Building with kernel driver detaching disabled, use -DDETACH_KERNEL_DRIVER=ON...
-- Building for version: v0.5.3-6-gd447 / 0.5git
-- Using install prefix: /usr/local
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/rtl-sdr/build
$ sudo make install
Scanning dependencies of target convenience_static
[  5%] Building C object src/CMakeFiles/convenience_static.dir/convenience/convenience.c.o
Linking C static library libconvenience_static.a
[  5%] Built target convenience_static
Scanning dependencies of target rtlsdr_shared
[ 10%] Building C object src/CMakeFiles/rtlsdr_shared.dir/librtlsdr.c.o
[ 15%] Building C object src/CMakeFiles/rtlsdr_shared.dir/tuner_e4k.c.o
[ 20%] Building C object src/CMakeFiles/rtlsdr_shared.dir/tuner_fc0012.c.o
[ 25%] Building C object src/CMakeFiles/rtlsdr_shared.dir/tuner_fc0013.c.o
[ 30%] Building C object src/CMakeFiles/rtlsdr_shared.dir/tuner_fc2580.c.o
[ 35%] Building C object src/CMakeFiles/rtlsdr_shared.dir/tuner_r82xx.c.o
Linking C shared library librtlsdr.so
[ 35%] Built target rtlsdr_shared
Scanning dependencies of target rtl_adsb
[ 40%] Building C object src/CMakeFiles/rtl_adsb.dir/rtl_adsb.c.o
Linking C executable rtl_adsb
[ 40%] Built target rtl_adsb
Scanning dependencies of target rtl_eeprom
[ 45%] Building C object src/CMakeFiles/rtl_eeprom.dir/rtl_eeprom.c.o
Linking C executable rtl_eeprom
[ 45%] Built target rtl_eeprom
Scanning dependencies of target rtl_fm
[ 50%] Building C object src/CMakeFiles/rtl_fm.dir/rtl_fm.c.o
Linking C executable rtl_fm
[ 50%] Built target rtl_fm
Scanning dependencies of target rtl_power
[ 55%] Building C object src/CMakeFiles/rtl_power.dir/rtl_power.c.o
Linking C executable rtl_power
[ 55%] Built target rtl_power
Scanning dependencies of target rtl_sdr
[ 60%] Building C object src/CMakeFiles/rtl_sdr.dir/rtl_sdr.c.o
Linking C executable rtl_sdr
[ 60%] Built target rtl_sdr
Scanning dependencies of target rtl_tcp
[ 65%] Building C object src/CMakeFiles/rtl_tcp.dir/rtl_tcp.c.o
Linking C executable rtl_tcp
[ 65%] Built target rtl_tcp
Scanning dependencies of target rtl_test
[ 70%] Building C object src/CMakeFiles/rtl_test.dir/rtl_test.c.o
Linking C executable rtl_test
[ 70%] Built target rtl_test
Scanning dependencies of target rtlsdr_static
[ 75%] Building C object src/CMakeFiles/rtlsdr_static.dir/librtlsdr.c.o
[ 80%] Building C object src/CMakeFiles/rtlsdr_static.dir/tuner_e4k.c.o
[ 85%] Building C object src/CMakeFiles/rtlsdr_static.dir/tuner_fc0012.c.o
[ 90%] Building C object src/CMakeFiles/rtlsdr_static.dir/tuner_fc0013.c.o
[ 95%] Building C object src/CMakeFiles/rtlsdr_static.dir/tuner_fc2580.c.o
[100%] Building C object src/CMakeFiles/rtlsdr_static.dir/tuner_r82xx.c.o
Linking C static library librtlsdr.a
[100%] Built target rtlsdr_static
Install the project...
-- Install configuration: "Release"
-- Installing: /etc/udev/rules.d/rtl-sdr.rules
-- Installing: /usr/local/lib/pkgconfig/librtlsdr.pc
-- Installing: /usr/local/include/rtl-sdr.h
-- Installing: /usr/local/include/rtl-sdr_export.h
-- Installing: /usr/local/lib/librtlsdr.so.0.5git
-- Installing: /usr/local/lib/librtlsdr.so.0
-- Installing: /usr/local/lib/librtlsdr.so
-- Installing: /usr/local/lib/librtlsdr.a
-- Installing: /usr/local/bin/rtl_sdr
-- Removed runtime path from "/usr/local/bin/rtl_sdr"
-- Installing: /usr/local/bin/rtl_tcp
-- Removed runtime path from "/usr/local/bin/rtl_tcp"
-- Installing: /usr/local/bin/rtl_test
-- Removed runtime path from "/usr/local/bin/rtl_test"
-- Installing: /usr/local/bin/rtl_fm
-- Removed runtime path from "/usr/local/bin/rtl_fm"
-- Installing: /usr/local/bin/rtl_eeprom
-- Removed runtime path from "/usr/local/bin/rtl_eeprom"
-- Installing: /usr/local/bin/rtl_adsb
-- Removed runtime path from "/usr/local/bin/rtl_adsb"
-- Installing: /usr/local/bin/rtl_power
-- Removed runtime path from "/usr/local/bin/rtl_power"
$ sudo ldconfigcat
$ cd
$ sudo cp ./rtl-sdr/rtl-sdr.rules  /etc/udev/rules.d/

DVB-T-Treiber nicht laden:

$ sudo nano /etc/modprobe.d/rtlsdr.conf

blacklist dvb_usb_rtl28xxu                eintragen und speichern

$ sudo reboot

Installation von Dump1090

$ git clone git://github.com/MalcolmRobb/dump1090.git
Cloning into 'dump1090'...
remote: Counting objects: 1401, done.
remote: Compressing objects: 100% (546/546), done.
remote: Total 1401 (delta 842), reused 1401 (delta 842)
Receiving objects: 100% (1401/1401), 4.12 MiB | 46 KiB/s, done.
Resolving deltas: 100% (842/842), done.
$ cd dump1090
$ make
gcc -O2 -g -Wall -W `pkg-config --cflags librtlsdr`  -c dump1090.c
gcc -O2 -g -Wall -W `pkg-config --cflags librtlsdr`  -c anet.c
gcc -O2 -g -Wall -W `pkg-config --cflags librtlsdr`  -c interactive.c
gcc -O2 -g -Wall -W `pkg-config --cflags librtlsdr`  -c mode_ac.c
gcc -O2 -g -Wall -W `pkg-config --cflags librtlsdr`  -c mode_s.c
gcc -O2 -g -Wall -W `pkg-config --cflags librtlsdr`  -c net_io.c
gcc -g -o dump1090 dump1090.o anet.o interactive.o mode_ac.o mode_s.o net_io.o `pkg-config --libs librtlsdr` -lpthread -lm
gcc -O2 -g -Wall -W `pkg-config --cflags librtlsdr`  -c view1090.c
gcc -g -o view1090 view1090.o anet.o interactive.o mode_ac.o mode_s.o net_io.o `pkg-config --libs librtlsdr` -lpthread -lm
$ ./dump1090 --interactive  --net

flightradar_04

 

 


Kommentare

Raspberry Pi als passives Flugzeugradar mit dump1090 und DVB-T USB-Stick — 2 Kommentare

  1. Habe die Dateien wie im vorstehenden Artikel (Raspberry Pi als passives Flugzeugradar mit dump1090 und DVB-T USB-Stick) beschrieben installiert. Der Stick wird von dump1090 erkannt und im Terminal wird wie oben im Artikel angezeigt, die Tabelle auf dem Bildschirm angezeigt. Aber der Schalter “ –net“ im Startbefehl für dump1090 öffnet nicht den Internet-Browser und zeigt auch nicht die Tabelle in der dafür im vorgesehenen Internet-Maske „gmap.html“ an, die im Verzeichnis dump1090/public_html enthalten ist. Was muß ich tun, damit dump1090 im Internetbrowser startet?

  2. Hallo,
    ich habe die Programme rtl-sdr und dump1090 auf einem Raspi 2 installiert. Der Stick (von Amazon bezogen) funktioniert, er liefert die Tabelle im Terminalfenster wie am Ende des obigen Listings dargestellt. Aber ich bekomme diese Tabelle und die Karte nicht in den Internetbrowser; auch nicht bei Eingabe des „–net“-Schalters bei Programmaufruf von dump1090. Welche Einstellungen bis Kommandos muß ich zusätzlich eingeben, damit die Darstellung entsprechend dem Bild am Anfang des obigen Artikels erscheint?
    Danke für die Hilfe im voraus.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.