ACARS and VDL2

And it dose not work. I went through all the commands and no error had shown since above and when I load the install in my web browser the page does not display.

BLIMEY GUYS, I GO AWAY FOR A DAY AND ALL HELL BREAKS LOOSE ON HERE!

I have amended the FlightAirMap installation instructions a bit re changes to downloading and installing PHP and MYSQL.

I’ve also added clearer instructions about replacing the placeholders with your chosen settings.

3 Likes

To run the FlightAirMap ACARS service, create a service file in /etc/systemd/system then enable and start the service.

I created one called flightairmap.acars.service containing the following:

[Unit]
Description=FlightAirMap.ACARS
Requires=mysql.service
After=mysql.service

[Service]
ExecStart=/var/www/html/flightairmap/scripts/daemon-acars.php
Restart=always
RestartSec=10
StandardOutput=null
StandardError=null

[Install]
WantedBy=multi-user.target

ACARS and VDL2 messages can be seen in the aircraft details box on the map and using Explore, Latest ACARS messages and Archive ACARS Messages.

3 Likes

For reference, here are the files refered to in my FlghtAirMap installation instructions:
https://www.dropbox.com/s/y733mhsa9kcgdqv/modified_flightairmap_files.zip?dl=1

3 Likes

How can I remove the previous installation and start very with your new instructions?

Use Etcher or Win32DiskImager :wink: :rofl:

1 Like

Lucky I have all my configure settings on notepad

1 Like

I’ve been doing a lot of playing with FlightAirMap and have fixed a few things that didn’t work as expected.

I’ve also changed a few things to better suit my needs. Hopefully I’ll be in a position to post details in the thread about FlightAirMap in a few days.

I wonder if someone can assist me please?

I have flightairmap ACARS running as a service on one Pi and it is listening for data.
I have ACARSDeco2 and DumpVDL2 running as services on another Pi (with 2 dongles) sending data to the Pi with FlightAirMap.

Every time I boot or reboot the Pi, the VDL2 and ACARS services start, log files are created and data appears in them but nothing is sent to the other Pi until I manually restart the services.

Both Pis are running Buster.

The service files are located in /etc/systemd/system and contain the following:

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

[Service]
User=pi
ExecStart=/usr/local/bin/dumpvdl2 --output-file /home/pi/Documents/vdl2 --daily --rtlsdr 0 --gain 40 --correction 64 --output-acars-pp 192.168.1.232:9742 --centerfreq 136725000 136775000 136875000 136975000
Type=simple
Restart=always
RestartSec=30

[Install]
WantedBy=default.target

There are link to these in /etc/system/default.target.wants
What am I missing?

Obviously, there were errors in my service files and that problem has now been resolved.

FlightAirMap has been working much better (from my perspective) since my modifications, with a lot more ACARS and VDL2 messages being shown.

However, I’m wondering if I’m missing out on ACARS messages due to the fact that some of the frequencies are out of the range that can be scanned using one RTL-SDR.

Short of using three RTL-SDRs (one for VDL2, one for frequencies in the 131mhz range and one for frequencies in the 136mhz range), I can’t see how to get round it.

As a test, I shutdown DUMPVDL2 and set up a second instance of ACARSDECO2 using the RTL-SDR to listen to the frequencies in the 136mhz range. I left it for an hour or so but didn’t get a single message so I’m not convinced that it is working.

Is there anyone on here that receives ACARS in the UK who has found a way round this that I haven’t thought of?

1 Like

The airspy works great for acars with its larger bandwidth, which might be an option if you have the cash.
I use 2 rtf-sdr v3s for acars, and one for vdl2.

So I assume that you get ACARS signals on the 136mhz frequencies then?

All over really 129 to 136, the majority seems to be 130.025MHz for my area.
Some of the European planes seem to send on their designated freq even in American airspace.
I played with all the different channels in the beginning and settled on 129-131.850, and all of the 136 band. Aircraft Communications Addressing and Reporting System (ACARS) - Signal Identification Wiki

Thanks.

Yeah, I get a lot of messages on different frequencies here. It seems like intercontinental flights don’t always switch over even though it is my understanding that it is supposed to happen automatically.

As per https://discussions.flightaware.com/t/acars-and-vdl2/55661/49?u=technodevotee I’m still having to restart the acars and vdl2 services every time I boot or reboot this pi.

The problem is that the services are starting before the network is up so nothing arrives at the pi running flightairmap. I’ve done a lot of reading about configuring the services to start after network-online but whatever I try (including enabling systemd-networkd-wait-online), they either never start or they start before the network is up.

Anyone know how to get round this please?

Disable the service.
On boot, start the service via cron instead.

echo '@reboot root /bin/bash -c "sleep 30; /bin/systemctl restart dumpvdl2"' | sudo tee /etc/cron.d/dumpvdl2

This just create the file /etc/cron.d/dumpvdl2 and puts this in it:

@reboot root /bin/bash -c "sleep 30; /bin/systemctl restart dumpvdl2"

Just make one file per service you want to handle like that and then disable them.

It’s just a workaround but unless you reboot all the time it’s quite acceptable.
Tune the 30 seconds as you see fit, 10 seconds is probably perfectly fine.

2 Likes

Well, that will certainly save me having to do it manually. Thanks.

But I don’t understand why starting services after the network is fully up is such a problem and judging by the amount of stuff I’ve read on the web over the past few months, it seems I’m not alone.

There were a few ‘resolutions’ that involved pinging hosts and so forth but that doesn’t seem like the way to go to me. Surely there’s a better way?

Proper applications can handle changing networks on their own.
So there isn’t really a need from the professional side nowadays to have applications start “after network is up”.

But yeah … i don’t know why there aren’t any good solutions.

As wiedehopf says, this is really a bug in the application, not in the startup sequencing. Networks can come and go unpredictably (DHCP lease expires, wifi disconnects/reconnects etc) and so applications need to tolerate network connectivity changing over time.

systemd has a network-ready target but it’s largely unused for exactly this reason - what do you consider “ready” and why do you think it’s going to stay that way forever from the point you declare it “ready”?

I was in the same situation for airspy_adsb. I have applied too that wiedehopf proposed solution. 30 sec for me is just fine…
And yes, when I have power glitches that kills temporarily the network switch power, but not the laptop (battery) - that is still a problem.
I have placed some UPS sources around my house in strategic points, but I don’t have one for the network switch that is in my garage (and feeds the adsb devices there).