Using simconnect over TCP or UDP?

Hi,

Is it possible to interact with simconnect over TCP or UDP. Programming in IOS and want to communicate with simconnect? So, IOS <-> simconnect <-> MSFS2020.

Thanks!

2 Likes

I don’t believe there is a direct way, but you can create a windows application that communicates with SimConnect and then passes that data over UDP/TCP sockets. It would look like this:

IOS < SOCKET CONNECTION > Windows Application <-> SimConnect <-> MSFS2020

I have had great success with this approach for some distributed work I have been doing.

1 Like

Thanks for the info. Looks the only option :+1:

What type of server would you have running for this scenario? Would a REST server work? Or would you recommend some other network technology?

Thanks,
Chris

Do you know where i can find examples for the windows app? Thanks

The SDK SimConnect API has some great examples:

https://docs.flightsimulator.com/html/index.htm#t=Programming_Tools%2FSimConnect%2FSimConnect_API_Reference.htm&rhsearch=C%2B%2B%20SimConnect&rhhlterm=simconnect

It won’t talk about sockets, you will need to go online and look up Scoket programming for Windows using C++.

You don‘t necessarily need to know about sockets. The SimConnect implementation itself is already network-capable (Windows to Windows only, for obvious reasons: the SimConnect client library is only available for Windows).

Unfortunately that network functionality is declared „legacy“ and may be completely removed in future iterations of the API, see e.g. here:

https://docs.flightsimulator.com/html/index.htm#t=Programming_Tools%2FSimConnect%2FSimConnect_CFG_Definition.htm

And if you want to write apps on other platforms than Windows then you need to have your own server running on Windows (communicating with the FS2020 server, either locally or via network, as described above), with your own network protocol which supports the commands your app needs (like e.g. LittleNavmap does).

UPDATE: I just realised that iOS was already mentioned, plus the corresponding patterns („middleware server“, e.g. providing some custom REST API).

Thanks! For my xplane app i already used UDP in C++ in the plugin to communicate which work fine 9/10 times (-:

1 Like

You can always use flight events to get positional data from the sim, it uses the foreflight gps data format