Results 1 to 3 of 3

Thread: One Pi, Two Dongles, Two Maps

  1. #1
    Captain abcd567's Avatar
    Join Date
    Sep 2013
    Location
    Toronto CYYZ
    Posts
    2,864

    One Pi, Two Dongles, Two Maps

    NOTE:
    This method has been tested on dump1090-mutability v1.15~dev
    It has NOT been tested on dump1090-mutability v1.14 supplied with FR24 feeder / Pi24. May work / may not work with it.



    Credit:
    - Oliver Jowett (obj)
    - yxespotter
    - abcd567


    STEP-1: Serialize Dongles
    Serialize two dongles (DVB-T), one serial number 00000000, other serial number 00000001
    1. Stop dump1090-mutability.
    2. Plug in one Dongle into Pi, serialize it, and put sticker of serial number.
    3. Unplug first dongle, plugin 2nd dongle and serialize it, and put sticker of serial number.

    Is My DVB-T RTL SDR Dongle Healthy? >> Post #3: How to Change Serial Number of Dongle


    STEP-2: Create 2nd instance of dump1090-mutability which will use 2nd Dongle.
    (1) Make a copy of file dump1090-mutability with name dump1090-mutability-2. Both original & copy in folder /etc/init.d/
    Code:
    cd /etc/init.d   
    sudo cp dump1090-mutability dump1090-mutability-2

    Edit the copy /etc/init.d/dump1090-mutability-2
    Code:
    sudo nano /etc/init.d/dump1090-mutability-2
    Make changes as shown in RED, and save file





    (2) Make a copy of file `dump1090-mutability` with name `dump1090-mutability-2`. Both original & copy in folder /etc/default/
    Code:
    cd /etc/default   
    sudo cp dump1090-mutability dump1090-mutability-2
    Edit the copy /etc/default/dump1090-mutability-2
    Code:
    sudo nano /etc/default/dump1090-mutability-2
    Make changes as shown below in RED, and save file.




    (3) Update May 13, 2018 - IMPORTANT STEP, DO NOT MISS.
    Implement changes and make 2nd instance Auto-Start at reboot.
    Code:
    sudo update-rc.d dump1090-mutability-2 defaults       
    sudo systemctl daemon-reload      
    sudo reboot
    (4) Additional Info:
    If anytime you want to restart 2nd instance (i.e. dump1090-mutability-2), use following command:
    Code:
    sudo systemctl restart dump1090-mutability-2



    STEP-2: Enable 2 Separate Maps for 2 Dongles.
    Map 1 at < IP OF PI >/dump1090/gmap.html
    Map 2 at < IP OF PI >/dump1090-2/gmap.html


    (1) Make a copy of FOLDER dump1090-mutability with name dump1090-mutability-2. Both original & copy in folder /usr/share/. This folder contains folder `html` which contains all map files.
    Code:
    cd /usr/share   
    sudo cp -r dump1090-mutability dump1090-mutability-2
    (2) Make a copy of FOLDER dump1090-mutability with name dump1090-mutability-2. Both original & copy in folder /run. This folder contains all json files and aircraft data.
    Code:
    cd /run   
    sudo cp -r dump1090-mutability dump1090-mutability-2
    (3) Empty the contents of folder /run/dump1090-mutability-2 so that it can store json/data from 2nd Dongle
    Code:
    cd /run/dump1090-mutability-2  
    sudo rm *.*
    (4) Edit file /etc/lighttpd/conf-enabled/89-dump1090.conf to ADD code for dump1090-mutability-2
    Code:
    sudo nano /etc/lighttpd/conf-enabled/89-dump1090.conf
    (5) ADD CODE: Copy original two blocks of code in file (shown BLACK) and paste below original code (shown RED).
    (6) In the pasted code (RED), Add -2 (shown GREEN). Save file




    (6) Incorporate above changes in Lighttpd
    Code:
    sudo lighty-enable-mod dump1090   
    sudo service lighttpd force-reload

    (7) Now reboot
    Code:
    sudo reboot
    .

    MAP-1:




    MAP-2:

    .
    Last edited by abcd567; 2018-05-13 at 17:42.

  2. #2
    Passenger
    Join Date
    Oct 2017
    Posts
    0
    Quote Originally Posted by abcd567 View Post
    (8) Thesre is still a bug. On reboot the 2nd instant of dump1090-mutability does not start. I have to start it manually by this command after every reboot
    Code:
    sudo systemctl restart dump1090-mutability-2
    **Still struggling to fix the bug.**
    Dear Sir,
    Thank you for this great manual.
    I solved (better: by-passed) the mentioned bug with an additional @reboot entry in the crontab. It also works ;-)

    BTW:
    When disabling MLAT, it is possible to use multiple antennas with different sticks and "adding" the results using a hub.

    Yours sincerly
    EDDS-xxx

  3. #3
    Captain abcd567's Avatar
    Join Date
    Sep 2013
    Location
    Toronto CYYZ
    Posts
    2,864
    Quote Originally Posted by EDDS-xxx View Post
    I solved (better: by-passed) the mentioned bug with an additional @reboot entry in the crontab. It also works ;-)

    Thanks for the solution.
    I found another solution and have today posted it here:
    First post >> STEP-2 >> (3) Update May 13, 2018 - IMPORTANT STEP, DO NOT MISS.


    Quote Originally Posted by EDDS-xxx View Post
    When disabling MLAT, it is possible to use multiple antennas with different sticks and "adding" the results using a hub.
    Thanks again for the info about disabling MLAT when aggregating data of two receivers. Mlat uses timestamps by the receiver, and gets confused if output of two receivers are aggregated and sent as one feed.

    Thanks also for suggesting to use a hub to aggregate data.
    Aggregation can also be done without a hub, by adding/merging 2nd instance's data into the data of first instance by creating a "pipe" using netcat or socat.

    IMPORTANT: You must diable MLAT before following the Aggregation steps below.

    (1) Install netcat
    Code:
    sudo apt-get update
    sudo apt-get install netcat
    (2) Create a file named mypipe.sh
    Code:
    sudo nano mypipe.sh

    (3) Copy-paste one of the two codes below

    (a) For Beast format
    Code:
    #!/bin/sh  
    while true  
      do  
        sleep 30  
        nc 127.0.0.1 31005 | nc 127.0.0.1 30004  
      done
    (b) For AVR format
    Code:
    #!/bin/sh  
    while true  
      do  
        sleep 30  
        nc 127.0.0.1 31002 | nc 127.0.0.1 30001  
      done
    (4) Save file (Ctrl+o) and close (Ctrl+x)

    (5) Make file executeable
    Code:
    sudo chmod +x mypipe.sh
    (6) Run the script mypipe.sh to create a data "pipe".
    Code:
    ./mypipe.sh & disown

    SKETCH 1 of 2:
    INDEPENDENT OPERATION OF TWO INSTANCES







    SKETCH 2 of 2:
    AGGREGATED OPERATION OF TWO INSTANCES




    .
    Last edited by abcd567; 2018-05-13 at 21:23.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •