[RESOLVED] May be a workaround for those having problems with SP1 and RTM Simconnect in P3DV4.

Discuss on the SimConnect SDK can be used by programmers to write add-on components for Prepar3D
Locked
ctroncy
Posts: 47
Joined: Mon Mar 14, 2016 7:11 pm

[RESOLVED] May be a workaround for those having problems with SP1 and RTM Simconnect in P3DV4.

Post by ctroncy »

Bonjour,
I had problems with SP1 and RTM Open_Simconnect function, but everything was working with SP2.
see : http://www.prepar3d.com/forum/viewtopic ... 0&t=125245

After a lot of tests, and investigations (@Warpd put me on the track) I noticed that there was a difference between SP1 and SP2. A new parameter exists in the Open function for SP2, which forces the local connection.

So I decided to try my test SP1 program in a network environment..... Bingo it was working.

So to resume if you want a before SP2 Simconnect application to work with P3DV4, just let believe it that you are in a network connection, with a Simconnect.XML in the P3D V4 AppData folder and a Simconnect.cfg in the application folder.

I am not sure if it is the best solution but LM is looking into the issue
.
by Rob McCarthy » Tue Jun 20, 2017 3:03 pm

We will look into the issue and report back.

For me it works now.
Cheers
Claude
dsdawson
Posts: 36
Joined: Sat Jan 14, 2012 5:46 pm

Re: May be a workaround for those having problems with SP1 and RTM Simconnect in P3DV4.

Post by dsdawson »

I am sure this is the only solution, short of compiling against a more recent version of simconnect.lib
I recall the Avsim conference in Washington, DC, in 2006 or 2007. The folks from Microsoft were in attendence and Mike Z was quite adamant that we should not be programming gauges and modules running in process to access FS through SimConnect.
I expect that the provision to force the local connection, added in SP2, came about as a result of pressure from developers, or at least from a realization that we were going to use SimConnect from within gauges or modules regardless of how Microsoft felt about it.

Doug
boez
Posts: 68
Joined: Thu Sep 29, 2011 9:15 am

Re: May be a workaround for those having problems with SP1 and RTM Simconnect in P3DV4.

Post by boez »

@Claude - thanks for sharing. I can confirm this works well and lets me use Hidmacros again which I believe is compiled using RTM.
ctroncy
Posts: 47
Joined: Mon Mar 14, 2016 7:11 pm

Re: May be a workaround for those having problems with SP1 and RTM Simconnect in P3DV4.

Post by ctroncy »

@boez
In fact HIDMacros is compiled with SP1.
Glad to see it works for you too.
Cheers
Claude
greggerm
Posts: 36
Joined: Wed Jan 11, 2012 5:57 pm

Re: May be a workaround for those having problems with SP1 and RTM Simconnect in P3DV4.

Post by greggerm »

ctroncy wrote: Mon Jun 26, 2017 3:27 pm So to resume if you want a before SP2 Simconnect application to work with P3DV4, just let believe it that you are in a network connection, with a Simconnect.XML in the P3D V4 AppData folder and a Simconnect.cfg in the application folder.
Hello!

I use a SimConnect based application which also doesn't want to function with P3Dv4, but I haven't done this degree of troubleshooting. Do you have any guidance that could assist me in tricking the SimConnect app that it is a network connection vs. a local one? (an example entry for simconnect.xml in AppData, or an example simconnect.cfg in application folder)

If Hotfix 1 doesn't repair the issue (SimConnect_RequestClientData), perhaps this method will. (shrug)

Thanks kindly,
-Greg
ctroncy
Posts: 47
Joined: Mon Mar 14, 2016 7:11 pm

Re: May be a workaround for those having problems with SP1 and RTM Simconnect in P3DV4.

Post by ctroncy »

Bonsoir Greg,
I am not sure that you have the same problem than the one I found, as it seems that your open_Simconnect function works. But who knows !
Anyway....
My Simconnect.xml
<?xml version="1.0" encoding="Windows-1252" ?>
<SimBase.Document Type="SimConnect" version="1,0">
<Descr>SimConnect</Descr>
<Filename>SimConnect.xml</Filename>
<Disabled>False</Disabled>
<SimConnect.Comm>
<Disabled>False</Disabled>
<Protocol>IPv4</Protocol>
<Scope>global</Scope>
<Address>10.89.35.108</Address>
<Port>2024</Port>
<MaxClients>64</MaxClients>
</SimConnect.Comm>

