How-to install AcarsDeco2 on a Rasberry PI already running dump1090

How do I stop the auto start of ACARSDECO2 and be able to run ACARSDECO2 from the command line? @abcd567 I installed ACARSDECO2 from your repository and worked flawlessly. However, if you want to supply UDP traffic to plane plotter, ACARSDECO has to be run from the command line. I have DUMPVDL2 running on the Raspberry Pi desktop via VNC then I just close off VNC when I am done.

If you have installed by method given at GitHub - abcd567a/ad2: AcarSDeco2 installation script for RPi 2/3/4 and Raspbian Stretch/Buster, then to stop autostart, do this:

sudo systemctl disable ad2  
sudo reboot

Now the acarsdeco2 will not start automatically. You can run it manually from commandline

1 Like

I have followed your instruction and I was able to disable acarsdeco2 but when I try to run from the command line I dont know what directory to use.

@glennblum

(1) The binary acarsdeco2 is located in folder /usr/share/ad2/
To issue a command manually you have to move to this directory, then issue the command. See example below

cd /usr/share/ad2
./acarsdeco2 --freq 131550000 --freq 131725000 --http-port 8686 

 

(2) An easier way to avoid moving to binary’s directory everytime you want to use command-line, is to create a symlink to binary in folder /usr/bin as shown below.

sudo ln -s /usr/share/ad2/acarsdeco2 /usr/bin/acarsdeco2

NOTE: the symlink should be created once only, and NOT every time you want t use command-line. Once created, the symlink is permanent and survives reboots.

Once this link is created you dont have to move to binary’s directory, and dont have to use ./ at the start of command. You can issue commands from anywhere like this:

acarsdeco2 --help
OR
acarsdeco2 --freq 131550000 --freq 131725000 --http-port 8686

 

EDIT:
I have now included creation of the symlink in the installation file at Github. For future installations, this symlink will be created during installation, and the user wont have to create it.

 

1 Like

 

 

AcarSDeco2 installation script for RPi 2/3/4 and Raspbian Stretch/Buster

 

 

abcd567, you are awesome, and thank you very much.

What I have found out (I think) that when you run ACARSDECO2 from a boot the outConnectUdp pp will not work. But, if you run it from the command line then it should work and feed data to Planeplotter. From my ACARSPI I have two dongles set up from one vhf antenna, one dongle is running DUMPVDL2 feeding Planeplotter and I can see the positions on the map The second dongle is set to run ACARSDECO2. When I set up the ACARSPI I use it with regular install of Raspberry Pi OS and I set SSH and VNC to be enabled. Then I VNC into the Pi via Google Chrome (VNC extension) as a remote desktop run the command window with my parameters set from DUMPVDL2. I am going to do that from ACARSDECO2. Once I run the command lines then I exit VNC and all is good until I loose power.

1 Like

Probably a timing issue e.g. network is not properly up when you run it on boot.

2 Likes

The network was already included in the service file created by my github script. Is there anything more I need to add to the service file to ensure it waits for network to be fully up before starting the acarsdeco2?

Below is the service file which is created by my automatic install script at Github.

# acarsdeco2 service for systemd
[Unit]
Description=AcarSDeco2
Wants=network.target
After=network.target
[Service]
RuntimeDirectory=acarsdeco2
RuntimeDirectoryMode=0755
ExecStart=/bin/bash ${INSTALL_FOLDER}/ad2-start.sh
SyslogIdentifier=acarsdeco2
Type=simple
Restart=on-failure
RestartSec=30
RestartPreventExitStatus=64
Nice=-5
[Install]
WantedBy=default.target

1 Like

That part I have no clue. Right now both decoders are running and providing data to planeplotter on my main computer through the same port.

1 Like

@obj
@glennblum

May be this is the solution, but I don’t have Planeplotter software installed on Windows, so cannot test it.

STEP-1

sudo systemctl enable systemd-networkd-wait-online.service  
sudo systemctl start systemd-networkd-wait-online.service  

 

STEP-2:
sudo nano /lib/systemd/system/ad2.service

In service file opened by above command, under [Unit] add last two lines shown below

[Unit]
Description=AcarSDeco2
Wants=network.target
After=network.target

## Add these lines
After=systemd-networkd-wait-online.service
Wants=systemd-networkd-wait-online.service

STEP-3:

sudo systemctl daemon-reload  
sudo systemctl enable ad2   
sudo reboot  

 

EDIT:
@glennblum
You may try above modifications. If it does not work as you require for PlanePlotter, you can again disable it’s automatic start at boot by following commands, and continue using command-line.

sudo systemctl disable ad2   
sudo systemctl disable systemd-networkd-wait-online.service
sudo reboot   

 

1 Like

I will try this out in a few moments.

Ok, it did not work and that is ok as well. We are all learning from this. I am happy that you all are willing to help out and we are here sharing our ideas and knowledge. Really when it boild down to it I monitor ACARS, VDL2, ADSB 1090 and 978 as well and occasionally I monitor HFDL with Multipsk or PCHFDL.

1 Like