News:

Precision Simulator update 10.189 (5 August 2026) is now available.
Navburo update 13 (23 November 2022) is now available.
NG FMC and More is released.

Main Menu

PSX native CPDLC for Hoppie's ACARS

Started by Jeroen Hoppenbrouwers, Thu, 14 Nov 2024 18:13

Gary Oliver

Do I need to get BACARS to send an INIT message?

Jeroen Hoppenbrouwers

Init what? The first request to allocate your callsign?

If anything is done at all that causes the call sign to have anything in the queue that is enough.

If you want to automate, send HELLO to WORLD or something. 😀

But I'll fix the featurebug soon anyway.

Gary Oliver

Yeah - So when BACARS comes online it sends a quick HELLO the BACARS server.  I'll add that to V8

macroflight

Status after a few more flights with CPDLC: only two real problems seen (both reported before)

- handover to the next controller is not automatic as in other CPDLC clients, manual logoff/logon needed

- messages are sometimes not printed or visible in PSX's ATC message log (but they are visible in BACARS messages log and on hoppie.nl)

The first is just a little annoying, but the second will cause pilot and controller frustration. Even if I monitor the BACARS message log, I cannot reply to the messages via CPDLC. Voice can be used, but is confusing for the controller.

Based on a very small data set, I estimate that maybe 20% of CPDLC messages sent to me are missed by PSX CPDLC.

J D ADAM

Gentlemen I have installed the new BACARS on twocomputers -- the first on the main one (Windows 7} alo on the client (Windows 10).  Neither will connect to either PSX {red warning "Not Connected"}.
Seems to be connected to Hoppie!  What am I forgetting to do!?

Cheers
Derek

PSX747atlas

Check the port 10747? is correct and Boost is started in the network instructor station?
Atlas (John)
psx747atlas.org
youtube/@psx747atlas

voipmeister

Quote from: J D ADAM on Sun, 19 Oct 2025 21:56Seems to be connected to Hoppie!  What am I forgetting to do!?
Derek, you only need 1 active BACARS instance in your setup. If you have that connected to the PSX network, your other PSX instances will see and use it. The port suggestion is the first thing I would look at too, I think BACARS wants to use 10746 by default. You probably want to change it to 10747. Also remember that you need to start one PSX instance as the main server, verify the IP address it uses and point BACARS to the IP address and port combo.
Seb

Jeroen Hoppenbrouwers

Quote from: macroflight on Sun, 19 Oct 2025 19:05Based on a very small data set, I estimate that maybe 20% of CPDLC messages sent to me are missed by PSX CPDLC.
It would be very helpful to have a list of the exact spelling and characters of the missed messages. There must be something that breaks the PSX displayer (either in my code or in PSX itself). There is no logic behind what is sent through and what not.

The auto-handoff will be implemented soon, I returned home yesterday.

macroflight

Quote from: Jeroen Hoppenbrouwers on Mon, 20 Oct 2025 06:53It would be very helpful to have a list of the exact spelling and characters of the missed messages
In the exchange of messages below, message 20498961 was not shown in the PSX CPDLC interface. Also see https://aerowinx.com/board/index.php/topic,7591.msg84175.html#msg84175 when the same type of message was not shown.

20499016    VATSIM    EPWW    BAW32N    cpdlc    19-18:56Z    19-18:56Z          /data2/35//NE/CURRENT ATC UNIT@_@EPWW@_@WARSZAWA RADAR
20499011    VATSIM    EPWW    BAW32N    cpdlc    19-18:56Z    19-18:56Z          /data2/34/1/NE/LOGON ACCEPTED
20498998    VATSIM    BAW32N    EPWW    cpdlc    19-18:56Z    19-18:56Z          /data2/1//Y/REQUEST LOGON
20498992    VATSIM    BAW32N    ESMM    cpdlc    19-18:56Z    19-18:56Z          /data2/1//Y/LOG OFF
20498962    VATSIM    ESMM    BAW32N    cpdlc    19-18:55Z    19-18:55Z          /data2/34//NE/HANDOVER @EPWW
20498961    VATSIM    ESMM    BAW32N    cpdlc    19-18:55Z    19-18:55Z          /data2/33//WU/CONTACT @EPWW 125.450@_@WARSZAWA RADAR CTR


Gary Oliver

Are we sure its not BACARS picking up the messages before HoppieCPDLC manages to peek the messages?

Jeroen Hoppenbrouwers

Underscores will break stuff.  MCDU display of an underscore is not possible.
I can sanitise the message stream.

Jeroen Hoppenbrouwers

I dumped exactly this into ACARS:

CONTACT @EPWW 125.450@_@WARSZAWA RADAR CTRand it came through as intended, without the _ characters (replaced by spaces).

My PSX client uses PEEK, so the only way it has to figure out that it has not seen a message before, is to look at the high water mark it keeps of the Message ID. Whether or not that message has been relayed to another client before, is irrelevant.