<SimConnect.Comm>
<Disabled>False</Disabled>
<Protocol>Auto</Protocol>
<Scope>local</Scope>
</SimConnect.Comm>
</SimBase.Document>
and my Simconnect.cfg
[SimConnect]
Protocol=IPv4
Address=10.89.35.108
Port=2024
MaxReceiveSize=4096
DisableNagle=0
Cheers
Claude
greggerm
Posts: 36
Joined: Wed Jan 11, 2012 5:57 pm

Re: May be a workaround for those having problems with SP1 and RTM Simconnect in P3DV4.

Post by greggerm »

Très bien, Claude!

The application I was trying to get working does have a native ability to connect via network and create it's own SimConnect.cfg file, so after I created my SimConnect.xml file to get the sim listening properly, I was able to get the app connected and functioning properly. Fantastic work around! Well done.

Merci,
-Greg
ctroncy
Posts: 47
Joined: Mon Mar 14, 2016 7:11 pm

Re: May be a workaround for those having problems with SP1 and RTM Simconnect in P3DV4.

Post by ctroncy »

Hi Greg,

Thank you to let me know that it works for you.
I was not totally sure as LM never acknowledge the problem with those old simconnect. I think they do not believe there is an issue or the simconnect guy is on holiday.
Cheers
Claude
js6033
Posts: 11
Joined: Tue Jan 12, 2016 4:18 pm

Re: May be a workaround for those having problems with SP1 and RTM Simconnect in P3DV4.

Post by js6033 »

To Claude 'ctroncy'

Hi Claude,

Have tested according to your description here with Simconnect.xml and Simconnect.cfg but no success.
As I understan I have to change <Address>10.89.35.108</Address> to the address in my own PC.
HIDMacros found Simconnect.dll but no connection to P3DV4.
Are there any more settings to do, to have P3DV4 use simconnect?
How can I check version of installed simconnect and that P3DV4 use it?

Cheers
Jonny
ctroncy
Posts: 47
Joined: Mon Mar 14, 2016 7:11 pm

Re: May be a workaround for those having problems with SP1 and RTM Simconnect in P3DV4.

Post by ctroncy »

Hi Jonny

In fact you just have to change the ip address. Also check that the port is not in use by another application.
Did you put the xml and cfg file in the right folders?
As Hidmacros found the simconnect, it should work.
Cheers
Claude
js6033
Posts: 11
Joined: Tue Jan 12, 2016 4:18 pm

Re: May be a workaround for those having problems with SP1 and RTM Simconnect in P3DV4.

Post by js6033 »

Hi Claude!

Now it works OK. Had to open port 2024 in the firewall!

/Jonny
RickyTerzis
Posts: 1
Joined: Fri Aug 11, 2017 2:47 pm

Re: May be a workaround for those having problems with SP1 and RTM Simconnect in P3DV4.

Post by RickyTerzis »

Hi...i am a new user here. In my local connection i added in SP2, came about as a result of pressure from developers, or at least from a realization that we were going to use SimConnect from within gauges or modules regardless of how Microsoft felt about it.
ctroncy
Posts: 47
Joined: Mon Mar 14, 2016 7:11 pm

Re: May be a workaround for those having problems with SP1 and RTM Simconnect in P3DV4.

Post by ctroncy »

Bonjour,
Corrected in P3D V4.1
Cheers
Claude
Clifton Crane
Lockheed Martin
Posts: 1207
Joined: Tue Sep 25, 2012 2:34 pm

Re: May be a workaround for those having problems with SP1 and RTM Simconnect in P3DV4.

Post by Clifton Crane »

Thanks for the feedback! We believe the issue was related to incorrect port values being written to the registry. I will mark this topic as resolved.
Clifton Crane
Prepar3D® Software Engineer Sr.
Locked