Announcement

Collapse
No announcement yet.

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

Collapse
X
 
  • 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.
    Code:
    sudo bash -c "$(wget -O - https://raw.githubusercontent.com/abcd567a/mm2/master/install-mm2.sh)"
    For detailed instructions & guide, please visit this page:

    https://github.com/abcd567a/mm2/blob/master/README.md


    (2) MANUAL INSTALL:Good for learning.

    STEP-1:
    In Pi, create a new folder mm2, and move to new folder
    Code:
    sudo mkdir mm2
    
    #Move to new folder
    cd mm2


    STEP-2:
    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
    ARM.jpg

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

    For Raspberry Pi 2/3 Jessie
    modesmixer2_rpi2-3_deb8_20190223.tgz

    OR

    For Raspberry Pi 2/3 Stretch & Buster
    modesmixer2_rpi2-3_deb9_20190223.tgz

    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.


    STEP-3:
    On Windows / Mac computer, download and install file transfer App Filezilla.



    STEP-4:
    Using Filezilla, upload from Windows/Mac computer, to Pi's folder mm2, the downloaded file
    modesmixer2_rpi2-3_deb8_20190223.tgz
    OR
    modesmixer2_rpi2-3_deb9_20190223.tgz

    ALTERNATIVE TO STEPS 1 to 4.

    For Stretch and Buster
    Download the modesmixer2 file from Google drive to RPi directly in folder /home/pi/mm2/.
    Code:
    sudo wget -O /home/pi/mm2/modesmixer2_rpi2-3_deb9_20190223.tgz "https://drive.google.com/uc?export=download&id=18DjTxitzZj9RsVPxt7lmnptfL5eZqHxJ"
    STEP-5:
    Unzip the downloaded file
    Code:
    #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
    
    #FOR STRETCH/BUSTER
    sudo tar xvzf modesmixer2_rpi2-3_deb9_20190223.tgz
    STEP-6:
    Inside folder mm2, create a new file `mm2.sh`
    Code:
    #Move to folder mm2
    cd mm2
    
    #Create new blank file mm2.sh
    sudo nano mm2.sh
    Copy-paste following text to blank file
    Code:
    #!/bin/sh
    cd /home/pi/mm2
    ./modesmixer2  --inConnectId 127.0.0.1:30005:ADS-B  --inConnectId 127.0.0.1:30106:MLAT --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 mm2.sh.
    This text is broken into parts for ease of viewing/editing. It works OK even in this split form.

    Code:
    /home/pi/mm2/modesmixer2 \
      --inConnectId 127.0.0.1:30005:ADS-B \
      --inConnectId 127.0.0.1:30105:MLAT \
      --web 8787 \
      --location xx.xxxx:yy.yyyy \
    STEP-7:
    Make file mm2.sh executeable
    Code:
    cd mm2
    sudo chmod +x mm2.sh
    STEP-8:
    To MANUALLY start modeSMixer2:
    Code:
    cd mm2
    ./mm2.sh & 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:
    Code:
    sudo killall modesmixer2

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

    /home/pi/mm2/mm2.sh &

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

    Now the ModeSMixer2 will automatically start at Boot / Reboot.

    STEP-10:
    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.
    .
    .
    MAP WITH VRS-LIKE COVERAGE PLOT


    .
    .

    CHARTS
    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.

    Comment


    • #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 127.0.0.1:30106 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.

      Comment


      • #4
        SOLVED:

        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.

        Comment


        • #5
          @ T-KCXO1

          Thanks for raising the issue.
          The following portion of command in mm2.sh file is for MLAT feedback from Flightaware data feeder "Piaware".
          --inConnectId 127.0.0.1:30106:MLAT

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

          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.

          Comment


          • #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(127.0.0.1:30106:MLAT) connected
            2018-02-10 20:21:52.390 INFO inConnectId(127.0.0.1:30005:ADS-B) BEAST data stream detected

            PORT 30105
            2018-02-10 20:22:29.466 INFO inConnectId(127.0.0.1:30005:ADS-B) BEAST data stream detected
            2018-02-10 20:22:31.625 INFO inConnectId(127.0.0.1:30105:MLAT) BEAST data stream detected

            PORT 30104
            2018-02-10 20:23:02.394 INFO inConnectId(127.0.0.1:30104:MLAT) connected
            2018-02-10 20:23:03.277 INFO inConnectId(127.0.0.1:30005:ADS-B) BEAST data stream detected

            EDIT:
            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.

            Comment


            • #7
              @abcd567

              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

              Comment


              • #8
                @bhaal
                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: http://xdeco.org/?page_id=48.

                  Code:
                  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
                                                    mlat
                    --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
                                                    v,beastmlat,msgmlat
                    --globes arg              Enable Globe-S server. Format
                                              port:tablename:stationid
                    --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)

                Comment


                • #9
                  @abcd567

                  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

                  Comment


                  • #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 "https://www.dropbox.com/s/fm8zclxxq0kg8u4/modesmixer2_rpi2-3_20170924.tgz?dl=1"
                    Can you confirm this file is still in the dropbox ?

                    Cheers

                    ylis

                    Comment


                    • #11
                      ylis
                      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?

                      Comment


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

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

                        ylis

                        Comment


                        • #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:

                          receiver="avr-tcp"
                          fr24key="x"
                          host="127.0.0.1:30002"
                          bs="no"
                          raw="no"
                          logmode="0"
                          procargs="--net--gain 40"
                          windowmode="0"
                          logpath="/var/log"
                          mpx="no"
                          mlat="yes"
                          mlat-without-gps="yes"

                          I created mm2.sh 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 mm2.sh 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 127.0.0.1:30105:MLAT \
                          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 ?

                          Thanks

                          ylis

                          Comment


                          • #14
                            ylis

                            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.

                            Comment


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

                              Comment

                              Working...
                              X