Required packages for running piaware, and more about mlats

Hi Guys, I’ve built piaware from the FA sources on github.com, and so far I’ve managed to get piaware running on Ubuntu 18.04.2 LTS server (“bionic” release) running on both Fusion on a Mac and VIrtualBox on a PC. On Fusion, as this was the first time I was doing it, I was flailing around and tried all sorts of things to get it to work. I wound up building a lot of packages, not all of which seem to be necessary. Here’s what I built on Fusion. I then did a “dpkg -i” on all these .deb’s:
$ find . -name *deb
./dump1090-fa-dbgsym_3.6.3_amd64.ddeb
./bladerf-dbgsym_2018.12-rc2_amd64.ddeb
./piaware_builder/piaware_3.6.3_amd64.deb
./piaware_builder/piaware-dbgsym_3.6.3_amd64.ddeb
./bladerf-fpga-hostedxa4_2018.12-rc2_amd64.deb
./bladerf-fpga-hostedx40_2018.12-rc2_amd64.deb
./libbladerf-dev_2018.12-rc2_amd64.deb
./dump1090_3.6.3_all.deb
./libbladerf2_2018.12-rc2_amd64.deb
./libbladerf2-dbgsym_2018.12-rc2_amd64.ddeb
./bladerf_2018.12-rc2_amd64.deb
./bladerf-firmware-fx3_2018.12-rc2_amd64.deb
./libbladerf-doc_2018.12-rc2_amd64.deb
./libbladerf-udev_2018.12-rc2_amd64.deb
./bladerf-fpga-hostedxa9_2018.12-rc2_amd64.deb
./bladerf-fpga-hostedx115_2018.12-rc2_amd64.deb
./dump1090-fa_3.6.3_amd64.deb

On VirtualBox, thinking I knew what to do, I only built these, and again – I did a “dpkg -i” on all these deb’s:
$ find . -name *deb
./dump1090-fa-dbgsym_3.6.3_amd64.ddeb
./piaware_builder/piaware_3.6.3_amd64.deb
./piaware_builder/piaware-dbgsym_3.6.3_amd64.ddeb
./dump1090_3.6.3_all.deb
./dump1090-fa_3.6.3_amd64.deb

What I notice is that with the piaware running on VirtualBox, I am not seeing any mlats. I assume that’s because the performance of the VM on the PC is not quite as good as the one running on the Mac, and it may be dropping some messages. Or is it because I’m missing some needed packages? Please let me know – what exactly are the necessary packages that one has to build in order to run piaware?

I also ran into a problem yesterday, when I was trying to build piaware for a friend on his Windows laptop using VirtualBox. I could not get dump1090-fa to work. When I ran rtl_test -t, it kept saying “No supported devices found”, or something to that effect, even though his dongle was being passed through to the VM by VirtualBox. I tried both his dongle and mine, both of which are known to work (R820T). The only difference between his Windows laptop and mine is that his has an AMD CPU and mine has an Intel. I don’t think that should make any difference, but perhaps it does. Any thoughts on that?

Thanks in advance, guys.

Curt

If it’s running, i don’t see why mlat wouldn’t work.

Anyway just open

sudo journalctl -f

and check for mlat stuff.
Then in another window do sudo systemctl restart piaware

You should see something like this:

Mar 01 17:57:52 pi piaware[695]: my feeder ID is xxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Mar 01 17:57:52 pi piaware[695]: site statistics URL: https://flightaware.com/adsb/stats/user/wiedehopf#stats-78137
Mar 01 17:57:52 pi piaware[695]: multilateration data requested

And after about 15 minutes you should see:

Mar 01 18:12:52 pi piaware[695]: mlat-client(19125): Receiver status: connected
Mar 01 18:12:52 pi piaware[695]: mlat-client(19125): Server status:   synchronized with 253 nearby receivers

You also need to claim the receiver on flightaware and configure the location, otherwise there will be no mlat.

