I faced problem of mlat not synchronized when piaware & dump1090-fa were installed in Debian running in Oracle VM on Windows PC. The passthrough of dongle from Windows to VM made clock unstable.
I solved this problem by installing dump1090-win on Windows PC, so there was no problem of dongle passthrough as the dongle was directly accessible to dump1090-win.
In order to transfer data from dump1090-win to dump1090-fa, I created a puller service which used socat TCP connection between two dump1090s. In dump1090-fa’s config file, I had to change RECEIVER=rtlsdr to RECEIVER=none to run it in net mode without any dongle.
Below are full details of what I did;
(1) ON Windows PC
(1.1) Downloaded dump1090-win from github to Windows PC
https://github.com/MalcolmRobb/dump1090/raw/master/dump1090-win.1.10.3010.14.zip
(1.2) Unzipped the downloaded folder.
(1.3) Entered the unzipped folder. Inside this folder there is a file named dump1090.bat
. Double clicked it to start dump1090-win. When done first time, I was asked permission to run it, which I gave. This started a command prompt displaying aircraft data,as shown in screenshot below.
(2) In Debian running in VM
(2.1) Installed package socat
(2.2) Created necessary folder and file to run the socat TCP connection between dump1090-win
and dump1090-fa
sudo apt install socat
sudo mkdir /usr/share/puller
sudo touch /usr/share/puller/puller.sh
sudo chmod +x /usr/share/puller/puller.sh
sudo nano /usr/share/puller/puller.sh
Copy-pasted following code in newly created blank file /usr/share/puller/puller.sh
NOTE: In line SOURCE_IP="192.168.12.6"
, replace 192.168.12.6
by IP address of your Windows Computer on which you are running the dump1090-win
#!/bin/bash
SOURCE_IP="192.168.12.6"
OPTIONS="keepalive,keepidle=30,keepintvl=30,keepcnt=2,connect-timeout=30,retry=2,interval=15"
while true
do
echo "CONNECTING TO: dump1090-windows"
socat --experimental -dd -u TCP:${SOURCE_IP}:30005,${OPTIONS} TCP:127.0.0.1:30004,${OPTIONS}
echo "LOST CONNECTION TO: dump1090-windows"
sleep 60
done
(2.3) Created systemd service to run the puller script
sudo nano /lib/systemd/system/puller.service
In the newly created blank service file /lib/systemd/system/puller.service
, copy-paste following code
# puller service for systemd
[Unit]
Description=puller service
Wants=network.target
After=network.target
[Service]
##User=puller
RuntimeDirectory=puller
RuntimeDirectoryMode=0755
ExecStart=/usr/share/puller/puller.sh
SyslogIdentifier=puller
Type=simple
Restart=on-failure
RestartSec=30
RestartPreventExitStatus=64
Nice=-5
[Install]
WantedBy=default.target
Enable and start the puller
sudo systemctl enable puller
sudo systemctl start puller
(2.4) Edited file /etc/default/dump1090-fa
and changed RECEIVER=rtlsdr
to RECEIVER=none
.
Saved file and restarted dump1090-fa
sudo systemctl restart dump1090-fa
RESULT:
Click on Screenshot to See Larger Size
Alternative for item (2):
Under item (2), carryout only step (2.4) to run dump1090-fa in net-only mode, and omit steps (2.1), (2.2), & (2.3) which pertain to creation of `socat TCP connector “puller”. Instead issue following commands which will enable piaware to create a connection directly to dump1090-win.
NOTE: in the command below, change 192.168.12.6
to IP of your Windows computer running dump1090-win
.
sudo piaware-config receiver-type other
sudo piaware-config receiver-port 30005
sudo piaware-config receiver-host 192.168.12.6
sudo systemctl restart piaware
Comparing above two methods, the Alternative is simpler, but has disadvantage that dump1090-fa will be without data and as a result Skyaware map will be without any aircraft.
Although dump1090-win provides a map in browser in Windows PC at following address:
localhost:8080
but it has Google map with water marks. Also, in some browsers, map will not show, only 2 clocks at top-right corner. This is caused by format of files in unzipped folder dump1090-win/public_html being in DOS/Windows format (CRLF) indtead of Unix (LF). I used Notepad++
to change Windows {CRLF) to Unix (LF), and map started working OK.