The best for last: A complete Docker-RPi-RTL-SDR ADSB/ACARS Solution

 

After my last two blogposts [1][2], many of you asked “Why Docker on a Raspberry?” if you can install all the software directly (“There are so much tutorials“). Yeah, that’s right – but think how much work you have to invest to get the following setup running:

sdr_gear

  • Raspberry Pi 2 & 2 RTL-SDR Sticks
    • Nr 1 is monitoring ADSB via dump1090
    • Nr 2 is monitoring ACARS on 2 frequencies via acarsdec
  • FR24FEED (www.flightradar24.com) is taking the data from dump1090 and feeds it to FR24
  • FlightAirMap (PHP/MySQL) is taking the data from acarsdec and dump1090 to generate a comprehensive statistic and live map of your received data.
  • A Mysql server for storing the Data behind FlightAirMap

You need five services which you have to install/compile, to configure, to link and to manage.

But there is a much more convenient solution: docker-compose and one (!) configuration file 🙂

FlightAirMap & dump1090 Screenshots

flightairmap_3
FlightAirMap

flightairmap_2
FlightAirMap

flightairmap_1
FlightAirMap

dump1090
dump1090

The system

let me give you a quick overview. Every “cube” in the following graph is a docker service. Every service is linked in a certain way to another service. Beside these interconnections, some services also share connections to the outside – web interfaces (FlightAirMap & dump1090) or push connections to an external service (FR24 Feeder). The diagram shows you the ‘deluxe’ version. If you don’t have 2 SDR-Sticks around or you don’t need the FR24 Feeder – don’t worry, I’ll start with the basics system and explain how to extend it with different components – it’s easy as playing with LEGO 😉

Schema

 

The “budget” system (dump1090 & FlightAirMap)

schema_minimalThis is the minimal FlightAirMap-System. It consinst of dump1090 and a RTL-SDR stick as an ADSB receiver and FlightAirMap + MySQL as map & statistic hub. Both webinterfaces (dump1090 and FlightAirMap) will be accessible form outside.

 

 

 

 

 

 

 

Let’s start

Please ssh to your raspberry, create a folder (compose-airmap for example) and put the contents of the listing below in a file called docker-compose.ymloh, and please make sure you edit the following lines:

Line No.
5 the –lat & –lon values have to be set accordingly to your receiver location
45 Set your timezone (list of timezones)
54 Set your countrycode (AU=Australia, DE=Germany, …)
55 & 56 Set your lat & lon values  (as in line 5)

 

And now let the magic happen 😉 Execute a  docker-compose up  in the folder containing the docker-compose.yml

Docker will now download all the needed images and start the containers. FlightAirMap will then download and insert basic data to the Mysql database (flight routes, aircraft infos and so on).

Both steps will take a descent amount of time depending on your internet connection. In case something goes wrong or got stuck – just press CTRL+C and run  docker-compose up  again.

If everything is done, you should be able to connect to the dump1090 interface by opening http://<yourraspberryip>:8080 and to the FlightAirMap interface by opening http://<yourraspberryip>.

 

The “medium” system (“budget” + fr24feed)

schema_medium

 

fr24feed is a small application which sends the output of dump1090 to FlightRadar24 where your data will be combined with many other feeders to one big worldmap.

So if you want to use the feeder, just add the following code to your docker-compose.yml. If you don’t plan to send data, just skip this part 🙂

Please make sure you change the FR24KEY 🙂

 

Add the above code to the docker-compose.yml and start via  docker-compose up

The “deluxe” system (“medium” + acarsdec)

SchemaThis solution needs 2 RTL-SDR sticks as we have to decode two different bands of frequencies (ACARS & ADSB). You don’t need to add the fr24feed if you not plan to push your data to flightradar24.

As dump1090 is using the first RTL-SDR stick, acarsdec is configured to use the second (index 1)

 

 

Please make sure you set the correct frequencies – 131.450 & 131.550 are for Australia – you’ll find the frequencies for your location in my last post about ACARS.

 

 

