Welcome, Guest. Please login or register.

November 27, 2021, 08:18:13 AM

Login with username, password and session length

New Members

New Members

You should get an activation email when you join.  If not, please use the Contact option.
Members
Stats
  • Total Posts: 61007
  • Total Topics: 13632
  • Online Today: 63
  • Online Ever: 164
  • (August 20, 2021, 01:02:40 AM)
Users Online

Latest Post

Latest File

Author Topic: ACARSDECO2 help with PI and Plane Plotter  (Read 2075 times)

0 Members and 1 Guest are viewing this topic.

Offline glenn68

  • New Member
  • *
  • Posts: 18
ACARSDECO2 help with PI and Plane Plotter
« on: July 24, 2018, 02:56:11 AM »
I need some help. I have installed ACARSDECO2 V20180603 on my Raspberry Pi and it runs great decoding 4 channels of ACARS and providing data to my copy of Plane Plotter as long as I operate it from the command line on PUTTY. Now if I set it up for ad2.sh to run automatically the program runs great except ACARSDECO2 will not feed data to my copy of Plane Plotter.
Here is the .sh set up;

/home/pi/acars/./acarsdeco2 \
 --device-index 1 \
 --gain 19.7 \
 --freq 131550000 131725000 \
 --freq 131875000 131125000 \
 --http-port 8686 \
 --outConnectUdp pp:192.168.0.100:9742 \

if I run it from the command line from putty then this is what I use;

./acarsdeco2 --device-index 1 --http-port 8686 --gain 19.7 --freq 131550000 --freq 131725000 --freq 131875000 --freq 131125000  --outConnectUdp pp:192.168.0.100:9742


What am I doing wrong?

Thanks,

Glenn
Glenn Blum
Central Texas, USA

Offline tonkepen

  • New Member
  • *
  • Posts: 10
Re: ACARSDECO2 help with PI and Plane Plotter
« Reply #1 on: May 27, 2019, 05:20:50 PM »
This problem happens to me, and I've been trying it for a year, I've asked it, but the truth is exactly the same with me.

Online benipaz

  • New Member
  • *
  • Posts: 4
Re: ACARSDECO2 help with PI and Plane Plotter
« Reply #2 on: May 28, 2019, 07:45:27 PM »
if this setup is good
Code: [Select]
--freq 131550000 --freq 131725000 --freq 131875000 --freq 131125000you have to write every frequency on new line like this
Code: [Select]
--freq 131550000 \
--freq 131725000 \
--freq 131875000 \
--freq 131125000 \

Offline IanH

  • Top Poster
  • *****
  • Posts: 1152
Re: ACARSDECO2 help with PI and Plane Plotter
« Reply #3 on: May 29, 2019, 10:20:58 PM »
<deleted>> wrong thread!
« Last Edit: May 30, 2019, 08:45:39 AM by IanH »

Offline glenn68

  • New Member
  • *
  • Posts: 18
Re: ACARSDECO2 help with PI and Plane Plotter
« Reply #4 on: June 21, 2019, 06:22:21 PM »
I think that I had found the problem with acarsdeco2 sending data to PlanePlotter from a Pi. I think that ACARSDECO2 has to have the console window up and running for the program to run properly. I have the program to run automatically from a .sh and no data is shown at Plane Plotter. If I run the program from a console window I get data. The same happens if you run DUMPVDL2. If DUMPVDL2 is run from a console window you get data into PlanePlotter, if you run DUMPVDL2 from a boot and no console window, no data into Plane Plotter. What could be done to allow both programs to run "headless" and provide data to PlanePlotter?

Thanks,
Glenn
Glenn Blum
Central Texas, USA

Offline tonkepen

  • New Member
  • *
  • Posts: 10
Re: ACARSDECO2 help with PI and Plane Plotter
« Reply #5 on: June 21, 2019, 06:29:03 PM »
Glenn, what have you been doing for over a year, trying, and I can not either. and made all possible methods, but effectively this problem is like that, as you tell it.

Offline glenn68

  • New Member
  • *
  • Posts: 18
Re: ACARSDECO2 help with PI and Plane Plotter
« Reply #6 on: June 22, 2019, 12:49:33 AM »
Its a problem but its the program.
Glenn Blum
Central Texas, USA

Offline acarslogger

  • Member
  • ***
  • Posts: 84
