FlightAware Discussions

Version 3.7.0 of dump1090-fa & Piaware

image

.

.

image

Step-by-step method I used to build and Install dump1090-fa 3.7.0 & Piaware 3.7.0 from source code

NOTE:
From output generated during building of dump1090-fa from source code, it appears that it has built dump978 also. Have yet to test/check.

1 - OS

wrote Raspbian Stretch Lite (2018-11-13-raspbian-stretch-lite.img) to microSD card

2 - DUMP1090-FA

2.1 - Installed packages needed to build and to fulfill dependencies

sudo apt install -y debhelper dh-systemd librtlsdr-dev libusb-1.0-0-dev 
sudo apt install -y git pkg-config libncurses5-dev lighttpd libbladerf-dev  

2.2 - Cloned source code

cd ~/
git clone https://github.com/flightaware/dump1090.git dump1090-fa

2.3 - Moved into cloned directory, set head at ver 3.7.0, and build the dump1090-fa package

cd dump1090-fa 
git checkout v3.7.0 

#Note: checking out 'v3.7.0'.
#.....
#HEAD is now at a654c60... Release v3.7.0

sudo dpkg-buildpackage -b   

2.4 - After the package is built, move out of dump1090 directory, and check what has been built

cd ../
ls

dump1090_3.7.0_all.deb             dump1090-fa_3.7.0_armhf.changes   
dump1090-fa                        dump1090-fa_3.7.0_armhf.deb
dump1090-fa_3.7.0_armhf.buildinfo  dump1090-fa-dbgsym_3.7.0_armhf.deb

.

2.5 - Installed dump1090-fa

sudo dpkg -i dump1090-fa_*_*.deb

.

2.6 - Rebooted

sudo reboot 

.

3 - PIAWARE

3.1 - Installed packages necessary to build and to fulfil dependencies

sudo apt install -y git devscripts build-essential debhelper  
sudo apt install -y tcl8.6-dev autoconf python3-dev python3-venv  
sudo apt install -y virtualenv dh-systemd zlib1g-dev tclx8.4  
sudo apt install -y tcllib tcl-tls itcl3 net-tools 
sudo apt install -y libboost-system-dev libboost-program-options-dev 
sudo apt install -y libboost-regex-dev libboost-filesystem-dev

.

3.2 - Cloned source-code, set head at ver 3.7.0, and build Piaware package

cd ~/
git clone https://github.com/flightaware/piaware_builder.git  
cd  piaware_builder  

git checkout v3.7.0  

#Note: checking out 'v3.7.0'.
#........
#HEAD is now at 829d2ab... Release v3.7.0

CODENAME=(`lsb_release -sc`)  
echo ${CODENAME}  
# above command outputs distro's codename 
#("stretch" in this case)
./sensible-build.sh ${CODENAME}  

cd  package-${CODENAME}  
sudo dpkg-buildpackage -b  

.

3.3 - Checked if the package is actually built

cd ../
ls
bionic     Jenkinsfile      piaware_3.7.0_armhf.buildinfo  piaware-dbgsym_3.7.0_armhf.deb  stretch
changelog  jessie           piaware_3.7.0_armhf.changes    README.md                       wheezy
common     package-stretch  piaware_3.7.0_armhf.deb        sensible-build.sh 

3.4 - Installed Piaware

sudo dpkg -i piaware_3.7.0_armhf.deb   

3.5 - CONFIGURED PIAWARE

(used actual feeder-id in place of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx )

sudo piaware-config feeder-id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 
sudo piaware-config allow-auto-updates yes 
sudo piaware-config allow-manual-updates yes 

sudo systemctl restart piaware  

3.6 - CHECKED STATUS

pi@raspberrypi:~/piaware_builder $ sudo systemctl status piaware  