Add the above code to the docker-compose.yml and start via  docker-compose up – short after docker downloaded the image and started the containers, you should see the ACARS message coming in 🙂

 

I hope you like my post – and as usual:

if you have questions, see errors or need more information, drop me a line via the comments or via twitter

  • Bill McEvoy

    I am having a strange problem. I am able to collect data, view it on port 8080, but the flightairmap page keeps reporting mysql errors when accessing the page. For example: “Invalid query : SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘flight.spotter_output’ doesn’t exist”

    • Bill McEvoy

      Something prevented the database tabled from being installed. I was able to bash into the container and run the table creation scripts manually. I also found an update db script, ran that as well. Things are working now. Whole family is excited and I no know a LOT more about Linux than ever. Thanks!

      • Frederik Granna

        Awesome! 🙂

      • Hugo Swailer

        Same problem here: Invalid query : “SQLSTATE[42S02]: Base table or view
        not found: 1146 Table ‘flight.spotter_live’ doesn’t exist….”. I don’t know how/where to start with Bills solution.

      • John Olsson

        Did you populate from the Flightairmap container or did you move the scripts to the mysql container to perform the population?

        Any help i appreciated here.

      • Hi Bill, I realize this is a long time ago, but, could you offer more insight into your steps? I have been digging through the flightairmap container and can’t really figure out which scripts to run to create the tables etc.

        Thank you for your help!

    • Hugo Swailer

      Same problem here: Invalid query : “SQLSTATE[42S02]: Base table or view
      not found: 1146 Table ‘flight.spotter_live’ doesn’t exist….”. I don’t know how/where to apply your workaround.

  • Hugo Swailer

    Same problem here: Invalid query : “SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘flight.spotter_live’ doesn’t exist….”.
    I don’t know where to start with Bills solution.

  • Dom Wilkinson

    OK I have Docker installed:

    pi@raspberrypi:~/compose-airmap$ docker info
    Containers: 1
    Images: 8
    Storage Driver: overlay
    Backing Filesystem: extfs
    Execution Driver: native-0.2
    Logging Driver: json-file
    Kernel Version: 4.1.17-v7+
    Operating System: Raspbian GNU/Linux 8 (jessie)
    CPUs: 4
    Total Memory: 925.9 MiB
    Name: raspberrypi
    ID: TOCY:C4NL:SSDT:FRL3:J63Y:T55R:KF6T:7SU7:Z6PS:XEIO:2LLO:7EKO
    Debug mode (server): true
    File Descriptors: 11
    Goroutines: 23
    System Time: 2016-02-21T15:48:08.324636775Z
    EventsListeners: 0
    Init SHA1: 96cfebcba660bb855cca9d1d6af72fef27a5e953
    Init Path: /usr/lib/docker/dockerinit
    Docker Root Dir: /var/lib/docker
    WARNING: No memory limit support
    WARNING: No swap limit support

    pi@raspberrypi:~/compose-airmap$ docker version
    Client:
    Version: 1.8.1
    API version: 1.20
    Go version: go1.4.2
    Git commit: d12ea79-dirty
    Built: Thu Aug 13 07:53:24 UTC 2015
    OS/Arch: linux/arm

    Server:
    Version: 1.8.1
    API version: 1.20
    Go version: go1.4.2
    Git commit: d12ea79-dirty
    Built: Thu Aug 13 07:53:24 UTC 2015
    OS/Arch: linux/arm

    And it appears to be running:

    pi@raspberrypi:~/compose-airmap$ ps -ef | grep docker
    root 480 1 6 15:30 ? 00:01:04 /usr/bin/docker -d -H fd:// –storage-driver=overlay -D
    pi 2212 1553 0 15:46 pts/0 00:00:00 grep –color=auto docker

    However, when I attempt to run the command ‘docker-compose up’ I get the following error:

    pi@raspberrypi:~/compose-airmap$ docker-compose up
    -bash: docker-compose: command not found

    I’m fairly new to this and I’m not sure what I’m doing wrong. Any help appreciated.

    • Dom Wilkinson

      OK. I realised that I needed to install Docker Compose too, so I installed it from the Hypriot site.

      Now when I run the compose command, I’m not getting the following error:

      pi@raspberrypi:~/compose-airmap$ docker-compose up
      Unsupported config option for dump1090 service: ‘devices’

      pi@raspberrypi:~/compose-airmap$ docker-compose –version
      docker-compose 1.1.0

      My yml file is an exact copy of the one above (excluding the necessary edits).

      Any ideas what the problem is now?

      • Dom Wilkinson

        I’ve updated to the latest version of Docker Compose as I thought that might be the problem, but no, I’m still getting the same error:

        pi@raspberrypi:~/compose-airmap$ docker-compose –version
        docker-compose 1.2.0

        pi@raspberrypi:~/compose-airmap$ docker-compose up
        Unsupported config option for dump1090 service: ‘devices’

        Not sure what I’m missing now?

        • Frederik Granna

          Hi Dom,

          Support for the ‘devices’ option was added in Compose 1.3.0 🙂

          • Dom Wilkinson

            Ah! That will be the problem then. Where can I download a version of Compose 1.3.0 for Raspbian?

            Thanks.

          • Frederik Granna
          • Dom Wilkinson

            Thank you so much Frederik, I’ll have a play this evening.
            Once I’ve got this all working, I’ll post a list of links etc. so that other NOOBS like me can get it up and running. It will round off a great post. Cheers for your help.

          • Fabien Mainville

            Hello Dom,

            It seems that I’m encountering the same problems than yours.
            Dump1090 is working fine but Flightairmap doesn’t show anything.

            I think my problem has to do with mysql container not being able to interact with flightmap one :

            “mysql_1 | 160311 11:08:52 [Warning] IP address ‘172.17.0.4’ could not be resolved: Name or service not known”

            Yet, when I do a “docker inspect composeairmap_flightairmap_1”
            It tells me that the contener IP is ‘172.17.0.4’

            Did you find a solution to your problems ?

          • my container IP for MySQL is 172.17.0.3 from the docker inspect command… I get the same error you do above…

          • Dom Wilkinson

            Well the celebration was short lived! Been trying to install from the link you provided. I updated my repository, as per the instructions, but unfortunately, the install can’t seem to find the package:

            pi@raspberrypi:~$ curl -s https://packagecloud.io/install/repositories/Hypriot/Schatzkiste/script.deb.sh | sudo bash
            Detected operating system as raspbian/jessie.
            Checking for curl…
            Detected curl…
            Running apt-get update… done.
            Installing apt-transport-https… done.
            Installing /etc/apt/sources.list.d/Hypriot_Schatzkiste.list…done.
            Importing packagecloud gpg key… done.
            Running apt-get update… done.
            The repository is setup! You can now install packages.

            pi@raspberrypi:~$ sudo apt-get install docker-compose=1.6.0-27
            Reading package lists… Done
            Building dependency tree
            Reading state information… Done
            E: Unable to locate package docker-compose

            Am I to assume that the package has been removed from that download location?

            Thanks.

          • Frederik Granna

            Well, saw the same “problem” yesterday.

            You;re using raspbian/jessie as OS version. The packages are build for debian/wheezy. But thats no problem at all.

            Just download the .deb file from https://packagecloud.io/Hypriot/Schatzkiste/packages/debian/wheezy/docker-compose_1.6.0-27_armhf.deb (top right is Download) and install on your raspi by dpkg -i . Works for me that way 🙂

          • Dom Wilkinson

            Hi Frederik,

            Once again, thank you so much for all your help. It’s been so useful. I downloaded the necessary .deb files; I actually upgraded both my version of Docker and Docker Compose.

            Once I upgraded both packages, the ‘docker-compose up’ ran without any error messages, so we are nearly there!

            Having run, I could see both the FlightAirMap & Dump1090 web pages on my Pi; however there seemed to be a couple of problems. The FlightAirMap was not showing up any aircraft, but the Dump1090 was, however there is a massive splodge of spiky colours on the map centred around the Netherlands (see screen dump picture). Anyway, I decided to gracefully shutdown my Pi and reboot.

            After the reboot, I still had the same problem. No aircraft on the FlightAirMap and the big splodge of colour on the Dump1090 map. Looking at the logs, it doesn’t look like MySQL is starting up correctly and it also seems to be trying to connect to a spurious IP Address (172.17.0.5), which is not part of my network. Where is it getting this IP Address from, is it located in a config file? I’ve included the relevant part of the logs below:

            mysql_1 | 160227 10:58:39 InnoDB: Waiting for the background threads to start
            flightairmap_1 | Checking MySQL connection…
            flightairmap_1 | Try 1 of 5…
            mysql_1 | 160227 10:58:40 InnoDB: 5.5.46 started; log sequence number 1595675
            mysql_1 | 160227 10:58:40 [Note] Server hostname (bind-address): ‘0.0.0.0’; port: 3306
            mysql_1 | 160227 10:58:40 [Note] – ‘0.0.0.0’ resolves to ‘0.0.0.0’;
            mysql_1 | 160227 10:58:40 [Note] Server socket created on IP: ‘0.0.0.0’.
            mysql_1 | 160227 10:58:40 [ERROR] mysqld: Table ‘./mysql/user’ is marked as crashed and should be repaired
            mysql_1 | 160227 10:58:40 [Warning] Checking table: ‘./mysql/user’
            mysql_1 | 160227 10:58:40 [ERROR] 1 client is using or hasn’t closed the table properly
            mysql_1 | 160227 10:58:40 [ERROR] mysqld: Table ‘./mysql/db’ is marked as crashed and should be repaired
            mysql_1 | 160227 10:58:40 [Warning] Checking table: ‘./mysql/db’
            mysql_1 | 160227 10:58:40 [ERROR] 1 client is using or hasn’t closed the table properly
            mysql_1 | 160227 10:58:40 [Note] Event Scheduler: Loaded 0 events
            mysql_1 | 160227 10:58:40 [Note] mysqld: ready for connections.
            mysql_1 | Version: ‘5.5.46-0+deb7u1’ socket: ‘/var/run/mysqld/mysqld.sock’ port: 3306 (Debian)
            flightairmap_1 | Try 2 of 5…

            mysql_1 | 160227 10:58:41 [Warning] IP address ‘172.17.0.5’ could not be resolved: Name or service not known

            flightairmap_1 | Database connection ok
            flightairmap_1 | Checking for database
            flightairmap_1 | Database found
            flightairmap_1 | Checking if database is populated
            flightairmap_1 | mysqlshow: Cannot list columns in db: flight, table: acars_archive: Table ‘flight.acars_archive’ doesn’t exist
            flightairmap_1 | Database is empty
            flightairmap_1 | Configuring database, this will take several minutes!
            flightairmap_1 | $globalInstalled must be set to FALSE in require/settings.phpStarting sbs service…
            flightairmap_1 | Starting acars service…
            flightairmap_1 | Starting webservice…

            So far, this has been a very good learning experience and I really appreciate your time and your help.

            Regards,

            Dom

          • I think that’s the range plot… you can turn it off by clicking RANGE under the clocks. I believe that can be changed from the settings.

  • Bill Allardyce

    how do you select which rtl dongle is being used for adsb and acars?

    • Frederik Granna

      Hi,

      for acarsd: “-r 1 131.450 131.550” where “-r ” is the index of the stick
      for dump1090: “–device-index “

  • Everything is working great. I decided to build a Raspberry Pi using the Hypriot SD card image. It boots well, the compose works well but I am having database missing table errors 🙁

    Can you help with manual install of the MySQL tables? Or how can I fix the containers permanently?

    Thank you!

    ERROR:

    Current Activity

    The table below shows the detailed information of all current flights.
    Invalid query : SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘flight.spotter_live’ doesn’t exist Whole query: SELECT spotter_live.* FROM spotter_live INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_live l WHERE DATE_SUB(UTC_TIMESTAMP(),INTERVAL 200 SECOND) <= l.date GROUP BY l.flightaware_id) s on spotter_live.flightaware_id = s.flightaware_id AND spotter_live.date = s.maxdate LIMIT 25 OFFSET 0

    • Frederik Granna

      Seems like there is a bug. I’ll build a new rpi-flightairmap image

      • You are very kind, sir… thank you 🙂 What should I do on my end? Is there any way I can help?

        I am using a Raspberry Pi 3 B with the Version 1.0.0 Blackbeard Hypriot SD Image for Docker.

        Do I have to erase any of the images or will the docker-compose download your new one automatically?

        Thank you

        • Frederik Granna

          You’ll just have to modify the docker-compose.yaml. I have to upgrade the image a bit more, so don’t expect an update before the weekend.

          Thanks for your detailed report! It looks like the “old” image will not work anymore due to changes in the map api, so i have to update flightairmap anyway!

          • Very much appreciated… and yes, the map needs to be changed to OpenStreetMap on first launch as MapQuest is not working well … Thanks for the help, Frederik

        • Frederik Granna

          I updated the image to the newest Flightairmap version and introduced some fixes.

          Please have a look into the updated docker-compose.yaml:
          – Change the image to “sysrun/rpi-flightairmap:caccdb6”
          – Modify the variable FLIGHT_SBS1_HOST to “dump1090” (remove the port)
          – Add the variable FLIGHT_SBS1_PORT=30003

          • Manny Gonzalez

            Thank you Frederik … unfortunately, it looks like my VPN endpoint at home has either crashed or is not properly set up to access the RPi. I am away this weekend and can’t power down or connect remotely 🙁 I will test it ASAP when I return…

          • Yay! Just tested everything and it is working perfectly, thank you… Even the two USB sticks connected directly to the RPi are holding up, no crashing, no nothing. Database populated properly, etc. etc.

            I will continue to monitor the logs for any errors and report. So far they happen to be app specific like pho errors on FlightAirMap

            The Web page for FlightAirMap and dump1090 are very slow but I assume it is a result of the container overhead.

            THANK YOU very much for your effort. This is being placed inside a Pelican case with a very large dry cell battery, a solar panel and a long range Wi-Fi antenna for remote monitoring unattended. Superb project and you made it all VERY simple to deploy.

          • Some logs from MySQL container. It does not seem to hamper functionality so reporting it for transparency!

            161004 2:20:19 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
            161004 2:20:19 [Note] mysqld (mysqld 5.5.46-0+deb7u1) starting as process 1 …
            161004 2:20:19 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
            161004 2:20:19 [Note] Plugin ‘FEDERATED’ is disabled.
            161004 2:20:19 InnoDB: The InnoDB memory heap is disabled
            161004 2:20:19 InnoDB: Mutexes and rw_locks use GCC atomic builtins
            161004 2:20:19 InnoDB: Compressed tables use zlib 1.2.7
            161004 2:20:19 InnoDB: Using Linux native AIO
            161004 2:20:19 InnoDB: Initializing buffer pool, size = 128.0M
            161004 2:20:19 InnoDB: Completed initialization of buffer pool
            161004 2:20:19 InnoDB: highest supported file format is Barracuda.
            161004 2:20:19 InnoDB: Waiting for the background threads to start
            161004 2:20:20 InnoDB: 5.5.46 started; log sequence number 7821547
            161004 2:20:20 [Note] Server hostname (bind-address): ‘0.0.0.0’; port: 3306
            161004 2:20:20 [Note] – ‘0.0.0.0’ resolves to ‘0.0.0.0’;
            161004 2:20:20 [Note] Server socket created on IP: ‘0.0.0.0’.
            161004 2:20:20 [Note] Event Scheduler: Loaded 0 events
            161004 2:20:20 [Note] mysqld: ready for connections.
            Version: ‘5.5.46-0+deb7u1’ socket: ‘/var/run/mysqld/mysqld.sock’ port: 3306 (Debian)
            161004 2:20:22 [Warning] IP address ‘172.17.0.5’ could not be resolved: Name or service not known

    • Another error I am getting…

      flightairmap_1 | Starting webservice…
      composeairmap_dump1090_1 exited with code 139
      fr24feed_1 | 2016-09-29 14:08:24 | [reader][i][0]Connecting to Generic receiver via (tcp://dump1090:30005)
      ERROR: An HTTP request took too long to complete. Retry with –verbose to obtain debug information.
      If you encounter this issue regularly because of slow network conditions, consider setting COMPOSE_HTTP_TIMEOUT to a higher value (current value: 60).
      HypriotOS/armv7: pirate@black-pearl in ~/compose-airmap

      • Frederik Granna

        Yeah, thats related to docker-compose.
        You can start the command using “COMPOSE_HTTP_TIMEOUT=1800 docker-compose up” – i’ll update the post later

    • I see a couple of more errors that I am reporting in case they matter for troubleshooting/debugging

      1)

      flightairmap_1 | 2016/09/30 17:39:51 [error] 71#0: *4 FastCGI sent in stderr: “PHP message: PHP Warning: Invalid argument supplied for foreach() in /usr/share/nginx/FlightAirMap/location-geojson.php on line 26” while reading response header from upstream, client: 10.0.1.20, server: localhost, request: “GET /location-geojson.php HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php5-fpm.sock:”, host: “10.0.1.7”, referrer: “http://10.0.1.7/”

      2)

      fr24feed was having trouble connecting to dump1090:30005 so I changed it to an IP address and that worked. Not sure why hostname did not work 🙁 Using IP address is of course tricky as the containers get different IPs sometimes on startup.

      3)

      if I have two sticks connected ( I use NESDR SMArt sticks which are designed to fit side by side on RPi on-board USB) directly to the RPi, when ACARSDEC starts up, it somehow screws up the container for dump1090 and it [dump1090] crashes. Reports “lost connection to RTL driver/stick” (or similar message)
      If I remove the second stick and NOT run the acarsdec module, dump1090 runs fine.

      4) MySQL and flighAirMap.
      I keep getting an error that the config must be set to FALSE in order for setup to happen. This is indeed true as the varial is set in the ENV. I tried to force it in the script directly INSIDE the container and the logs still show the error

      flightairmap_1 | Checking MySQL connection…
      flightairmap_1 | Try 1 of 5…
      flightairmap_1 | Database connection ok
      flightairmap_1 | Checking for database
      flightairmap_1 | Database found
      flightairmap_1 | Checking if database is populated
      flightairmap_1 | mysqlshow: Cannot list columns in db: flight, table: acars_archive: Table ‘flight.acars_archive’ doesn’t exist
      flightairmap_1 | Database is empty
      flightairmap_1 | Configuring database, this will take several minutes!
      flightairmap_1 | $globalInstalled must be set to FALSE in require/settings.phpStarting sbs service…
      flightairmap_1 | Starting acars service…
      flightairmap_1 | Starting webservice…
      flightairmap_1 | 10.0.1.20 – – [30/Sep/2016:16:28:05 +0000] “GET / HTTP/1.1” 200 2982 “-” “Mozilla/5

      • Frederik Granna

        Regarding 3) Do you have an appropriate power source for your raspberry? You should at least use a 2A source. I’m using active usb hubs for my sticks.

        • Manny Gonzalez

          Yes, I have a 2.5 amp source powering the RPi. I also have tried a powered USB hub. Do you have any suggestions for a powered hub? I plan to use the set-up portable so a USB powered hub is ideal. If I feed the RPi with 2.5 amps I am told it can then power itself and two RTL-SDR sticks … but I could be wrong. I will try a USB 3 powered hub. Right now using a USB 2.0 powered hub by Belkin.

  • I realize this has been asked already but my question is a bit different (I think)

    How can I tell which USB Stick is which? I have two identical RTL SMArt devices and both are connected to unique antennas. However, the software does not tell me which stick is which. I need to make sure I am using the correct dongle for the correct program as I have different antenna and filters on both.

    Is there a way to tell which physical device corresponds to which index in the OS? (0 or 1)

    Thank you!

    • Frederik Granna

      You can use the rtl_eeprom tool to give your sticks a name (faked serial).

      The index is another question. I don’t know exactly how the librtlsdr is enumerating the sticks. Maybe by the serial, maybe not. I rebooted my raspberry several times and the index did never change. Maybe just luck

      • Thank you… I will give the tool a try and see if I can get it done. I was thinking of using two separate RPis to do the job… One serving FlightAirMap, MySQL, fr24feed and Dump1090 and the other doing just ACARSDEC. I assume I just have to change the HOST entries to reflect the IP of the other host?

        • Frederik Granna

          Thats right

  • Frederik,

    How can I modify the FlightAirMap container myself? I want to modify the maps since I am only able to select between OpenStreetMap and Yandex but I would like to use Google or Bing if possible.

    On a second note, can you send me some tips on how to build my own containers? I was trying to replicate your project here on Docker for Windows using Ubuntu Latest as a base for the containers. I wanted to create a portable self contained package using my Microsoft Surface Pro 3: Built in screen, able to run Docker, etc. etc.

    Thanks for the help in advance 🙂

  • Bill Allardyce

    composeairmap_acarsdec_1 exited with code 132

    cant seem to get acars running

    • Manny Gonzalez

      Hi Bill,

      Since I have been messing around with the project for what seems 24 hours a day for the last two weeks 🙂 maybe I can help…

      What is the final output you can see in the console from acarsdec? I find that the generic NooElec sticks are horrible and will disconnect from the USB bus all the time. Also, you CANNOT have two programs touch the same USB ID or it will crash… I use two NooElec NESR SMArt+ sticks which are a lot better than the stock ones for only $10 more and they have a built in SMA connector as well as small enough to fit side by side on an RPi.

      You can also get the logs from the ACARSDEC container by the command

      #docker logs -f composeairmap_acarsdec_1

  • Bill Allardyce

    composeairmap_acarsdec_1 exited with code 132

    I have one dongle as 00000001 and the other as 2 changed the docker-compose.yml to reflect the two different dongles still get the same error as above

    • Frederik Granna

      Hi Bill, can you please post the changes you made to the docker-compose file? Also as Manny pointed out, a “lsusb” dump would be good

  • Bill Allardyce

    $ lsusb
    Bus 001 Device 006: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838 DVB-T
    Bus 001 Device 007: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838 DVB-T
    Bus 001 Device 005: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
    Bus 001 Device 004: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
    Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
    Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

    docker-compose.yml

    # define dump1090 service
    dump1090:
    image: “sysrun/rpi-dump1090:tedsluis”

    command: “–device-index 2 –quiet –net –modeac –lat 45.501652 –lon -98-487684”

    # expose port 30003 for flightairmap
    expose:
    – “30003”
    – “30005”
    devices:
    – “/dev/bus/usb”

    # expose port 8080 on the host (http://rapberry:8080)
    ports:
    – “8080:8080”

    # define mysql database
    mysql:
    image: “hypriot/rpi-mysql”
    environment:

    # set mysql credentials
    – MYSQL_ROOT_PASSWORD=secure

    – MYSQL_USER=flight
    – MYSQL_PASSWORD=flight

    – MYSQL_DATABASE=flight
    volumes:

    # bind the folder /opt/flight/mysql on the raspberry as datastorage

    – /opt/flight/mysql:/var/lib/mysql

    #define flightairmap service
    flightairmap:
    image: “sysrun/rpi-flightairmap:caccdb6”
    stdin_open: true
    tty: true
    restart: always
    expose:
    – “9999”
    ports:

    # bind port 80 to the host (access via http://raspberry)
    – “80:80”
    environment:

    # set the configuration
    – FLIGHT_INSTALLED=false
    – FLIGHT_TIMEZONE=America/Chicago

    # the next four values are taken from the mysql config

    – FLIGHT_DB_HOST=mysql
    – FLIGHT_DB_USER=flight

    – FLIGHT_DB_PASS=flight
    – FLIGHT_DB_NAME=flight

    # set the dump1090 host
    – FLIGHT_SBS1_HOST=dump1090

    – FLIGHT_SBS1_PORT=30003

    # change these values to your country / position

    – FLIGHT_SQUAWK_CO=US
    – FLIGHT_CENTER_LAT=45.501652

    – FLIGHT_CENTER_LON=-98.487684
    links:

    # link to database and dump1090

    – “mysql”
    – “dump1090”

    # define arcarsdec
    acarsdec:
    image: “sysrun/rpi-acarsdec:3.2”

    # send acars messages to host flightairmap port 9999

    command: “-o 1 -v -Nflightairmap:9999 -g 450 -r 00000001 131.550 131.025”
    restart: always
    devices:

    – “/dev/bus/usb”
    links:

    # link to flightairmap service
    – “flightairmap”

    • Frederik Granna

      “–device-index 2” <- the devices are enumerated starting with 0 (where 0 is your first device, 1 your second and so on)

      Also, "-r 00000001" is not valid. This should be a device-index too.

      So you could use "–device-index 0" and "-r 1…" or other way round

      • Bill Allardyce

        adsb works still getting
        acarsdec_1 | Using device 1: Generic RTL2832U OEM
        acarsdec_1 | Found Rafael Micro R820T tuner
        acarsdec_1 | Found 2 device(s):
        acarsdec_1 | 0: Realtek, RTL2838UHIDIR, SN: 2
        acarsdec_1 | 1: Realtek, RTL2838UHIDIR, SN: 00000001

        composeairmap_acarsdec_1 exited with code 132

    • Bill, please post your new docker-compose.yml

      Change this line

      command: “–device-index 2 –quiet –net –modeac –lat 45.501652 –lon -98-487684”

      to this

      command: “–device-index 0 –quiet –net –modeac –lat 45.501652 –lon -98-487684”

      and this line

      command: “-o 1 -v -Nflightairmap:9999 -g 450 -r 00000001 131.550 131.025”

      to this

      command: “-o 1 -v -Nflightairmap:9999 -g 450 -r 1 131.550 131.025”

  • Pingback: Complete Docker-RPi-RTL-SDR ADSB/ACARS Solution | sysrun.io | John Michaell()

  • Bill Allardyce

    trying a new image hypriot-rpi-20151004-132414.img
    Repository docker.io/sysrun/rpi-flightairmap already being pulled by another client. Waiting.

    what does this mean?

  • Bill Allardyce

    Traceback (most recent call last):
    File “”, line 3, in
    File “/code/build/docker-compose/out00-PYZ.pyz/compose.cli.main”, line 41, in main
    File “/code/build/docker-compose/out00-PYZ.pyz/logging”, line 1186, in error
    File “/code/build/docker-compose/out00-PYZ.pyz/logging”, line 1279, in _log
    File “/code/build/docker-compose/out00-PYZ.pyz/logging”, line 1289, in handle
    File “/code/build/docker-compose/out00-PYZ.pyz/logging”, line 1329, in callHandlers
    File “/code/build/docker-compose/out00-PYZ.pyz/logging”, line 757, in handle
    File “/code/build/docker-compose/out00-PYZ.pyz/logging”, line 880, in emit

  • Bill Allardyce

    Starting composeairmap_dump1090_1
    ERROR: Cannot start container 7ddcc5dd45fe9356dac2702d4e1fc35715309144aec7d66b571afbe81235932f: failed to create endpoint composeairmap_dump1090_1 on network bridge: Bind for 0.0.0.0:8080 failed: port is already allocated

  • Jorge Pascoal

    This tutorial is awesome work. Like! This was my first time earning the words Container and Docker. 😀
    The Flightairmap image have 3D view or it’s older? If so, can be enabled with the docker-compose.yml?