Re: ACARSDECO2 help with PI and Plane Plotter
« Reply #7 on: June 22, 2019, 11:55:06 AM »
Hi Glenn,

It works OK here if you run acarsdeco2 as a background job.

What I did ...

1) Open PuTTY and log in, and cd to acarsdeco2.
2) Create a file 'startacarsdeco2.sh' with the following contents

Code: [Select]
#!/bin/bash

/home/pi/acarsdeco2/acarsdeco2 --outConnectUdp pp:<ipaddress>:<portno> --gain 38.6 --freq-correction -1 --freq 131525000 --freq 131725000 --freq 131825000 --no-console --logfile /var/log/acarsdeco2/acarsdeco2 >> /home/pi/acarsdeco2/errorfile.log 2>&1 &

exit

You will obvously need to change some of the paramters to configure for your Pi environment.

3) Save the file and make it executable - 'chmod u+x startacarsdeco2.sh'
4) Execute the startup script with

./startacarsdeco2.sh &


5) I also add the startacarsdeco2.sh script to my crontab so that it executes automatically on Pi reboot.
6) You can exit the PuTTY window and acarsdeco2 will run in the background and send data to PP.

Hope it works for you.
Regards
Stuart

Offline sergsero

  • Member
  • ****
  • Posts: 345
Re: ACARSDECO2 help with PI and Plane Plotter
« Reply #8 on: June 23, 2019, 10:48:38 AM »
Hello,

Another way to run a program after system booting is turn acarsdeco2 into a Linux service using systemd. It provides a service manager that runs first (as PID 1) and starts the rest of the system. As a rule, systemd is used by modern versions of Linux.

The main command used to control systemd is 'systemctl'. You can check your system by running command: 'pi@rpi-deb9:~ $ systemctl status'.

For create a Linux service you need to:
1. to create a file called /etc/systemd/system/acarsdeco2.service

Code: [Select]
pi@rpi-deb9:~ $ sudo touch /etc/systemd/system/acarsdeco2.service
pi@rpi-deb9:~ $ sudo chmod 664 /etc/systemd/system/acarsdeco2.service
for example:
Code: [Select]
pi@rpi-deb9:~ $ cat /etc/systemd/system/acarsdeco2.service
[Unit]
Description=acarsdeco2 20190622
After=network.target

[Service]
User=pi
Group=pi
Type=simple
ExecStart=/opt/ad2/acarsdeco2 --gain 38.6  --freq-correction -1 --http-port 8088 --silhouettes /home/pi/data/silhouettes --pictures /home/pi/data/pictures --db /home/pi/data/basestation.sqb --frdb /home/pi/data/flightroute.sqb --banners /home/pi/data/logos --vrs-url http://192.168.64.254:8089 --freq 131550000 --freq 131725000 --freq 131825000 --no-console --outConnectUdp pp:192.168.64.254:9742
WorkingDirectory=/opt/ad2
StandardOutput=null
StandardError=inherit
TimeoutSec=30
Restart=on-failure
RestartSec=30
StartLimitInterval=350
StartLimitBurst=10

[Install]
WantedBy=multi-user.target

The purpose of some configuration parameter:
Set your actual username / group after User=xxx / Group=yyy and set the proper full path to your acarsdeco2 and its starting options in ExecStart=.
The After= directive means that your service must be started after the network is ready.
The Type= configures the process start-up type for this service unit and the 'simple' is expected that the process configured with ExecStart= is the main process of the service.

By default, systemd does not restart a service if acarsdeco2 exits for whatever reason. The Restart=on-failure configures whether the service shall be restarted when the process exits with a non-zero exit code, is terminated by a signal (including on core dump), when an operation (such as service reload) times out, and when the configured watchdog timeout is triggered. Setting this to on-failure is the recommended choice for long-running services, in order to increase reliability by attempting automatic recovery from errors.

By default, systemd attempts a restart after 100ms. You can specify the number of seconds to wait before attempting a restart, using, for example, 30 sec: TimeoutSec=30. It’s a good idea to set RestartSec to at least 5-10 second though, to avoid putting too much stress on your server when things start going wrong.

2. After creating the new service file acarsdeco2.service, you must restart systemd:
Code: [Select]
pi@rpi-deb9:~ $ sudo systemctl daemon-reload
3. Now you can start, stop, restart and check the status of the service acarsdeco2:
Code: [Select]
pi@rpi-deb9:~ $ sudo systemctl start acarsdeco2.service
pi@rpi-deb9:~ $ sudo systemctl stop acarsdeco2.service
pi@rpi-deb9:~ $ sudo systemctl restart acarsdeco2.service
pi@rpi-deb9:~ $ systemctl status acarsdeco2.service

