ACARS and VDL2

Another thing you could do here is write e.g. a dhcpcd hook script and restart whatever needs restarting when the network state changes.

1 Like

Just to not give a false impression, this is a fluke of a bug we couldn’t track down. (debugging someones setup is time consuming and the bug was unique and the work-around easy)

airspy_adsb handles starting before the network just fine :slight_smile:

I can’t confirm nor deny this information :rofl:

For anyone running ACARSDECO2 and DUMPVDL2, it’s quite easy to send the DUMPVDL2 data in JSON format to a UDP port then pass through node-red then display the data in ACARSDECO2. The following function in node red will extract the data and format it for ACARSDECO2

if (typeof msg.payload.vdl2.avlc.acars != ‘undefined’)
{
now = new Date().toISOString();
date = now.substring(0,10)+“,”;
time = now.substring(11,19)+“,”;
freq = msg.payload.vdl2.freq / 1000000+“,”;
flight = msg.payload.vdl2.avlc.acars.flight+“,”;
reg = msg.payload.vdl2.avlc.acars.reg.replace(/\x2E/g, ‘’)+“,”;
acars_txt = msg.payload.vdl2.avlc.acars.msg_text.replace(/[^\x20-\x7E]/g, ‘’);
mode = msg.payload.vdl2.avlc.acars.mode+“,”;
ack = msg.payload.vdl2.avlc.acars.ack+“,”;
label = msg.payload.vdl2.avlc.acars.label+“,”;
blk_id = msg.payload.vdl2.avlc.acars.blk_id+“,”;
msg_num = msg.payload.vdl2.avlc.acars.msg_num;
msg_seq = msg.payload.vdl2.avlc.acars.msg_num_seq+“,”;
msg.payload = date+time+freq+mode+reg+ack+label+blk_id+msg_num+msg_seq+flight+acars_txt+“\r\n”;
return msg;
}

I’m not sure if this helps at all or if you have already resolved this another way, but I have my ACARS (or actually just VDLm2) decoder and server services up and running after each boot for couple of months now with this kind of setup. I think I was struggling with similar kind of issue before (and actually hung the whole pi once when trying to make my own target) and if I recall correctly, after some research and trials, I managed to correct this by using the multi-user.target as WantedBy. I have no idea if this “a correct way” or not, but seems to work to me.

acarsdec.service:

[Unit]
Description=ACARS Decoder service
After=acarsserv.service

[Service]
ExecStart=/usr/bin/bash /radio/acars/start_acarsdec.sh
WorkingDirectory=/radio/acars
User=pi
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target

acarsserv.service:

[Unit]
Description=ACARS Server service using ACARS Decoder
After=network.target

[Service]
ExecStart=/usr/bin/bash /radio/acars/start_acarsserv.sh
WorkingDirectory=/radio/acars
StandardOutput=inherit
StandardError=inherit
Restart=on-failure
RestartSec=10
User=pi

[Install]
WantedBy=multi-user.target

yeah thanks. I gave up and put them in multi-user but it didn’t help so I ended up using @wiedehopf 's suggestion along side it

Oh ok, great to hear that it’s resolved! :slight_smile:

Anyone know why I almost never get ACARS/VDL2 messages from Ryanair planes?

There seems to be dozens of them in the skies around me at any given time of the day but as far as I can recall, I only ever saw a couple of messages from one particular aircraft in their fleet years ago.

Don’t subscribe/pay to. Seems to have been that way for ages

AHAH.

Thanks for that.

They’re so tight!