These are the only debian packages you need:

./dump1090-fa_3.6.3_amd64.deb
./piaware_builder/piaware_3.6.3_amd64.deb

The others are bogus.

1 Like

Well maybe it wasn’t being passed through properly.
Did you run

lsusb
# one of the results should look like this:
Bus 001 Device 003: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838 DVB-T

Just run it once before and after plugging it in.
My bet is the passthrough is not working properly.

1 Like

Mar 03 15:29:03 cpklinux piaware[1813]: mlat-client(1845): Receiver status: connected
Mar 03 15:29:03 cpklinux piaware[1813]: mlat-client(1845): Server status: not synchronized with any nearby receivers
Mar 03 15:29:03 cpklinux piaware[1813]: mlat-client(1845): Receiver: 30.4 msg/s received 10.5 msg/s processed (35%)
Mar 03 15:29:03 cpklinux piaware[1813]: mlat-client(1845): Server: 0.0 kB/s from server 0.0kB/s TCP to server 0.1kB/s UDP to server
Mar 03 15:29:03 cpklinux piaware[1813]: mlat-client(1845): Aircraft: 6 of 7 Mode S, 4 of 4 ADS-B used
Mar 03 15:29:34 cpklinux piaware[1813]: 893 msgs recv’d from dump1090-fa (270 in last 5m); 893 msgs sent to FlightAware
Mar 03 15:34:34 cpklinux piaware[1813]: 1236 msgs recv’d from dump1090-fa (343 in last 5m); 1236 msgs sent to FlightAware
Mar 03 15:39:34 cpklinux piaware[1813]: 1611 msgs recv’d from dump1090-fa (375 in last 5m); 1611 msgs sent to FlightAware
Mar 03 15:44:03 cpklinux piaware[1813]: mlat-client(1845): Receiver status: connected
Mar 03 15:44:03 cpklinux piaware[1813]: mlat-client(1845): Server status: not synchronized with any nearby receivers
Mar 03 15:44:03 cpklinux piaware[1813]: mlat-client(1845): Receiver: 36.9 msg/s received 12.0 msg/s processed (32%)
Mar 03 15:44:03 cpklinux piaware[1813]: mlat-client(1845): Server: 0.0 kB/s from server 0.0kB/s TCP to server 0.2kB/s UDP to server
Mar 03 15:44:03 cpklinux piaware[1813]: mlat-client(1845): Aircraft: 4 of 6 Mode S, 10 of 10 ADS-B used
Mar 03 15:44:34 cpklinux piaware[1813]: 2063 msgs recv’d from dump1090-fa (452 in last 5m); 2063 msgs sent to FlightAware
Mar 03 15:49:34 cpklinux piaware[1813]: 2495 msgs recv’d from dump1090-fa (432 in last 5m); 2495 msgs sent to FlightAware
Mar 03 15:54:34 cpklinux piaware[1813]: 2888 msgs recv’d from dump1090-fa (393 in last 5m); 2888 msgs sent to FlightAware
Mar 03 15:59:03 cpklinux piaware[1813]: mlat-client(1845): Receiver status: connected
Mar 03 15:59:03 cpklinux piaware[1813]: mlat-client(1845): Server status: not synchronized with any nearby receivers
Mar 03 15:59:03 cpklinux piaware[1813]: mlat-client(1845): Receiver: 36.1 msg/s received 11.1 msg/s processed (31%)
Mar 03 15:59:03 cpklinux piaware[1813]: mlat-client(1845): Server: 0.0 kB/s from server 0.0kB/s TCP to server 0.1kB/s UDP to server
Mar 03 15:59:03 cpklinux piaware[1813]: mlat-client(1845): Aircraft: 3 of 5 Mode S, 5 of 5 ADS-B used
Mar 03 15:59:34 cpklinux piaware[1813]: 3204 msgs recv’d from dump1090-fa (316 in last 5m); 3204 msgs sent to FlightAware
Mar 03 16:04:34 cpklinux piaware[1813]: 3418 msgs recv’d from dump1090-fa (214 in last 5m); 3418 msgs sent to FlightAware
Mar 03 16:09:34 cpklinux piaware[1813]: 3635 msgs recv’d from dump1090-fa (217 in last 5m); 3635 msgs sent to FlightAware
Mar 03 16:14:04 cpklinux piaware[1813]: mlat-client(1845): Receiver status: connected
Mar 03 16:14:04 cpklinux piaware[1813]: mlat-client(1845): Server status: not synchronized with any nearby receivers
Mar 03 16:14:04 cpklinux piaware[1813]: mlat-client(1845): Receiver: 22.5 msg/s received 5.8 msg/s processed (26%)
Mar 03 16:14:04 cpklinux piaware[1813]: mlat-client(1845): Server: 0.0 kB/s from server 0.0kB/s TCP to server 0.1kB/s UDP to server
Mar 03 16:14:04 cpklinux piaware[1813]: mlat-client(1845): Aircraft: 2 of 6 Mode S, 6 of 6 ADS-B used
Mar 03 16:14:34 cpklinux piaware[1813]: 3978 msgs recv’d from dump1090-fa (343 in last 5m); 3978 msgs sent to FlightAware
Mar 03 16:17:01 cpklinux CRON[1967]: pam_unix(cron:session): session opened for user root by (uid=0)
Mar 03 16:17:01 cpklinux CRON[1968]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Mar 03 16:17:01 cpklinux CRON[1967]: pam_unix(cron:session): session closed for user root
Mar 03 16:19:34 cpklinux piaware[1813]: 4185 msgs recv’d from dump1090-fa (207 in last 5m); 4185 msgs sent to FlightAware
Mar 03 16:24:34 cpklinux piaware[1813]: 4366 msgs recv’d from dump1090-fa (181 in last 5m); 4366 msgs sent to FlightAware
Mar 03 16:29:04 cpklinux piaware[1813]: mlat-client(1845): Receiver status: connected
Mar 03 16:29:04 cpklinux piaware[1813]: mlat-client(1845): Server status: not synchronized with any nearby receivers
Mar 03 16:29:04 cpklinux piaware[1813]: mlat-client(1845): Receiver: 16.9 msg/s received 6.0 msg/s processed (36%)
Mar 03 16:29:04 cpklinux piaware[1813]: mlat-client(1845): Server: 0.0 kB/s from server 0.0kB/s TCP to server 0.1kB/s UDP to server
Mar 03 16:29:04 cpklinux piaware[1813]: mlat-client(1845): Aircraft: 2 of 2 Mode S, 8 of 8 ADS-B used
Mar 03 16:29:34 cpklinux piaware[1813]: 4672 msgs recv’d from dump1090-fa (306 in last 5m); 4672 msgs sent to FlightAware
Mar 03 16:34:34 cpklinux piaware[1813]: 4791 msgs recv’d from dump1090-fa (119 in last 5m); 4791 msgs sent to FlightAware
Mar 03 16:39:34 cpklinux piaware[1813]: 4876 msgs recv’d from dump1090-fa (85 in last 5m); 4876 msgs sent to FlightAware
Mar 03 16:44:05 cpklinux piaware[1813]: mlat-client(1845): Receiver status: connected
Mar 03 16:44:05 cpklinux piaware[1813]: mlat-client(1845): Server status: not synchronized with any nearby receivers
Mar 03 16:44:05 cpklinux piaware[1813]: mlat-client(1845): Receiver: 12.4 msg/s received 3.6 msg/s processed (29%)
Mar 03 16:44:05 cpklinux piaware[1813]: mlat-client(1845): Server: 0.0 kB/s from server 0.0kB/s TCP to server 0.0kB/s UDP to server
Mar 03 16:44:05 cpklinux piaware[1813]: mlat-client(1845): Aircraft: 4 of 6 Mode S, 7 of 7 ADS-B used
Mar 03 16:44:34 cpklinux piaware[1813]: 5095 msgs recv’d from dump1090-fa (219 in last 5m); 5095 msgs sent to FlightAware
Mar 03 16:49:34 cpklinux piaware[1813]: 5394 msgs recv’d from dump1090-fa (299 in last 5m); 5394 msgs sent to FlightAware

