Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 22 Aug 2019, 17:10
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
How-to Install dump1090-fa on Xenialpup
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [2 Posts]  
Author Message
abcd567

Joined: 06 Jan 2019
Posts: 12

PostPosted: Sat 19 Jan 2019, 23:24    Post subject:  How-to Install dump1090-fa on Xenialpup
Subject description: decodes and plots on map the signals transmitted by local aircrafts at 1090 MHz
 

Dump1090-fa decodes and plots on map the signals transmitted by local aircrafts at 1090 MHz. The signals are picked by a small antenna and a USB radio receiver DVB-T (chipsets RTL2832U+R820T2). Due to low cost of Radio+Antenna (manufactured & sold by large number of sellers on eBay & Amazon at an average price of US$10), this software has become very popular.



  1. Wrote "xenialpup-7.5-uefi.iso" to 8 GB USB Flash using Universal USB Installer
    https://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/




  2. Booted PC from USB Flash

  3. Created 2 Gb puppy-save and 2 Gb swap

  4. PREPRATIONS

    1. Clicked “Install” Icon on Desktop, clicked tab “Install apllications” then:

      • Clicked “Choose an SFS file from official repo” and downloaded module devx_xenialpup_7.5.sfs

      • Chose “Load and unload sfs packages using SFS load” and loaded module devx_xenialpup_7.5.sfs


    2. Updated PPM repository

    3. Installed following packages by PPM

      sakura_3.3.4-2
      nano_2.5.3
      git-hub_0.9.0-2
      rtl-sdr_0.5.3-5
      make_4.1-6

    4. Downloaded and installed following package NOT available in PPM
      librtlsdr-dev_0.5.3-5_i386.deb
      downloaded from https://launchpad.net/ubuntu/xenial/i386/librtlsdr-dev/0.5.3-5


  5. COMPILED EXECUTABLE BINARY FROM SOURCE-CODE

    Code:

    root# git clone https://github.com/flightaware/dump1090.git

    Cloning into 'dump1090'...
    ... .... ....
    Resolving deltas: 100% (5573/5573), done.
    Checking connectivity... done.

    root# cd ~/dump1090
    root# make BLADERF=no

    cc -DMODES_DUMP1090_VERSION=\"\" -DMODES_DUMP1090_VARIANT=\"dump1090-fa\" -DENABLE_RTLSDR -std=c11 -O2 -g -Wall -Werror -W -D_DEFAULT_SOURCE -I/usr/include/ -c dump1090.c -o dump1090.o
    ... ... ....
    ... ... ....
    cc -g -o view1090 view1090.o anet.o interactive.o mode_ac.o mode_s.o comm_b.o net_io.o crc.o stats.o cpr.o icao_filter.o track.o util.o  -lpthread -lm -lrt -lncurses



  6. TESTED THE EXECUTABLE BINARY

    Code:

    root# cd ~/dump1090
    root# ./dump1090

    Sun Jan 13 20:50:29 2019 +08  dump1090-fa  starting up.
    rtlsdr: using device #0: Generic RTL2832U (Realtek, RTL2832UFA, SN 00000001)
    Found Rafael Micro R820T tuner
    rtlsdr: tuner gain set to 49.6 dB




  7. CONFIGURED DUMP1090-FA

    1. Copied compiled binary dump1090 to folder /usr/bin/ with name dump1090-fa
      Code:

      root# cp ~/dump1090/dump1090  /usr/bin/dump1090-fa



    2. Copied configuration settings from folder cloned from GitHub to xenialpup’s folder /etc/default/

      Code:

      cp ~/dump1090/debian/dump1090-fa.default /etc/default/dump1090-fa


    3. Startup by init.d
      Created a blank file
      Code:

      root# nano /etc/init.d/dump1090-fa.ini


      copy-pasted following code in it:

      Code:

      #!/bin/sh
      ### BEGIN INIT INFO
      # Provides:          dump1090-fa
      # Required-Start:    $remote_fs $network
      # Required-Stop:     $remote_fs $network
      # Default-Start:     2 3 4 5
      # Default-Stop:      0 1 6
      # Short-Description: dump1090 daemon (Flightaware variant)
      # Description:       Receives ADS-B messages from a RTLSDR dongle and decodes it.
      ### END INIT INFO

      # Do NOT "set -e"

      # PATH should only include /usr/* if it runs after the mountnfs.sh script
      PATH=/sbin:/usr/sbin:/bin:/usr/bin
      DESC="dump1090-fa daemon"
      NAME=dump1090-fa
      DAEMON=/usr/bin/$NAME
      ARGS=""
      PIDFILE=/var/run/$NAME.pid
      SCRIPTNAME=/etc/init.d/$NAME.ini
      DUMP1090_USER=""
      LOGFILE="/var/log/dump1090-fa.log"

      # Read configuration variable file
      [ -r /etc/default/$NAME ] && . /etc/default/$NAME

      #Compile arguments
      ARGS=" \
          $RECEIVER_OPTIONS \
          $DECODER_OPTIONS \
          $NET_OPTIONS \
          $JSON_OPTIONS \
          $PIAWARE_DUMP1090_LOCATION_OPTIONS \
          --write-json /run/dump1090-fa \
          --quiet "


      #Create directory if not existing
      DIR="/run/dump1090-fa"
      if [[ ! -e $DIR ]]; then
          mkdir $DIR
          chmod 0755 $DIR
      fi


      # Define LSB log_* functions.
      # Depend on lsb-base (>= 3.2-14) to ensure that this file is present
      # and status_of_proc is working.
      . /lib/lsb/init-functions

      #
      # Function that starts the daemon/service
      #
      do_start()
      {
         # Return
         #   0 if daemon has been started
         #   1 if daemon was already running
         #   2 if daemon could not be started


         start-stop-daemon --start --quiet --pidfile $PIDFILE  --exec $DAEMON --test > /dev/null \
            || return 1

       
              # create logfile with the appropriate permissions if not already there
              touch $LOGFILE
             

         start-stop-daemon --start --quiet --pidfile $PIDFILE  --make-pidfile --background --no-close --exec $DAEMON -- \
            $ARGS >>$LOGFILE 2>&1 \
            || return 2
              sleep 1
      }

      #
      # Function that stops the daemon/service
      #
      do_stop()
      {
         # Return
         #   0 if daemon has been stopped
         #   1 if daemon was already stopped
         #   2 if daemon could not be stopped
         #   other if a failure occurred
         start-stop-daemon --stop --retry=TERM/30/KILL/5 --pidfile $PIDFILE --exec $DAEMON
         RETVAL="$?"
         [ "$RETVAL" = 2 ] && return 2
              sleep 1
         # Many daemons don't delete their pidfiles when they exit.
         rm -f $PIDFILE
         return "$RETVAL"
      }

      case "$1" in
        start)
         [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
         do_start
         case "$?" in
            0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
            2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
         esac
         ;;
        stop)
         [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
         do_stop
         case "$?" in
            0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
            2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
         esac
         ;;
        status)
         status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
         ;;
        restart|force-reload)
         log_daemon_msg "Restarting $DESC" "$NAME"
         do_stop
         case "$?" in
           0|1)
            do_start
            case "$?" in
               0) log_end_msg 0 ;;
               1) log_end_msg 1 ;; # Old process is still running
               *) log_end_msg 1 ;; # Failed to start
            esac
            ;;
           *)
            # Failed to stop
            log_end_msg 1
            ;;
         esac
         ;;
        *)
         echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
         exit 3
         ;;
      esac

      :

      #



    4. Made file dump1090-fa.ini executable and updated rc.d

      Code:

      chmod +x /etc/init.d/dump1090-fa.ini

      sudo update-rc.d dump1090-fa.ini defaults







  8. INTEGRATION OF DUMP1090-FA MAP WITH WEBSERVER HIAWATHA

    1. Copied over folder public_html from cloned source to /usr/share/

      Code:

      root# mkdir  /usr/share/dump1090-fa
      root# cp -r dump1090/public_html  /usr/share/dump1090-fa/html


    2. Downloaded rtl-sdr.rules from github/osmocom/rtl-sdr
      Code:

      root# wget -O  /etc/udev/rules.d/rtl-sdr.rules "https://raw.githubusercontent.com/osmocom/rtl-sdr/master/rtl-sdr.rules" 


    3. In file /etc/hiawatha/hiawatha.conf added following line:
      Code:

      Alias = /dump1090-fa:/usr/share/dump1090-fa/html


    4. Created a folder /run/dump1090-fa/ and symlink named data in folder /usr/share/dump1090-fa/html
      Code:

      root# mkdir /run/dump1090-fa/

      root# ln -s /run/dump1090-fa /usr/share/dump1090-fa/html/data






  9. Made webserver automatically start at boot.

    The webserver “Hiawatha” by default does not start at boot, and is to be started manually. To start it at boot, created a Symlink to the hiawatha’s executable file in folder /root/Startup.

    Code:

    ln -s /usr/sbin/hiawatha /root/Startup


  10. Rebooted and checked Map



  11. HARDWARE NEEDED
    Receiver DVB-T (chipsets RTL2832U+R820T2) + Antenna


Back to top
View user's profile Send private message 
ITSMERSH

Joined: 02 May 2018
Posts: 911

PostPosted: Thu 24 Jan 2019, 17:27    Post subject:  

Wow, this seems to be very interesting, though I never heard of this software and possibilities.
Cool

_________________
RSH

Beware of the Dog ähem nic007! Wink
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [2 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0957s ][ Queries: 12 (0.0096s) ][ GZIP on ]