However there IS an issue if BACARS has not received any message before my PSX client establishes the high water mark. If there is nothing in the uplink queue when my client first peeks, it cannot set the high water mark, which automagically sabotages the first message coming in. I think this is what happened above -- the missing message was also the oldest.

Fixing this.

Jeroen Hoppenbrouwers

Fixed it. Not uploaded yet. I need more things in before I release it.

I needed to cope with various situations depending on how many messages to our callsign were already in the queue, read or not yet read. If zero, first received would be the PEEK watermark. If not zero, how to figure out whether these were messages from a previous CPDLC session, or new messages? The way I eventually implemented hacks it a bit, by sending a watermark CPDLC message to itself, with a unique marker in it, and then looking which message ID it receives from ACARS. This guarantees that all previous CPDLC messages will be skipped forever.

Stopping the PSX ACARS program drops the CPDLC session in PSX, so the only way to pick it up again is to re-LOGON to the same ATC station. This is the cleanest way I can think of.

By the way a hung logon request (stuck in SENT) can be broken open by DELETE-ing the LOGON TO call sign in PSX.

Kurt

Quote from: Jeroen Hoppenbrouwers on Mon, 20 Oct 2025 19:39Fixed it. Not uploaded yet. I need more things in before I release it.

I needed to cope with various situations depending on how many messages to our callsign were already in the queue, read or not yet read. If zero, first received would be the PEEK watermark. If not zero, how to figure out whether these were messages from a previous CPDLC session, or new messages? The way I eventually implemented hacks it a bit, by sending a watermark CPDLC message to itself, with a unique marker in it, and then looking which message ID it receives from ACARS. This guarantees that all previous CPDLC messages will be skipped forever.

Our forum needs a like or love button :D

THANKS hoppie
Best regards
Kurt
PSX Shared Cockpit Crew

macroflight

Quote from: Jeroen Hoppenbrouwers on Mon, 20 Oct 2025 15:39However there IS an issue if BACARS has not received any message before my PSX client establishes the high water mark. If there is nothing in the uplink queue when my client first peeks, it cannot set the high water mark, which automagically sabotages the first message coming in. I think this is what happened above -- the missing message was also the oldest.

The lost message was not the first one sent to me by that controller, I'm certain I had gotten e.g a direct to a waypoint via CPDLC before the handover.

Jeroen Hoppenbrouwers

#115
Maybe the arrival of two CPDLC messages in the same PEEK causes PSX to miss one. Typically PSX does not like more than one update within a second or so. I will see whether I can schedule deliveries.

Handovers, as said, are not yet handled automatically.

The new queue peek system I have now in place uses a hard watermark setup message to make sure that a new CPDLC session (that starts with a logon) never gets old messages. It will be a matter of persistance to weed out silly details here. The stealth mode is quite finicky.

--- update ---

I'm going to rewrite this stealth mode scanner, as it simply is not good enough yet.

--- update ---

That works great now.
I also implemented auto-handover, where the system quietly changes ATC CTR.
While experimenting I realized that we need some defined way of handling uplink CPDLC messages by a station that is not your active ATC center. In the real world this would lead to chaos so those messages are rejected. But in the online virtual airspaces I think it will happen that some center contacts you in the blind just as they could voice call you. So I think it would be best to have the system auto-handover to the new ATC center. You can always manually log back on to the original one, and if the original one contacts you it will be handed back.

Ideas?

--- update ---

Beta 4 is out!
https://www.hoppie.nl/psx/python/psx-acars.html

Much improved stealth mode and added the auto-handover option. Various other things were improved as well after a lot of testing. But it still is a beta. The more people fly it, the better it will get. Keep those comments coming.

Known open issues:
 - PSX only knows a "reject" response, while it should be "unable" or "negative" depending on the uplink clearance. I can work around this because I know the uplink clearance.
 - Most free text options are broken in some way. This should be of little impact as CPDLC heavily discourages free text.

Jeroen Hoppenbrouwers

Any feedback yet? I don't fly online myself so I can check stuff only with simulated ATC and there's a limit to what I can dream up.

Kurt

Quote from: Jeroen Hoppenbrouwers on Thu, 23 Oct 2025 15:08Any feedback yet? I don't fly online myself so I can check stuff only with simulated ATC and there's a limit to what I can dream up.

Hey Hoppie - will try this evening and report back :D

Cheers
Best regards
Kurt
PSX Shared Cockpit Crew

macroflight

Quote from: Jeroen Hoppenbrouwers on Thu, 23 Oct 2025 15:08Any feedback yet? I don't fly online myself so I can check stuff only with simulated ATC and there's a limit to what I can dream up.

Testing now. Going M.90 towards the FIR border so I can get the handoff. :)

Jeroen Hoppenbrouwers

Do you keep the "log window" (the console of the running PSX-ACARS program) open? That log will contain loads of relevant details.