No announcement yet.

How to Install ModeSMixer2 on RPi and get VRS like Range Plot

  • Filter
  • Time
  • Show
Clear All
new posts

  • How to Install ModeSMixer2 on RPi and get VRS like Range Plot

    Last update: August 13, 2019

    If you dont want to run Windows/Mac computer to generate coverage map, you can still generate VRS-like coverage plot, as well as Charts right in RPi by running modeSMixer2 on your RPi.

    You have two options:
    (1) Automated install (2) Manual Install

    (1) AUTOMATED INSTALL: Very Easy

    Automated Install Script at Github updated on Feb 23, 2021

    ModeSMixer2 installation script for RPi 2/3/4, Raspbian Stretch/Buster

    Copy-paste following command in SSH console and press Enter key. The script will install and configure modesmixer2.
    sudo bash -c "$(wget -O -"
    For detailed instructions & guide, please visit this page:

    (2) MANUAL INSTALL:Good for learning.

    In Pi, create a new folder mm2, and move to new folder
    sudo mkdir mm2
    #Move to new folder
    cd mm2

    Go to following page:

    At top you will find ModeSDeco2 ❌. Ignore it, you dont need it.

    Scroll down till you see ModeSMixer2 ✔. This is what you need.
    Scroll down a little further till you see ARM sign

    On Windows/Mac Desktop/Laptop, download one of the following which matches your OS:

    For Raspberry Pi 2/3 Jessie


    For Raspberry Pi 2/3 Stretch & Buster

    Note: If you have full version of Raspbian with GUI/Browser, you can directly download ModeSMixer2 file to Pi using Pi's Browser. You will need to connect a monitor, keyboard and mouse to Pi to do this. You will then not need Step-3 and Step-4, and after download, should go to Step-5 directly.

    On Windows / Mac computer, download and install file transfer App Filezilla.

    Using Filezilla, upload from Windows/Mac computer, to Pi's folder mm2, the downloaded file


    For Stretch and Buster
    Download the modesmixer2 file from Google drive to RPi directly in folder /home/pi/mm2/.
    sudo wget -O /home/pi/mm2/modesmixer2_rpi2-3_deb9_20190223.tgz ""
    Unzip the downloaded file
    #Move to folder mm2
    cd mm2
    #Give one of the following 2 commands according to the file you have downloaded
    #For JESSIE
    sudo tar xvzf modesmixer2_rpi2-3_deb8_20190223.tgz
    sudo tar xvzf modesmixer2_rpi2-3_deb9_20190223.tgz
    Inside folder mm2, create a new file ``
    #Move to folder mm2
    cd mm2
    #Create new blank file
    sudo nano
    Copy-paste following text to blank file
    cd /home/pi/mm2
    ./modesmixer2  --inConnectId  --inConnectId --web 8787 --location xx.xxxx:yy.yyyy
    In above code, replace xx.xxxx by your latitude, and yy.yyyy by your longitude

    Alternatively, instead of above text, copy-paste following text to file
    This text is broken into parts for ease of viewing/editing. It works OK even in this split form.

    /home/pi/mm2/modesmixer2 \
      --inConnectId \
      --inConnectId \
      --web 8787 \
      --location xx.xxxx:yy.yyyy \
    Make file executeable
    cd mm2
    sudo chmod +x
    To MANUALLY start modeSMixer2:
    cd mm2
    ./ & disown
    Exit terminal.
    The script will keep running even after closing the terminal due to & disown in the above command.

    You can stop it by reboot, or by command:
    sudo killall modesmixer2

    To Automatically Start ModeSMixer2 at BOOT / REBOOT
    Open file rc.local for editing
    sudo nano /etc/rc.local
    Add following line just above the last, single-worded line (i.e. above exit0)

    /home/pi/mm2/ &

    Save (Ctrl+o) and close file (Ctrl+x)

    Now the ModeSMixer2 will automatically start at Boot / Reboot.

    Go to page ip-of-pi:8787 . This will show Charts. To see map, Click item Map on menu bar.

    On map, you will see range plot being built, like VRS.

    On map, the MLAT planes are shown green, and ADS-B planes are shown white.


    Last edited by abcd567; 2021-02-26, 00:58.

  • #2
    Thank you for posting this. I had it running in about 5 minutes and it is much more responsive than VRS.


    • #3
      Thank you for posting this. I really like this front end a lot.
      I am having a problem with the process running. I keep getting "Connect Host error Connection refused" when the script runs.
      Output of netstat -lptn doesn't show 30106 to be listening. Is this a permission thing?

      Are there any other prerequisites or dependancies that need to be installed along with this? The page loads and everything is working minus the graphical map. It's a white screen with the aircraft visible but the map doesn't display. Viewing the Log tab and the Pi prompt both show this error.

      This is my testing / tinkering Pi Box with a FA ProPlus stick and running on a clean current & updated Stretch install running "ADS-B Exchange" only which is working just fine.

      Any suggestions?
      Thanks for your help.
      Last edited by T-KCXO1; 2018-02-10, 15:14.


      • #4

        After looking at the Dump1090 outbound ports I discovered it my version is using port 30104. I made the change in the script and after a quick screen refresh it's working perfectly.
        I'm guessing that when it encounters an error it halts the script and doesn't read the next argument which is why the map and my LON-LAT were not coming up.
        It's working perfectly now.

        Again, thanks for posting this. I like it a lot.


        • #5
          @ T-KCXO1

          Thanks for raising the issue.
          The following portion of command in file is for MLAT feedback from Flightaware data feeder "Piaware".

          If someone is not using Flightaware feeder "Piaware", he will get an error message, and should remove above portion of code from file

          Unless changed by user in dump1090-mutability / dump1090-fa settings, the DEFAULT settings are:
          The port 30104 is used by Flightaware MLAT feedback to INPUT data to dump1090-mutability / dump1090-fa to display it on Map.
          The port 30105 (Beast format) and 30106 (Basestation format) are used to feed Flightaware MLAT data to other Apps like VRS and ModeSMixer2.
          Last edited by abcd567; 2018-02-10, 20:11.


          • #6
            @ T-KCXO1

            I have now tested all three ports (30104, 30105, and 30106) for MLAT input to ModeSMixer2, and all three work ok

            PORT 30106
            2018-02-10 20:21:50.987 INFO inConnectId( connected
            2018-02-10 20:21:52.390 INFO inConnectId( BEAST data stream detected

            PORT 30105
            2018-02-10 20:22:29.466 INFO inConnectId( BEAST data stream detected
            2018-02-10 20:22:31.625 INFO inConnectId( BEAST data stream detected

            PORT 30104
            2018-02-10 20:23:02.394 INFO inConnectId( connected
            2018-02-10 20:23:03.277 INFO inConnectId( BEAST data stream detected

            Checked map after few minutes, found:
            Map does NOT display MLAT planes (green) if port 30104 is used for MLAT. Only ADS-B planes (white) are displayed.
            Map displays both MLAT planes (green) and ADSB planes (white) if port 30105 or 30106 is used for MLAT.
            More MLAT planes are shown on Map if port 30106 is used, compared to number of planes shown on setting 30105.
            Last edited by abcd567; 2018-02-10, 20:40.


            • #7

              Is it possible to get a meter style chart for messages/ac/second to give a live report of the data I see in my rrdtool graphs? And also, could we have some switches which would set the upper limits for the charts such as max distance on the "Contacts / Distance" chart and maximum messages/second? In Australia we get barely a fraction of the traffic others see in Europe and America etc. So very little movement is seen in that meter chart etc. Also, do you have ModeSMixer2 on github at all?
              T-YBBN50 - Kallangur, QLD, Australia


              • #8
                1. I dont think it is possible to get a meter style chart. Even if it is pssible, I am not aware of how to do it.

                2. ModeSMixer and ModeSDecoder are NOT Open Source, and hence I dont think teir source code will be available on GitHub.

                3. There has been much discussion of these programs over the last 4-5 years here:

                  This thread in particular where the author pops in from time to time may answer your questions:

                4. Following is list of parameters/options. More details here:

                  cd mm2
                  ./modesmixer2 --help
                  ModeSMixer2 v.20170924
                  Program options:
                    -h [ --help ]             This help message 
                    --inConnect arg           Input connector. Format: host:port
                    --inConnectId arg         Input connector with ID. Format: host:port:id
                    --inServer arg            Input server. Format: port
                    --inServerId arg          Input server with Id. Format: port:id
                    --inServerUdp arg         Input udp server. Format: port
                    --inSerial arg            Input serial. Format: port[:speed[:flow_control]]
                                              FlowControl: none,software,hardware
                    --outConnect arg          Output connector. Format: type:host:port
                                              Types: beast,avr,avrmlat,msg,sbs30006,beastmlat,msg
                    --outConnectId arg        Output connector with Id.
                                              Format: host:port[:name:lat:lon:TEXT:freq]
                    --outConnectUdp arg       Output udp connector. Format: type:host:port
                                              Types: beast,avr,avrmlat,msg,sbs30006
                    --outServer arg           Output server. Format: type:port
                                              Types: beast,avr,avrmlat,msg,sbs30006,sbs10001,fats
                    --globes arg              Enable Globe-S server. Format
                    --web arg                 Enable Web Server on port (default: off)
                    --google-key arg          Google Maps key
                    --web-auth arg            Enable web auth username:password (default: off)
                    --disable-web-log         Disable Web Log (default: on)
                    --silhouettes arg         Set Silhouettes directory
                    --pictures arg            Set Aircraft Pictures directory
                    --db arg                  Set DB Filename
                    --dbro arg                Set DB filename for read-only using
                    --keep                    Enable Beast output keepalive message
                    --frdb arg                Set FlightRoute DB Filename
                    --location arg            Receiver location Lat:Lon
                                              Example: 36.2:-15.3
                    --add-reference-point arg Add a new reference point for calculating distance
                                              and azimuth to the map
                                              Example: 38.5:-12.6:[Label1] ...
                    --add-points arg          Add  additional points (single or list) with
                                              coordinates to the map
                                              Example: 36.2:-15.3:[Label1] [38.5:-12.6:[Label1]]
                    --localtime               Local Time in MSG format output (default: UTC)
                    --filter-expire arg       Filter expire time, sec (default: 20)
                    --filter-count arg        Filter min count (default: 6)
                    --filter-time arg         Filter min time, sec (default: 60)
                    --filter-nocountry        Disable ICAO Country filter (default: on)
                    --filter-ic               Enable Interrogator Code filter (default: off)
                    --filter-dup              Enable Duplicate filter (default: off)
                    --flight-expire-time arg  Flight expire time, sec (default: 3600)
                    --log-noconsole           Disable logging to console (default: on)
                    --log-file arg            Enable logging to file (default: off)
                    --log-level arg           Set logging level 0..5 (default: 4)
                                              0 disabled, 1 error, 2 warning, 3 notice, 4 info
                                              5 debug
                    --metric                  Switch to metric system of distance measurement
                                              (default: imperial)


                • #9

                  For some reason I thought you were the author. My bad Ok, will go have a look at the threads, thanks for the heads up!
                  T-YBBN50 - Kallangur, QLD, Australia


                  • #10
                    Hi abcd567

                    I'm was looking back over some of your great suggestions and thought I'd give this one a try on a quiet afternoon ...

                    In the Alternative to Steps 1-4, which seems simpler, you say:
                    #FOR JESSIE, Pi24, and Piaware SD card image
                    sudo wget -O mm2/modesmixer2_rpi2-3_20170924.tgz ""
                    Can you confirm this file is still in the dropbox ?




                    • #11
                      Yes, the file is still in my dropbox and you can download it to your Pi by wget command.

                      This file is for Jessie. Most people have already switched to Stretch. Are you still using Jessie?


                      • #12
                        OK - you have publicly shamed me into it.

                        I gather its time I made the move to Stretch ....



                        • #13
                          hi abcd567

                          I became lost following the discussions above between the ADSB and MLAT ports ... hoping you can explain it bit further.

                          My test setup is now Stretch and dump1090-mut v1.15dev and only the FR24 feed. The fr24feed.ini is:

                          procargs="--net--gain 40"

                          I created in /usr/share/mm2 and simply changed /home/pi to /usr/share in both Step 6 and Step 9.
                          ( You might like to make a comment in your post about where to create the mm2 folder and then match the paths given in and rc.local to assist others ).

                          Then after reading and digesting the discussion above about which ports to use - I changed the ADS-B port in line 2 to 30002 and deleted line 3 --inConnectId \
                          I also noted that this was written as 30105 in one step and 30103 in another.

                          And I have it working.

                          To help my understanding - is there another port I can turn on to obtain the MLAT feed and reinstate the deleted line 3 ?

                          Any other hints, advice and suggestions ?




                          • #14

                            Flightaware MLAT feedback results are available on two ports of dump1090-mutability/dump109p-fa: 30105 and 30106. The data formats are different, but both work OK for modeSMixer2. You can use any one of these.

                            For FA mlat results feedback, using port 30103 is wrong. Dont use 30103.
                            Last edited by abcd567; 2018-12-04, 23:17.


                            • #15
                              Updated on August 13, 2019.
                              In first post, added Automated Installation by bash script