4. Enable the acarsdeco2.service to be started on bootup:
Code: [Select]
pi@rpi-deb9:~ $ sudo systemctl enable acarsdeco2.service
5. To check the service logs, run:
Code: [Select]
pi@rpi-deb9:~ $ journalctl -u acarsdeco2.service
You can also run systemctl commands from a remote computer, for example:
Code: [Select]
sergsero@z270:~$ systemctl --host pi@192.168.64.174 status acarsdeco2.service
pi@192.168.64.174's password:
● acarsdeco2.service - acarsdeco2 20190622
   Loaded: loaded (/etc/systemd/system/acarsdeco2.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2019-06-23 12:57:14 +07; 4h 15min ago
 Main PID: 10555
   CGroup: /system.slice/acarsdeco2.service
           β””─10555 /opt/ad2/acarsdeco2 --gain 38.6 --freq-correction -1 --http-port 8088 --silhouettes /home/pi/data/silhouettes --pictures /home/

A detailed description of all the properties of systemd are displayed in console using the man command: pi@rpi-deb9:~ $ man systemd.service
Or in the Debian man-pages WEB links: https://manpages.debian.org/stretch/systemd/systemd.unit.5.en.html and https://manpages.debian.org/stretch/systemd/systemd.unit.5.en.html

Best regards,
sergsero
« Last Edit: June 23, 2019, 11:21:47 AM by sergsero »

Offline glenn68

  • New Member
  • *
  • Posts: 18
Re: ACARSDECO2 help with PI and Plane Plotter
« Reply #9 on: June 24, 2019, 03:25:52 AM »
Hi Glenn,

It works OK here if you run acarsdeco2 as a background job.

What I did ...

1) Open PuTTY and log in, and cd to acarsdeco2.
2) Create a file 'startacarsdeco2.sh' with the following contents

Code: [Select]
#!/bin/bash

/home/pi/acarsdeco2/acarsdeco2 --outConnectUdp pp:<ipaddress>:<portno> --gain 38.6 --freq-correction -1 --freq 131525000 --freq 131725000 --freq 131825000 --no-console --logfile /var/log/acarsdeco2/acarsdeco2 >> /home/pi/acarsdeco2/errorfile.log 2>&1 &

exit

You will obvously need to change some of the paramters to configure for your Pi environment.

3) Save the file and make it executable - 'chmod u+x startacarsdeco2.sh'
4) Execute the startup script with

./startacarsdeco2.sh &


5) I also add the startacarsdeco2.sh script to my crontab so that it executes automatically on Pi reboot.
6) You can exit the PuTTY window and acarsdeco2 will run in the background and send data to PP.

Hope it works for you.
Regards
Stuart

Do you have data running to Plane Plotter? I have ACARSDECO2 output for Plane Plotter to my windows computer but I dont see the data. If I run it from a console then I get data.
Glenn Blum
Central Texas, USA

Offline acarslogger

  • Member
  • ***
  • Posts: 84
Re: ACARSDECO2 help with PI and Plane Plotter
« Reply #10 on: June 24, 2019, 08:59:15 AM »
Hi Glenn,

I don't run PP, but when I run acarsdeco2 as a background job as decribed previously, and with PuTTY disconnected from my Pi, I am receiving PP data on my W10 PC.
I have a small program that monitors a port and for each received UDP packet, it outputs the current date and time, the UDP packet in Hex and the UDP packet in ASCII.
This is what it looks like.
 
Code: [Select]
24/06/2019 07:31:01
41 43 47 20 2E 47 2D 4F 42 59 48 20 21 20 35 55 20 38 20 4D 30 36 41 20 42 59 30 33 48 45 20 4C 45 49 42 20 4C 45 50 41 20 4C 45 42 4C 20 4C 46 42 4F 53 41 2F 32 34 30 37 33 30 32 34
ACG .G-OBYH ! 5U 8 M06A BY03HE LEIB LEPA LEBL LFBOSA/24073024