● piaware.service - FlightAware ADS-B uploader
   Loaded: loaded (/lib/systemd/system/piaware.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2019-03-29 01:04:05 EDT; 7min ago
     Docs: https://flightaware.com/adsb/piaware/
 Main PID: 5419 (piaware)
   CGroup: /system.slice/piaware.service
           ├─5419 /usr/bin/piaware -p /run/piaware/piaware.pid -plainlog -statusfile /run/piaware/status.json
           ├─5531 /usr/lib/piaware/helpers/fa-mlat-client --input-connect localhost:30005 --input-type dump1090 --results beast,connect,loc
           └─5589 /usr/lib/piaware/helpers/faup1090 --net-bo-ipaddr localhost --net-bo-port 30005 --stdout --lat 43.xxx --lon -79.xxx

Mar 29 01:06:03 raspberrypi piaware[5419]: mlat-client(5531): Input connected to localhost:30005
Mar 29 01:06:03 raspberrypi piaware[5419]: mlat-client(5531): Input format changed to BEAST, 12MHz clock
Mar 29 01:06:03 raspberrypi piaware[5419]: mlat-client(5531): Beast-format results connection with 127.0.0.1:30104: connection established
Mar 29 01:06:03 raspberrypi sudo[5581]:  piaware : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/netstat --program --tcp --wide --all --nu
Mar 29 01:06:03 raspberrypi sudo[5581]: pam_unix(sudo:session): session opened for user root by (uid=0)
Mar 29 01:06:03 raspberrypi sudo[5581]: pam_unix(sudo:session): session closed for user root
Mar 29 01:06:03 raspberrypi piaware[5419]: ADS-B data program 'dump1090-fa' is listening on port 30005, so far so good
Mar 29 01:06:03 raspberrypi piaware[5419]: Starting faup1090: /usr/lib/piaware/helpers/faup1090 --net-bo-ipaddr localhost --net-bo-port 300
Mar 29 01:06:03 raspberrypi piaware[5419]: Started faup1090 (pid 5589) to connect to dump1090-fa
Mar 29 01:09:40 raspberrypi piaware[5419]: 107 msgs recv'd from dump1090-fa (107 in last 5m); 107 msgs sent to FlightAware

2 Likes

Is this safe to do now?
I updated on the weekend and my stats stopped being updated.
OBJ said the the back end servers were not ready.

1 Like

While the piaware package build process was halfway, I had to leave it continuing and move away.

I am doing this trial on a fresh install of Raspbian Stretch image on microSD card of my station 5252, which is down till I return, resume and complete the build & install process. Only after that I can say how it is working.

The email said they’ll provide packages or instruction anyway for early testers.
That won’t be too long i’m pretty sure and then the backend will be live as well i assume.

I’d just wait for that @jonhawkes2030.

On another note it seems the backend is enabled :wink:

On debian unstable i get an error for the mlat client.
But that is hopefully limited to that system.

Fatal Python error: initfsencoding: Unable to get the locale encoding
ImportError: invalid flags 1551282119 in 'encodings'
2 Likes

I will know about this when I get back to my computer. I left while the process of building the Piaware package was still running.

The build process of dump1090-fa did not give any errors, nor there was any error during installation of the package.

PS:
My install is being done on fresh image of Raspbian Stretch / RPi.

I plan to later do it on Ubuntu Bionic, and Debian Stretch in Oracle VM.

Probably related to python 3.7 which is probably not installed on your platforms :slight_smile:

Error occurs only when the mlat-client is started.

Seems me, you and @jonhawkes2030 want to be earlier than the “early testers”

Hey i just wanted to check if the backend is up because jon was asking.

I noticed that my mlat wasn’t working.

Also the new dump1090-fa needs ENABLED=yes in the config file or it won’t run which will create wonderful headaches all around.

Also asks on installation if you would like to override /etc/default/dump1090-fa, which will confuse everyone :slight_smile:

Edit: Seems like it will add ENABLED=yes on upgrade, so should be fine.
But the second point asking questions during the package install will still be interesting.

If anyone is curious, applying the following patch to
piaware_builder/package-stretch/cx_Freeze-5.1.1/cx_Freeze/freezer.py
makes the mlat-client work with python3.7

https://github.com/msys2/MINGW-packages/blob/4c18633ba2331d980f00aff075f17135399c43c5/mingw-w64-python-cx_Freeze/0002-python37-support.patch

For people using Raspbian stretch that’s not a problem because the python version is 3.5

I have now completed building & installang packages for dump1090-fa & Piaware, and have added screenshots to Post #1

Contrary to @wiedehopf’s experience of facing some trouble on Debian unstable, I did NOT face any problem whatsoever in building & installing v3.7.0 on RPi / Raspbian Stretch Lite.

Well done @obj & Flightaware team.

Wait… there is one little problem: In dump1090-fa map, the rings at 100, 150 & 200nm are missing.

Also, I have to find how to configure & setup dump978.

1 Like

You misunderstood, i was talking about a problem with python3.7 which most people won’t have on their systems for quite some time.
And apart from that little problem it works just fine.

Did you get the prompt about the config file when installing dump1090-fa 3.7?
(You wouldn’t if no previous version of dump1090-fa was installed before or the previously installed version had no changes of the config file since installation)

If you are asked a question during the upgrade process to 3.7 in regards to a configuration file it’s best to just press return. That means you will just keep you current config file which works just fine with 3.7 (ENABLED=“yes” is automatically added)

No

Aren’t they located on the South America? The " " error?

No, they dont exist anywhere on globe.

Not the " " error :slight_smile:
https://discussions.flightaware.com/t/enhancements-to-dump978-uat-decoder/34531/26

1 Like

It works for me, what is your config file?

(1) The station marker & rings are based on location data fedback to dump1090-fa by FA server through Piaware.

(2) My config file was like given below. I changed SiteShow = false;" to "SiteShow =true", and SiteLat & SiteLon values to my actual lat/lon, but no success.

pi@raspberrypi:~ $ cat /usr/share/dump1090-fa/html/config.js 

// --------------------------------------------------------
//
// This file is to configure the configurable settings.
// Load this file before script.js file at gmap.html.
//
// --------------------------------------------------------

// -- Title Settings --------------------------------------
// Show number of aircraft and/or messages per second in the page title
PlaneCountInTitle = true;
MessageRateInTitle = false;

// -- Output Settings -------------------------------------
// The DisplayUnits setting controls whether nautical (ft, NM, knots),
// metric (m, km, km/h) or imperial (ft, mi, mph) units are used in the
// plane table and in the detailed plane info. Valid values are
// "nautical", "metric", or "imperial".
DisplayUnits = "nautical";

// -- Map settings ----------------------------------------
// These settings are overridden by any position information
// provided by dump1090 itself. All positions are in decimal
// degrees.

// Default center of the map.
DefaultCenterLat = 45.0;
DefaultCenterLon = 9.0;
// The google maps zoom level, 0 - 16, lower is further out
DefaultZoomLvl   = 7;

// Center marker. If dump1090 provides a receiver location,
// that location is used and these settings are ignored.

SiteShow    = false;           // true to show a center marker
SiteLat     = 45.0;            // position of the marker
SiteLon     = 9.0;
SiteName    = "My Radar Site"; // tooltip of the marker

// -- Marker settings -------------------------------------

// These settings control the coloring of aircraft by altitude.
// All color values are given as Hue (0-359) / Saturation (0-100) / Lightness (0-100)
ColorByAlt = {
        // HSL for planes with unknown altitude:
        unknown : { h: 0,   s: 0,   l: 40 },

        // HSL for planes that are on the ground:
        ground  : { h: 15, s: 80, l: 20 },

        air : {
                // These define altitude-to-hue mappings
                // at particular altitudes; the hue
                // for intermediate altitudes that lie                // between the provided altitudes is linearly
                // interpolated.
                //
                // Mappings must be provided in increasing
                // order of altitude.
                //
                // Altitudes below the first entry use the
                // hue of the first entry; altitudes above
                // the last entry use the hue of the last
                // entry.
                h: [ { alt: 2000,  val: 20 },    // orange
                     { alt: 10000, val: 140 },   // light green
                     { alt: 40000, val: 300 } ], // magenta
                s: 85,
                l: 50,
        },

        // Changes added to the color of the currently selected plane
        selected : { h: 0, s: -10, l: +20 },

        // Changes added to the color of planes that have stale position info
        stale :    { h: 0, s: -10, l: +30 },

        // Changes added to the color of planes that have positions from mlat
        mlat :     { h: 0, s: -10, l: -10 }
};

// For a monochrome display try this:
// ColorByAlt = {
//         unknown :  { h: 0, s: 0, l: 40 },
//         ground  :  { h: 0, s: 0, l: 30 },
//         air :      { h: [ { alt: 0, val: 0 } ], s: 0, l: 50 },
//         selected : { h: 0, s: 0, l: +30 },
//         stale :    { h: 0, s: 0, l: +30 },
//         mlat :     { h: 0, s: 0, l: -10 }
// };

// Outline color for aircraft icons with an ADS-B position
OutlineADSBColor = '#000000';

// Outline color for aircraft icons with a mlat position
OutlineMlatColor = '#4040FF';

SiteCircles = true; // true to show circles (only shown if the center marker is shown)
// In miles, nautical miles, or km (depending settings value 'DisplayUnits')
SiteCirclesDistances = new Array(100,150,200);

// Controls page title, righthand pane when nothing is selected
PageName = "PiAware Skyview";

// Show country flags by ICAO addresses?
ShowFlags = true;

// Path to country flags (can be a relative or absolute URL; include a trailing /)
FlagPath = "flags-tiny/";

// Set to true to enable the ChartBundle base layers (US coverage only)
ChartBundleLayers = false;

// Provide a Bing Maps API key here to enable the Bing imagery layer.
// You can obtain a free key (with usage limits) at
// https://www.bingmapsportal.com/ (you need a "basic key")
//
// Be sure to quote your key:
//   BingMapsAPIKey = "your key here";
//
BingMapsAPIKey = null;

// Turn on display of extra Mode S EHS / ADS-B v1/v2 data
// This is not polished yet (and so is disabled by default),
// currently it's just a data dump of the new fields with no UX work.
ExtendedData = false;
pi@raspberrypi:~ $

After my making SiteShow=true;, and correcting SiteLat/SiteLon values, I have forgotten my favorite “clear browser cache” and “reload browser”.

Done it now. As ususl fixed it :slight_smile:

However the previous system of feed back of ring data from FA server need to be fixed in source code.

2 Likes

Ah right. Yeah the new dump1090-fa “starter” didn’t quite get that right.

@obj
The file /usr/share/dump1090-fa/start-dump1090-fa needs to be amended:
In addition to or instead of this:

if [ -n "$LAT" -a -n "$LON" ]
then
    POSITION="--lat $LAT --lon $LON"
fi

It needs this.

if [ -n "$PIAWARE_LAT" -a -n "$PIAWARE_LON" ]
then
    POSITION="--lat $PIAWARE_LAT --lon $PIAWARE_LON"
fi

@abcd567
good catch, i always had lat and lon entered in my dump1090-fa configuration file so i didn’t notice.

1 Like

Dump1090 V3.7.0 (and dump978/skyview978) also allow you to display extra statistics.

Edit config.js to enable extra data in version 3.7.0

sudo vi /usr/share/dump1090-fa/html/config.js
// Turn on display of extra Mode S EHS / ADS-B v1/v2 data
// This is not polished yet (and so is disabled by default),
// currently it’s just a data dump of the new fields with no UX work.
ExtendedData = true;

image
image
image

That variable doesn’t do anything (anymore probably).
The fields you show have been available since 3.6 or 3.5 i believe.