You only see 3 ADS-B aircraft.

Improve you reception first and worry about MLAT later.
(you might want to delete that log i has precise coordinates, forgot to mention that.)

1 Like

What log are your referring to?

The post you just made with the output. It has coordinates :wink:
I mean no one probably cares where you live but just in case i like to at least tell people they just posted their exact coordinates.

1 Like

Why am I getting this? Is it because I’m not receiving enough ADS-B messages?

MLAT needs ADS-B message to synchronize with other receivers.

You are receiving virtually no messages.
So yes your lack of reception is most likely the reason why MLAT isn’t working.

In case of USB latency problems it would say “clock unstable” when you check that log.

1 Like

Could this be why I’m not getting any mlats? @obj said that it could be due to my not-so-fast Windows laptop running piaware in a VM is so slow that it’s “dropping sample data”, then that could cause mlats to not happen. You said it may be due to my poor reception. Both may be true. I’m wondering if the slow VM may have the same effect as “poor reception”, i.e. I’m not getting enough data. What do you think?

I think you should just use a Raspberry Pi instead of virtual machines :slight_smile:

Or just use an old x86 computer and install linux natively.

2 Likes

TODAY’s EXPERIMENT

  • Installed Ubuntu Bionic 18.04 in VM on my Windows PC

  • Installed dump1090-fa (minus bladeRF)

  • Installed Piaware data feeder.

  • One of my Pi has lot of MLAT planes.
    From that Pi, removed following and connected to Windows Desktop running Oracle VM:
    FlightAware 26" / 66 cm Antenna in window + FA Filter + FA Pro Stick (orange)

