INSTALLING dump1090:
After getting the raspberry pi configured, this post will explain how to install all the drivers and the repositories to get the dump1090 software running on the raspberry pi and to make that the raspberry pi recognizes the RTL2832 USB dongle. If you haven’t read the previous posts I recommend to have a look at the draft named “Raspberry pi – beginners setup“, this draft explains how to configure the raspberry pi to feed data to some web pages like for example FlightRadar24.com.
sudo apt-get install git-core
This installs the git repository fetch code. You may already have this installed, in which case you will get a message advising that you already have the most up-to-date version. You also need “git” in order to be able to clone some applications from the git repository. What is “git”? It really overcomes my knowledge but you will need it to get all running. The following step is to introduce these instructions to setup RTL-SDR. To explain what we are doing I will summarize but mainly we are installing the packages that let the raspberry pi use the RTL2832 USB dongle hardware. First of all we must install the packages that we have to use to compile and the dependencies needed for this process:
sudo apt-get install git sudo apt-get install cmake sudo apt-get install libusb-1.0-0-dev sudo apt-get install build-essential
git clone git://git.osmocom.org/rtl-sdr.git cd rtl-sdr mkdir build cd build cmake ../ -DINSTALL_UDEV_RULES=ON make sudo make install sudo ldconfig
If the installation was correct you should see no return on the previous command. Now you can pluggin the RTL2832 USB dongle on the USB port, preferably on the USB hub. Now we can continue with the installation:
sudo ldconfig
You should now do these steps to tell the system about what the new device is allowed to do, and then to reboot the system:
cd ~ sudo cp ./rtl-sdr/rtl-sdr.rules /etc/udev/rules.d/ sudo reboot
After this the only thing we have to do is to check if the system recognizes the device:
rtl_test -t
When you try this test it will return some commands and say this:
Some further information suggests that the test (-t) command is only intended to find the gap in the E4000 frequency coverage. The RTL2832 don’t have a frequency gap so because of this reason “Failed to open rtlsdr device”. But there is no a problem, so the raspberry pi has found the device so we can go on with the intallation. You will not need the sudo word in the commands if you are logged in as a super user. Now download the latest release dump1090 application source code. So follow these steps:
cd /home/pi/
or
cd ~ (goes to your home directory)
And then:
git clone git://github.com/MalcolmRobb/dump1090.git cd dump1090 make
If all the packages are correctly installed, compiled and connected correctly then you can try to use the dump1090 software by typing one of these commands:
./dump1090 --interactive
then you should see a screen displaying aircrafts being received by your raspberry pi. However you will need to run this with privilege to allow the program to open the port. Note the double “–” if you are typing the command by hand. Other command options are:
./dump1090 --interactive --net --net-beast --net-ro-port 31001
This command will show the same prompt on the screen as before but in this case the extra part of the command should enable a network server. To reduce the ammount of network traffic you can replace “–interactive” by the word “–quiet” in all the possibilities.
./dump1090 --interactive --net --net-beast --net-ro-port 31001 &
This other possibility enables to get the application running after logging out, because the ampersand denotes running in background.
./dump1090 --interactive --net --net-beast --net-ro-port 31001 --net-ro-size 500 --net-ro-rate 5 &
And this final option brings us the program running with a reduced CPU and I/O(Input/Output) load of the raspberry pi.
PLANEPLOTTER talking with the raspberry pi:
These 2 last options bring us the possibilty to share/send the data with our laptop software like planeplotter, because the commands open a port to share the data collected by the dump1090. To get the planeplotter using the data of the rapsberry pi(RPi) dump1090 software you must follow the following steps:
1) Start the Planeplotter software on your laptop or home PC.
2) Select Options – Mode-S Receiver – RTL dongle RPi dump1090 – Setup TCP/IP client.
3) In the window that appears, type in the IP address of your RPi on your local network followed by “:31001” which is the port where the data is shared by dump1090 – then click OK.
4) Select Options – I/O settings.
5) In the dialog that appears check the Input data – Mode-S/ADS-B box – then select “RTL > RPi+Dump1090” from the list window to the right.
6) Press the green circle on the toolbar to start Planeplotter monitoring the aicrafts. Now if you pay attention to the map, the planes on the dump1090 and of the Planeplotter must be the same.
Running the dump1090 software automatically:
Basically, we will run the program as a daemon, which is broadly equivalent to a service, in Windows parlance. What that means is that a program can run without a user having to be logged in to start and stop it. So what we’ll do is create a little script which is run when the RPi boots and which in turn will start our dump1090 program. First of all create the script with the following command:
sudo nano /etc/init.d/dump1090.sh
This command will open the nano text editor and create an empty file named dump1090.sh in the specified path. Now you only have to paste into the file all the content:
#!/bin/bash ### BEGIN INIT INFO # # Provides: dump1090 # Required-Start: $remote_fs # Required-Stop: $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: dump1090 initscript # ### END INIT INFO ## Fill in name of program here. PROG="dump1090" PROG_PATH="/home/pi/dump1090" PROG_ARGS="--interactive --net --net-beast --net-ro-port 31001" #PROG_ARGS="--interactive --net --net-ro-port 31001" PIDFILE="/var/run/dump1090.pid" start() { if [ -e $PIDFILE ]; then ## Program is running, exit with error. echo "Error! $PROG is currently running!" 1>&2 exit 1 else ## Change from /dev/null to something like /var/log/$PROG if you want to save output. cd $PROG_PATH ./$PROG $PROG_ARGS 2>&1 >/dev/null & echo "$PROG started" touch $PIDFILE fi } stop() { if [ -e $PIDFILE ]; then ## Program is running, so stop it echo "$PROG is running" killall $PROG rm -f $PIDFILE echo "$PROG stopped" else ## Program is not running, exit with error. echo "Error! $PROG not started!" 1>&2 exit 1 fi } ## Check to see if we are running as root first. ## Found at http://www.cyberciti.biz/tips/shell-root-user-check-script.html if [ "$(id -u)" != "0" ]; then echo "This script must be run as root" 1>&2 exit 1 fi case "$1" in start) start exit 0 ;; stop) stop exit 0 ;; reload|restart|force-reload) stop start exit 0 ;; **) echo "Usage: $0 {start|stop|reload}" 1>&2 exit 1 ;; esac # |
After copy in the content you can save the file by “CTRL+O” and closing the nano text editor by “CTRL+X“. Then we only have to make the file executable (executable files have a green colour when prompted with the “ls” command) by the command:
sudo chmod +x /etc/init.d/dump1090.sh
Now we only have to create the runlevel shortcuts with the command:
sudo update-rc.d dump1090.sh defaults
And that’s all we have to do, if we reboot the raspberry pi, it will run the dump1090 software automatically. If we want to stop or start the program after rebooting the raspberry pi, we can do this by the next commands:
sudo etc/init.d/dump1090.sh stop
To stop the program when running in the background.
sudo etc/init.d/dump1090.sh start
To start the program when is stopped.
The program can be stopped by killing it with the command:
kill -9 "process number"
The number of the process can be known by typing the command:
ps -e
This command will show all the active processes on the background.
Finally if you want to remove the dump1090 as a service, you have to introduce this last command:
sudo update-rc.d -f dump1090.sh remove
All the information is extracted from the next web page and is a really nice tutorial to get started with dump1090, if you have some problem you could look for some solution here: http://www.satsignal.eu/raspberry-pi/dump1090.html
Dump1090 options:
The dump1090 software when running on the Raspberry Pi produces a nice plot on a Web browser running on your local network (PC, Linux or Mac). You might also like to use this as a check that the dump1090 program is still running as expected, and that the TCP/IP link is still up on your Raspberry Pi.
To see the plot on the browser you just have to enter the local IP adress of the raspberry pi followed by “:8080” and this will bring you to a web page that uses the google maps to plot the aicrafts and shows a table with all the data of every flight.
For example, I have entered in my browser: http://192.168.1.17:8080/ because the IP adress of my raspberry pi is 192.168.1.17. You have to do the same but with your own IP adress.
To get all the command options to run the dump1090 software you can type:
cd dump1090
enters to the folder where the executable file is.
./dump1090 --help
shows all the options for the dump1090 program.
Or you can just enter:
dump1090/dump1090 --help
which is the same.
Finally I want to recommend another interesting web page where some more things are explained: http://sonicgoose.com/mode-s-and-ads-b-on-a-raspberry-pi/
Retroenllaç: ADSB mit dem Raspberry Pi
Retroenllaç: SDR Network? - Page 2 - The RadioReference.com Forums
Retroenllaç: Building an ADS-B receiver with a Raspberry Pi, a DVB-T stick and some bits. | Matthew Ernisse
Great blog! Thank you for sharing!!!
Ferran.
SDR now working on my Pi Thanks!
And picking up aircraft…whoot!
Like it should be! haha
Nice nice.
you have idea thats not only Flightradar work..
maybe idea for Speak from Tower
can work with RTL2832U chip and ADS?
Yeah! You can also use it for these purposes!
Yes! It can and I actually did it!
Hi do you maybe know why sometimes dump1090 stops working? Like the website will just infinitely load if I try and open it. If I restart dump then it’ll work fine for a while.
I power the dongle directly from Pi, is it pulling too much power when many signals and crashing/causing issues with dump?
I use flightradar24, dump1090 and planeplotter all in conjunction.
Are you using all three in the Raspberry pi??? Maybe that’s the problem!
Yes all 3 basically. Maybe not enough processing power? 🙂
Well Planeplotter runs on desktop PC but I send Dump1090 data to it and FR24 also runs on the pi which it sends to FR24.
It was happening a lot earlier today but not any more. It has been stable for like 6 hours.
I don’t know what causes the problem. it’s like dump1090 will crash, stop processing signals/wouldn’t send it to planeplotter and the website of dump1090 with the map won’t load. FR24 will still be running fine. Usually
sudo etc/init.d/dump1090.sh stop
sudo etc/init.d/dump1090.sh start would fix it or simply restarting the Pi.
I am thinking maybe when there are many planes/signals there’s not enough power to the dongle, I am buying a usb hub now to power the dongle itself instead of the Pi powering it.
Will post back if any changes.
(btw thanks for your guide, helped me with a thing or two with setting up!)
Thank to you for readin! That’s what keeps it alive haha
Anyway from my experience, I think there’s not a problem of being dump1090 and FR24 softwares running on the Pi…
Idk what can be causing it but, in my case, I left the Rpi running for more than a month I figured out when checking it that it stopped running after 3 weeks iwth both softwares sharing data! So I think it should run without stopping…
Sorry I cannot give you more advance details…
Thank you for the reply.
I got a hub with independent power (so the dongle doesn’t get power from the Pi) and it hasn’t happened since!
I think when the dongle loses power and gains it again, dump1090 doesn’t restart the connection to the dongle and stops responding which is why it would work if I restart dump1090.
Now everything is okay and that’s not happening any more since I got the dongle into an independent hub and then the hub goes into the Pi.
Retroenllaç: ADS-B Empfang - "Plane Spotting" - marsipulami0815 (DC5DM)
Retroenllaç: PiAware: Live Flight Tracking Using Raspberry Pi | TRIFORCE STUDIO
You forgot the “/” in /etc
So will this work on the orange Pi PC plus using Armbian OS? What is the home directory in it?
Retroenllaç: Tracking Aircraft on Raspberry PI – securitycurmudgeon.com
I am wandering if http://192.168.1.17:8080 can work not on a Linux machine and how it can be done
Thank’s for a nice tutorial. I tested this today 11 mars 2017 on a new fresh install of Rasbian and it all worked well!
After that I installed a feed to flightradar24 according to these instructions:
https://forum.flightradar24.com/threads/8908-New-Flightradar24-feeding-software-for-Raspberry-Pie?p=66479#post66479
It is possible to check your feed status by issuing “sudo service fr24feed status” on Your pi commandline.
Nice extra info to know is that there is a flightradar24 feedback via webbrowser: (Insert Your pi-address instead of 192.168.0.23.)
http://192.168.0.23:8754/tracked.html
http://192.168.0.23:8754/flights.json
The flights.json seems to be updated every 5s or so, this is probably a simple way to get data for some kind of filter function if you want an alert or trace a certain aircrafts movement.
Thank you very much for the INFO! It is always welcomed and I hope you enjoyed!
Some extra problem: When trying to run PlanePlotter from a Windows computer in my network, I noticed that the BEAST output on port 30005 had stopped working.
(Some kind of new feature in dump1090 mutability…. )
Turned out that i could fix it by changing/editing the dump1090 config file:
sudo nano /etc/init.d/dump1090.sh
Added “–net-bo-port 30005″ in the argument line:
PROG_ARGS=”–interactive –net –net-beast –net-ro-port 31001 –net-bo-port 30005″
After this it was possible to run my PlanePlotter again.
(Got the idea from http://discussions.flightaware.com/ads-b-flight-tracking-f21/dump1090-mutability-net-bo-port-30005-no-tcp-beast-output-t35615.html
I tried some other things before the edit of args showed above, but I think it was this step that did the success…)
Retroenllaç: ADS-B on a Raspberry Pi Zero | Apple Crumble And Custard