24/06/2019 07:31:03
41 43 47 20 2E 43 2D 46 4F 47 4A 20 21 20 31 32 20 31 20 4D 35 31 41 20 57 53 30 30 30 33 20 4E 20 35 30 2E 36 37 38 2C 57 20 20 32 2E 36 37 30 2C 32 38 35 37 32 2C 30 37 33 30 35 31 2C 20 32 30 38 2C 2E 43 2D 46 4F 47 4A 2C
ACG .C-FOGJ ! 12 1 M51A WS0003 N 50.678,W  2.670,28572,073051, 208,.C-FOGJ,

24/06/2019 07:31:03
41 43 32 20 2E 48 42 2D 4A 42 48 20 46 20 5F 64 20 31 20 53 35 36 41 20 4C 58 30 34 34 4B 20
AC2 .HB-JBH F _d 1 S56A LX044K

24/06/2019 07:31:09
41 43 32 20 2E 48 42 2D 4A 42 48 20 47 20 5F 64 20 32 20 53 35 37 41 20 4C 58 30 34 34 4B 20
AC2 .HB-JBH G _d 2 S57A LX044K

24/06/2019 07:31:12
41 43 58 20 2E 47 2D 45 55 59 4B 20 53 20 5F 64 20 39 20 53 34 34 41 20 42 41 30 38 34 57 20
ACX .G-EUYK S _d 9 S44A BA084W

24/06/2019 07:31:24
41 43 47 20 2E 47 2D 53 54 42 48 20 21 20 42 36 20 31 20 46 30 39 41 20 42 41 30 31 36 35 20 2F 51 55 4B 41 58 42 41 2E 41 44 53 2E 47 2D 53 54 42 48 30 37 32 33 45 30 37 30 30 30 43 30 43 36 34 33 39 44 35 46 39 44 38 42 35 36
ACG .G-STBH ! B6 1 F09A BA0165 /QUKAXBA.ADS.G-STBH0723E07000C0C6439D5F9D8B56

I'm not sure what else to suggest.
Regards
Stuart

Offline glenn68

  • New Member
  • *
  • Posts: 18
Re: ACARSDECO2 help with PI and Plane Plotter
« Reply #11 on: July 02, 2019, 06:31:33 PM »
Maybe I need to run ACARSDEC instead.
How would I check on my windows 10 system that there is data coming in from my Pi?
Glenn Blum
Central Texas, USA

Offline Hobbyd

  • Member
  • **
  • Posts: 36
Re: ACARSDECO2 help with PI and Plane Plotter
« Reply #12 on: July 08, 2019, 07:07:13 PM »
Hi Glenn,
Just made aware of this thread by Stuart (Acarslogger) so let's give it a go.

Earlier you mentioned that you do see acarsdeco2 (which is running on your RPi) data in PlanePlotter when you run it from console.
Now you ask "How would I check on my windows 10 system that there is data coming in from my Pi?".

Assuming your PC running PP is using IP address 192.168.0.100 then the option
--outConnectUdp pp:192.168.0.100:9742
should do the job.

Make sure that in PlanePlotter, Input/Output settings you have ticked the "UDP/IP data from net" box.

PS. I do run dumpvdl2 and acarsdec on a headless RPi and feed data to Planeplotter sucessfuly.
The advantage of acarsdec above acarsdeco2 is that acarsdec does decode CPDLC messages and acardeco2 (as far as I know) does not.

PS.
Maybe it is better to discuss this using e-mail (we have talked before) and post the solution so that everyone can benefit.

PS.
If you, for whatever reason, prefer acarsdeco2 above acarsdec I can run it on my RPi and see what happens.

Cheers, Dick 
« Last Edit: July 08, 2019, 07:58:36 PM by Hobbyd »

Offline glenn68

  • New Member
  • *
  • Posts: 18
Re: ACARSDECO2 help with PI and Plane Plotter
« Reply #13 on: July 11, 2019, 11:57:01 PM »
Dick,
I appreciate the reply. I would like the ability to have the programs run from the boot and provide data to planeplotter. I run DUMPVDL2 from the console and it shows plots on Planeplotter.
Glenn Blum
Central Texas, USA

Offline Hobbyd

  • Member
  • **
  • Posts: 36
Re: ACARSDECO2 help with PI and Plane Plotter
« Reply #14 on: July 13, 2019, 06:24:49 PM »
Glenn, 
I have send you an e-mail as I feel these things work best in a 1-to-1 session. It also is much easier to add screenshots (at least for me).

I'm sure we can get you up and running in no time.

Cheers,
Dick