No MLAT planes in VM/Ubuntu. Only “ADSB” and “Others”

.

https://flightaware.com/adsb/stats/user/abcd567#stats-76000

.

Ubuntu-Bionic-Piaware-Dump1090-fa

.

abcd@ubuntu:~$ sudo systemctl status piaware -l

● piaware.service - FlightAware ADS-B uploader
   Loaded: loaded (/lib/systemd/system/piaware.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2019-03-03 13:51:01 EST; 32min ago
     Docs: https://flightaware.com/adsb/piaware/
 Main PID: 692 (piaware)
    Tasks: 4 (limit: 4660)
   CGroup: /system.slice/piaware.service
           ├─ 692 /usr/bin/piaware -p /run/piaware/piaware.pid -plainlog -statusfile /run/piaware/status.json
           ├─ 815 /usr/lib/piaware/helpers/fa-mlat-client --input-connect localhost:30005 --input-type dump1090 --results beast
           └─1923 /usr/lib/piaware/helpers/faup1090 --net-bo-ipaddr localhost --net-bo-port 30005 --stdout --lat 43.5xxx --lon -79.6xxx

Mar 03 14:15:50 ubuntu piaware[692]: ADS-B data program 'dump1090-fa' is listening on port 30005, so far so good
Mar 03 14:15:50 ubuntu piaware[692]: Starting faup1090: /usr/lib/piaware/helpers/faup1090 --net-bo-ipaddr localhost --net-bo-po
Mar 03 14:15:50 ubuntu piaware[692]: Started faup1090 (pid 1923) to connect to dump1090-fa
Mar 03 14:16:39 ubuntu piaware[692]: 2511 msgs recv'd from dump1090-fa (254 in last 5m); 2510 msgs sent to FlightAware
Mar 03 14:21:18 ubuntu piaware[692]: mlat-client(815): Receiver status: connected
Mar 03 14:21:18 ubuntu piaware[692]: mlat-client(815): Server status:   clock unstable
Mar 03 14:21:18 ubuntu piaware[692]: mlat-client(815): Receiver:   93.3 msg/s received       26.6 msg/s processed (29%)
Mar 03 14:21:18 ubuntu piaware[692]: mlat-client(815): Server:      0.0 kB/s from server    0.0kB/s TCP to server     0.2kB/s U
Mar 03 14:21:18 ubuntu piaware[692]: mlat-client(815): Aircraft: 9 of 33 Mode S, 19 of 30 ADS-B used
Mar 03 14:21:39 ubuntu piaware[692]: 3674 msgs recv'd from dump1090-fa (1163 in last 5m); 3673 msgs sent to FlightAware

.

HOW I INSTALLED DUMP1090-FA & PIAWARE?

1 - DUMP1090-FA

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

1.2 - Cloned source code

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

1.3 - Deleted requirement to install bladeRF from source code files

sudo sed -i 's/, libbladerf-dev//' ~/dump1090-fa/debian/control
sudo sed -i 's/libbladerf1 (>= 0.2016.06),//' ~/dump1090-fa/debian/control
sudo sed -i 's/BLADERF=yes/BLADERF=no/' ~/dump1090-fa/debian/rules

1.4 - Moved into cloned directory & build the dump1090-fa package

cd dump1090-fa
sudo dpkg-buildpackage -b

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

cd ../
ls

Desktop                 dump1090-fa_3.6.3_amd64.buildinfo    Music
Documents               dump1090-fa_3.6.3_amd64.changes      Pictures
Downloads               dump1090-fa_3.6.3_amd64.deb          Public
dump1090_3.6.3_all.deb  dump1090-fa-dbgsym_3.6.3_amd64.ddeb  Templates
dump1090-fa             examples.desktop                     Videos  

.

1.6 - Installed dump1090-fa

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

.

1.7 - Rebooted

sudo reboot 

.

2 - PIAWARE

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

2.2 - Cloned source-code and build Piaware package

cd ~/
git clone https://github.com/flightaware/piaware_builder.git  
cd  piaware_builder  
CODENAME=(`lsb_release -sc`)  
echo ${CODENAME}  
# above command outputs distro's codename ("bionic" in this case)
./sensible-build.sh ${CODENAME}  

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

2.3 - Checked if the package is actually built

cd ../   
ls  

bionic       package-bionic                                README.md
changelog    piaware_3.6.3~ubuntu1804+1_amd64.buildinfo    sensible-build.sh
common       piaware_3.6.3~ubuntu1804+1_amd64.changes      stretch
Jenkinsfile  piaware_3.6.3~ubuntu1804+1_amd64.deb          wheezy
jessie       piaware-dbgsym_3.6.3~ubuntu1804+1_amd64.ddeb  xenial

.

2.4 - Installed Piaware

sudo dpkg -i piaware_*.deb  

.

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

2.6 - Checked Status, ok

sudo systemctl status piaware  
2 Likes

What does this command say:

journalctl -u piaware | grep 'Receiver status\|Server status'

I’m curious that MLAT isn’t red.
Maybe it can’t even start to synchronize and therefore doesn’t show red.

1 of 2

abcd@ubuntu:~$ sudo systemctl status piaware -l
● piaware.service - FlightAware ADS-B uploader
   Loaded: loaded (/lib/systemd/system/piaware.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2019-03-03 13:51:01 EST; 32min ago
     Docs: https://flightaware.com/adsb/piaware/
 Main PID: 692 (piaware)
    Tasks: 4 (limit: 4660)
   CGroup: /system.slice/piaware.service
           ├─ 692 /usr/bin/piaware -p /run/piaware/piaware.pid -plainlog -statusfile /run/piaware/status.json
           ├─ 815 /usr/lib/piaware/helpers/fa-mlat-client --input-connect localhost:30005 --input-type dump1090 --results beast
           └─1923 /usr/lib/piaware/helpers/faup1090 --net-bo-ipaddr localhost --net-bo-port 30005 --stdout --lat 43.5xxx --lon -79.6xxx

Mar 03 14:15:50 ubuntu piaware[692]: ADS-B data program 'dump1090-fa' is listening on port 30005, so far so good
Mar 03 14:15:50 ubuntu piaware[692]: Starting faup1090: /usr/lib/piaware/helpers/faup1090 --net-bo-ipaddr localhost --net-bo-po
Mar 03 14:15:50 ubuntu piaware[692]: Started faup1090 (pid 1923) to connect to dump1090-fa
Mar 03 14:16:39 ubuntu piaware[692]: 2511 msgs recv'd from dump1090-fa (254 in last 5m); 2510 msgs sent to FlightAware
Mar 03 14:21:18 ubuntu piaware[692]: mlat-client(815): Receiver status: connected
Mar 03 14:21:18 ubuntu piaware[692]: mlat-client(815): Server status:   clock unstable
Mar 03 14:21:18 ubuntu piaware[692]: mlat-client(815): Receiver:   93.3 msg/s received       26.6 msg/s processed (29%)
Mar 03 14:21:18 ubuntu piaware[692]: mlat-client(815): Server:      0.0 kB/s from server    0.0kB/s TCP to server     0.2kB/s U
Mar 03 14:21:18 ubuntu piaware[692]: mlat-client(815): Aircraft: 9 of 33 Mode S, 19 of 30 ADS-B used
Mar 03 14:21:39 ubuntu piaware[692]: 3674 msgs recv'd from dump1090-fa (1163 in last 5m); 3673 msgs sent to FlightAware

.

2 of 2

abcd@ubuntu:~$ journalctl -u piaware | grep 'Receiver status\|Server status'

Mar 03 14:06:18 ubuntu piaware[692]: mlat-client(815): Receiver status: connected
Mar 03 14:06:18 ubuntu piaware[692]: mlat-client(815): Server status:   clock unstable
Mar 03 14:21:18 ubuntu piaware[692]: mlat-client(815): Receiver status: connected
Mar 03 14:21:18 ubuntu piaware[692]: mlat-client(815): Server status:   clock unstable
Mar 03 14:36:18 ubuntu piaware[692]: mlat-client(815): Receiver status: connected
Mar 03 14:36:19 ubuntu piaware[692]: mlat-client(815): Server status:   clock unstable
Mar 03 14:51:19 ubuntu piaware[692]: mlat-client(815): Receiver status: connected
Mar 03 14:51:19 ubuntu piaware[692]: mlat-client(815): Server status:   clock unstable
Mar 03 15:06:19 ubuntu piaware[692]: mlat-client(815): Receiver status: connected
Mar 03 15:06:19 ubuntu piaware[692]: mlat-client(815): Server status:   clock unstable
1 Like

clock unstable as expected.

It might depend how the host system gives access to the USB device.

You might be able to hand the complete USB hub not only the device through to the VM.
But even then i’m not sure how well it would work.

Surely also depends on OS - VM combination.

1 Like

I didn’t dig into it much at the time but I think it was more of a problem with the VM implementation rather than a performance issue. Some sort of bad interaction between the VM’s USB passthrough and the dongle’s not very great device-side USB implementation.

1 Like

.

I dont think it is possible. Only individual USB devices

Can you change that to USB 2.0?

My today’s experiment shows that my RPi’s “FA antenna + Pigtail + FA Filter + FA Pro Stick” (which gave good MLAT results), when unplugged from Pi and Plugged into Windows Desktop running dump1090-fa in VM, the MLAT failed.

1 Like

The settings dialogue only lists the USB devices currently plugged into the Windows Desktop, and I can select any from the list. I cant add a non-connected USB device or change the type of USB.