The simplest way to feed ADSBx with the ModeSbeast

Discussion in 'Tutorials' started by Freqman, Aug 2, 2019.

  1. Freqman

    Freqman Member

    I'm not a programmer, so excuse my way of publishing.
    Maybe someone can do something with the information below.


    The simplest way to feed ADSBx with the ModeSbeast and a Raspberry 3B.
    Because the ModeSbeast has a built-in decoder, the use of dump1090 is not necessary.

    Used:
    - 2018-11-13-raspbian-stretch (https://distrowatch.com/?newsid=10376)
    - modesmixer2_rpi2-3_deb9_20180616
    ( https://www.dropbox.com/s/vzuviwuy0610tu5/modesmixer2_rpi2-3_deb9_20180616.tgz?dl=1 )

    Method:
    - install Stretch, add a folder "ssh"
    - sudo raspi-config: make basic settings on a sd card
    - sudo apt-get install git wget
    - sudo apt update
    - sudo apt upgrade
    - sudo reboot
    - mkdir mm2
    - PC: WinSCP: copy downloaded and unzipped file "modesmixer2" to /home/pi/mm2/
    - cd /mm2/
    - Create the following script in this folder:
    sudo nano mm2.sh

    Code:
    #!/bin/bash
    
    ## modesmixer2 initscript (fill in your decimal location at the right place)
    
    PROG="modesmixer2"
    PROG_PATH="/home/pi/mm2/"
    PROG_ARGS="--inSerial /dev/ttyUSB0:3000000:none --outServer beast:30005 --web 8787 --location 51.6000:04.90000"  # fill in your location here
    
    DELAY=5
    
    ### 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 &
        # touch $PIDFILE
        sleep $DELAY
    
    #### DIP switch override settings
    
            #To enable AVR output format, DIP switch 3 off
            #sudo echo -e '\x1a\x31\x63' > /dev/ttyUSB0
            #To enable Binary output format dip switch 3                    ON
            sudo echo -e '\x1a\x31\x43' > /dev/ttyUSB0
    
            #To disable DF-11/17 only filter, DIP switch 4 off
            sudo echo -e '\x1a\x31\x64' > /dev/ttyUSB0
            #To enable DF-11/17 only filter, DIP switch 4                   ON
            #sudo echo -e '\x1a\x31\x44' > /dev/ttyUSB0
    
            #To disable MLAT timestamp, DIP switch 5 off
            #sudo echo -e '\x1a\x31\x65' > /dev/ttyUSB0
            #To enable MLAT timestamp, DIP switch 5                      ON
            sudo echo -e '\x1a\x31\x45' > /dev/ttyUSB0
    
            #To disable CRC check, DIP switch 6 on
            #sudo echo -e '\x1a\x31\x46' > /dev/ttyUSB0
            #To enable CRC check, DIP switch 6                              OFF
            sudo echo -e '\x1a\x31\x66' > /dev/ttyUSB0
    
            #To disable DF-0/4/5 filter, DIP switch 7                          OFF
            sudo echo -e '\x1a\x31\x67' > /dev/ttyUSB0
            #To enable DF-0/4/5 filter, DIP switch 7 on
            #sudo echo -e '\x1a\x31\x47' > /dev/ttyUSB0
    
            #To disable RTS handshake, DIP switch 8 off
            #sudo echo -e '\x1a\x31\x68' > /dev/ttyUSB0
            #To enable RTS handshake, DIP switch 8                       ON
            sudo echo -e '\x1a\x31\x48' > /dev/ttyUSB0
    
            #To disable 1 bit forward error correction, DIP switch 9        ON       Doubt?
            sudo echo -e '\x1a\x31\x49' > /dev/ttyUSB0
            #To enable 1 bit forward error correction, DIP switch 9 off
            #sudo echo -e '\x1a\x31\x69' > /dev/ttyUSB0
    
            #To disable Mode A/C dip switch 10 off
            #sudo echo -e '\x1a\x31\x6a' > /dev/ttyUSB0
            #To enable Mode A/C dip switch 10                               ON
            sudo echo -e '\x1a\x31\x4a' > /dev/ttyUSB0
    - save (Ctrl+o) and close file (Ctrl+x)
    - sudo chmod +x mm2.sh
    - cd

    To Automatically start ModeSMixer2 at boot/reboot:
    - 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)
    - sudo shutdown -r now

    So far so good? PC: look in your browser at xxx.xxx.xxx.xxx:8787 (x = ip from Rpi)

    Install ADSBx-feeder as usual:
    - git clone https://github.com/jprochazka/adsb-exchange.git
    - cd adsb-exchange
    - chmod +x setup.sh
    - sudo ./setup.sh

    Note: This works with "Stretch" and not with "Buster".
     
    Last edited: Aug 15, 2019
    James likes this.
  2. James

    James Guest

    Awesome! Thank you sir!