How to run Flight Sim Controls and send serial data to an application?

Status
Not open for further replies.

AeroSimmer

New member
I am in the process of building a flight simulator with X-Plane. As part of the architecture, I have an external Console program (written in Delphi, if anyone is interested) which I want to use to communicate with X-Plane (via datarefs and commands) through a Teensy 3.2 software module I’m writing. The diagram shows the general configuration. X-Plane, the Console program, and the Arduino Serial Monitor (for testing and debugging) all run on a Windows 10 PC. X-Plane is version 11.36.

Both the Console program and the Teensy module are working. The Teensy module and X-Plane can communicate properly via a serial link (link A) when running without the Console, and the Console and Teensy can communicate properly via a serial link (link B) when running without X-Plane. The problem is I can’t simultaneously establish both communications links.

The reason, as far as I can see, is that X-Plane wants the USB link between Teensy and the PC to be an “hid#vid_16c0&pid_0488 FlightSim (Teensy 3.2)” port, but the Console wants just a plain serial port like COM3 or COM 4. I think I sort of understand why, since this would be trying to open two ports over the same USB link. But though I can’t run X-Plane and the Console program simultaneously, I can run X-Plane and the Arduino Serial Monitor (link C): X-Plane datarefs update properly, and test data appears properly in the Serial Monitor. So serial data apparently is getting over the USB at the same time as X-Plane data. My Console program just can’t get to it.

So the questions are, why can I pass serial data to the Serial Monitor but not to anything besides that, i.e., the Console? And is it possible to get serial data to the Console with X-Plane running and, if so, how?

Additional details: I’m transmitting serial test data from the Teensy module using a simple Serial.println(“some_text”) in the code. I’m using simple code adapted from the BlinkTransponder example to test when the X-Plane interface is running. I can attach code if it will help, but I suspect the problem is something more fundamental than that.

Sorry for the long-winded question, but I wanted to describe the situation fully. Thanks in advance.


Architecture - small.jpg
 
Status
Not open for further replies.
Back
Top