Simconnect cannot connect to remote machine

Discuss on the SimConnect SDK can be used by programmers to write add-on components for Prepar3D
Post Reply
g1235813
Posts: 16
Joined: Fri May 27, 2022 2:50 am

Simconnect cannot connect to remote machine

Post by g1235813 »

Hi,
I' trying to build a very basic setup below but failed, probably missing something very basic, please help:

PC1(192.168.1.111) running P3D, PC2(not have P3D installed) running a client program that sends data to P3D. PC1 and PC2 are connected via network cable.

my client program has been tested on PC1. after moving it to PC2, I did the following:

1 Find simconnect.xml in SDK folders, modified the following section:

<!-- Example Global (remote) IPv4 Server Configuration-->
<SimConnect.Comm>
<Disabled>True</Disabled>
<Protocol>IPv4</Protocol>
<Scope>global</Scope>
<MaxClients>64</MaxClients>
<Address>192.168.1.111</Address>
<Port>7456</Port>
</SimConnect.Comm>

<!-- Example Local IPv4 Server Configuration-->
<SimConnect.Comm>
<Disabled>True</Disabled>
<Protocol>IPv4</Protocol>
<Scope>local</Scope>
<MaxClients>64</MaxClients>
<Address>192.168.1.111</Address>
<Port>7456</Port>
</SimConnect.Comm>
(note: I'm not sure scope should be local or global so I modified both section, also I tried several different port number.)

2 Find simconnect.cfg in SDK folders, modified the following section:

[SimConnect.3]
Protocol=Ipv4
Address=192.168.1.111

[SimConnect.6]
Protocol=IPv4
Address=192.168.1.111
Port=7456
MaxReceiveSize=4096
DisableNagle=0
(note: also modified both section and tried several port number.)

3 Put simconnect.xml in PC1(server)'s user/appdata/local/lockheed martin/prepar3d v5 AND user/appdata/Roaming/lockheed martin/prepar3d v5
(document says %APPDATA%/lockheed martin/... , not sure which one so I put it to both locations.)

4 Put simconnect.cfg in PC2(client)'s Document folder.

5 run P3D on PC1, run client program on PC2, client( the ConfigIndex parameter in simconnect_open() is set to 3 or 6) can't connect to P3D.

What I tried to debug:
1 set ConfigIndex to 0 and run client program on PC1(server), it can connect to P3D.
2 PC2 can ping PC1(192.168.1.111)
3 installed simconnect.msi in C:\Program Files\Lockheed Martin\Prepar3D v5\redist\Interface\FSX-SP2-XPACK\retail\lib for both PC1(have P3D installed) and PC2(don't have P3D)
4 removed what I installed in step3, install simconnect.msi in C:\Program Files\Lockheed Martin\Prepar3D v5\redist\Interface\ESPv1 isntead

...And I still can't establish a connection. What did I miss? Thanks very much for any help!
g1235813
Posts: 16
Joined: Fri May 27, 2022 2:50 am

Re: Simconnect cannot connect to remote machine

Post by g1235813 »

I managed to get it work after changing to another port and leave only one entry in simconnect.xml. Also obiviously <Disabled> should set to false, but changing that to true alone didn't seem to fix the problem.
Post Reply