Sign in to follow this  
fnav77

Simconnect working with Plan-G, but not with AI Traffic, let alone ASN

Recommended Posts

Hello fellow simmers,

 

I think I set up Simconnect correctly as it works perfectly with Plan-G (the VFR software). 

 

I read somewhere that a good way to test Simconnect is to use the AI traffic .exe from the SDK on the 2nd machine (a laptop), so I just did that.

All I get is a black window opening, with a "-" flashing, and closing within about 10-15 seconds. Nothing else. I guess it means Simconnect is not configured properly, but as I said, Simconnect works well with Plan-G, which I am very happy with. Why would it work with one application and not another?

 

I eventually want to get ASN to work with Simconnect, but I think I am still far away from it.

 

Any early suggestions please....? 

Thanks

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi Fnav,

 

It's probably best to start with some of the basics about what SimConnect is and then we can move on to sorting your problem.

 

FSX basically runs around in a loop checking the state of all sorts of stuff like your control positions, engine thrust, velocities and accelerations. It also runs any AI vehicles you have in the mix, worries about what the ground looks like from where you are looking, deals with the weather and a fair bit more besides.

Somehow in all of this it can also find time to tell interested external programs the state of various controls and sensors and respond to any input they may have.

 

The role of SimConnect is to provide this interface. When installed correctly, the SimConnect server hangs around waiting for external programs to introduce themselves. They do this using the SimConnect client program and its associated configuration files. These essentially tell the client program where the server is and which technique to use to talk to it (3 options are available). So, client program talks to SimConnect client an tells it to say to the server, "Hi, my name is X", to which the server (hopefully) replies "No error occurred when you asked me that". The client says stuff like "I'm interested in position, radio frequencies and outside temperature" and again, the server tends to respond "No error occurred" - which basically means "Gotcha!". Depending on the what was asked for or sent, the server may then periodically inform the client of changed data and/or when specific things happen. To make sure that this doesn't cause your FSX session to grind to a halt, it tends to do all this without showing you the user any indication that it is going on - unless you ask it specifically to do so.

 

So let's relate this to your situation.

Firstly we must check that the server has been installed correctly.

Next that the client has been installed and that it has been configured to talk to the server.

Then we need to know that your 1st 3rd party client connects to the server.

Finally we need to identify any add in that is NOT connecting and work out why.

 

Therefore, please can you give:

1) a summary of what you have installed over and above FSX (and the edition of that would be handy).

2) a list of the addins using SimConnect that you're trying to use

3) a summary of what is and is not working

 

Depending on what that tells us, I might then talk you through producing a SimConnect log file and we can investigate further.

 

Cheers,

 

Z

Share this post


Link to post
Share on other sites

Z, thanks for your reply.

I am not currently near my set up, but I will give you the info you requested:

Fsx gold edition (maybe deluxe, i have a doubt) with acceleration pack.

Addons installed are Plan G and Active Sky Next

Plan G is working well with Simconnect, no worries there.

However, as I said in previous post, AI Traffic from the SDK just opens for about 10 seconds with a black windows and then closes. I understand this application serves as a test to see if simconnect works well.

ASN just freezes, but I need to look at it again....

Thanks

Share this post


Link to post
Share on other sites

No problem. Shout when you're ready.

If you switch the SimConnect console window on, you'll see what version you're running at what happens (if anything) as you load your add-ons. Using Acceleration the version should be the same as mine (think it's 10.0.61637).

 

ASN freezing suggests it doesn't succeed in connecting to the server. If other things are, it suggests that the ASN configuration is the problem.   But that's for later.

 

Z

Share this post


Link to post
Share on other sites

Hi Z,

 

I have version FSX Gold Edition with Acceleration Expansion Pack

 

On both machines, I have:

SimConnect Client version 60905, 61242 and 61259

I also have MFSX Acceleration SDK version 61637

 

I have a SimConnect.ini in my Documents/Flight Simulator X Files on the main PC

I have a SimConnect.xml in AppData/Roaming/Microsoft/FSX on the main PC

I have a SimConnect.cfg in My Documents on the other machine (the client?)

 

Sorry I don't know what the SimConnect console window is and how to switch it on??

Share this post


Link to post
Share on other sites

Hi Fnav.

 

If you edit your SimConnect.ini on your main machine (server) you'll see a line that I would imagine presently reads "console=0" or maybe ";console=1". Change it to read "console=1" without the quotes or any traces of a semi-colon and save.

 

Setting the value like this will cause a little window to display when you start FSX. As it does so, the first lines written confirm the version of SimConnect running on the server. We're both expecting 61637, right?

 

When a client program tries to connect to the server, it sends an "Open" command, and this will show in the console.

If the client program starts and there is no "Open" line, then it's a fair bet that the client program is not configured correctly. Typically the local SimConnect.cfg contains has the wrong address for the server or is using the wrong port. This can happen if the .cfg file is using an IP address to refer to the server and the server gets its IP address from a DHCP server - i.e. it can change.

 

If the "Open" line is there, then we'll want to have a more detailed look at the output to see what is happening.

 

So:

1) Set the console on

2) Start FSX and take a look at the output

3) Start your 1st 3rd party add on and take a look at the output

4) Etc for each add on.

 

If SimConnect is the source of the problem then we'll know at this point.

 

Cheers,

 

Z

Share this post


Link to post
Share on other sites

Thank you for the reply.... I think I am an hopeless case....

 

I set the console to 1, but unfortunately, the little window you mentioned does not appear, only FSX opens.... I then try to start flying around, but still nothing. I then launch Plan G on the client machine, connect it to FSX (on the server machine), it all works well, however the console/window still does not appear.

 

I don't mean to be difficult, but it just does not work as predicted, What I don't understand is that I get a connection via SimConnect with Plan G (on the client) and everything works well. I have FSX on the Server machine and Plan G on the client, and the two talk to each other no problem.

 

This is my SimConnect.ini

 

 

 

[simConnect]
level=verbose
console=1
;RedirectStdOutToConsole=1
;OutputDebugString=1
;file=c:\simconnect%03u.log
;file_next_index=0
;file_max_index=9

 

Does this look correct?

 

Thanks again.

Share this post


Link to post
Share on other sites

Hmm. Very odd. That is exactly the setting that controls the display of the debug window.

I can't understand why it wouldn't work unless that is not the SimConnect.ini that FSX is reading.

 

Please could you search your system to see if there is more than one SimConnect.ini on the FSX machine?

 

If there is not, could I trouble you to rename the one you have to SimConnect.ini.old and create a new one in Notepad/Wordpad containing just the top 3 lines? (not a very structured step I admit but I'm just trying to eliminate any reason why the file may not be being read). Then start FSX again and once the menu is displayed cycle through open windows to confirm the existence or otherwise of the window.

 

Z

Share this post


Link to post
Share on other sites

Thank you for your reply, Z. :smile:

 

Still no luck.

I searched the system in the Windows Start menu and I only have one simconnect.ini file.

I followed your instruction and renamed the file I have to SimConnect.ini.old and created a new one (SimConnect.ini) with the top 3 lines. I started FSX, still no luck. Apart from the FSX window, no other window opens up.

What do you mean, though, by:

 

once the menu is displayed cycle through open windows to confirm the existence or otherwise of the window.

 

What menu are we talking about? FSX's?

When you talk of windows, do you mean the windows for let's say Internet Explorer, Windows Media Player, etc....that open at the bottom of the PC screen?

 

 

PS: For info, in Control Panel/Programs/Programs and Features/ I have:

Microsoft Flight Simulator SimConnect Client v.10.0.60905.0 (size 2.46MB),

61242 (2.40MB) and

61259 (2.41MB).

I also have Microsoft Flight Simulator X: Acceleration SDK version 10.0.61637 (size 332MB) and Microsoft Flight Simulator X: Acceleration version 10.0.61637.0 (no size info).

Same on Client machine with, for some reason, one extra thing, Microsoft Flight Simulator SDK version 1

 

Although all these are listed as programs, they do not seem to appear anywhere on both machines. Is this normal?

 

What I don't understand is that for PLAN G, for example, there is a FS Connection Parameters section where you basically tell Plan G what you are connecting it with (SimConnect in my case), then what network mode (IPv4, IPv6, etc...), the Server IP address and Port. Same for Aivlasoft EFB (although this one uses its own networking solution).

There is none of that with the AITraffic.exe from the SDK, for example....Anyway, I am at a loss.

Share this post


Link to post
Share on other sites

Sadly, I am too at a loss and this is beyond my experience, so I'm hoping others may chip in with ideas at this point.

 

With regard to the AI traffic thing, the way I understand it is that the client application must refer to the SimConnect.dll library that it wishes to use. As you point out above, there may be multiple versions installed (in the WinSxS folders), each of which may communicate to FSX servers (potentially on different machines) using the parameters specified in the cfg file 

 

And yes I did mean the FSX menu.

 

The only other thing I can think to try is setting the ini file to produce an output file - but if the console isn't displaying then I can only think that the ini file is not being read.

 

Help! We need a grown up! :help::unknw:

Share this post


Link to post
Share on other sites

By way of an addendum I came across a thread on FSDeveloper (can't insert hyperlinks at the moment for some reason) that might indicate the cause of the problem.

Have you by any chance installed the Steam Edition? It seems that it does something in its installation that forces .Net programs to use a particular version of the SimConnect dll - which may be incompatible with FSXA.

 

Just a thought.

 

Z

Share this post


Link to post
Share on other sites

Even though you may have already read it once, I would suggest a re-read of the topic titled "Connecting to FSX from a Networked PC with SimConnect" in the Plan-G manual.

 

Then, assign static IP addresses to both the FSX computer and the one that has Plan-G.

 

Make sure that you have shared the directories containing scenery.cfg, fsx.cfg, and fsx.exe on the FSX computer and that they are asccessible to the Plan-G computer.

 

Install Plan-G outside of Program Files, or Program Files (.86).  This is recommended for all flight sim related files.  I have a directory C:\FlightSim\, where I put all of my fs related programs.

 

I find that creating a separate SimConnect.cfg for each program, containing only the parameters for that program and placing it within the program's directory works better for me.

 

I don't have a 'SimConnect.cfg' in the Documents\Flight Simulator X Files directory.  This is just my preference and I'm sure that others use the global simconnect.cfg file just fine.

 

On the other hand, on my FSX computer the SimConnect.xml within my fsx.cfg contains the code for all of the applications that utilize SimConnect.

 

Once everything is set up.. Start FSX, start Plan-G, hit the "connect" option, and "lock", or "sync".  Give it a moment. 

 

If you can see your aircraft then it's working.  If all is well go to the "View" tab and select "Traffic". 

 

If you can't see your aircraft, then go back and check everything because it's not quite right yet.

 

Good luck.

Ernie

Share this post


Link to post
Share on other sites

Hi Ernie.
 
<quote> I find that creating a separate SimConnect.cfg for each program [...etc] </quote>
 
How do you programs tell SimConnect.dll which SimConnect.cfg file to use?
 
Z

Share this post


Link to post
Share on other sites

Z, I am not on Steam.

Ernie, Plan G works well for me, no issues there with SimConnect..

 

I will keep on trying and see what I can come up with... however, I will take it easy as it has been driving me mad.

 

I will let you know.

Share this post


Link to post
Share on other sites

Z,

I can't remember the sequence, but SimConnect is smart enough to look in the application's directory for the cfg file if not found in Documents\Flight Simulator X Fles for visa versa.

 

So, instead of having one simconnect.cfg with multiple ports, one for each application.   I have one section containing a single port in each applicaton's directory. 

 

I'm sure it sounds a bit confusing and somewhat redundant, but it's easier for me to remember which port is used by which application.

 

Ernie

Share this post


Link to post
Share on other sites

Makes sense to me - just didn't realise SimConnect could do this.

 

Nevertheless, I'm still baffled by Fnav's issue with displaying the diagnostics window. Without this (or some debug output) I don't see how we're going to be able to work out which add-on is failing at which point. Since I've only ever experienced this functionality behaving itself as advertised, I'm struggling to come up with a theory of what may be going wrong.

 

The previous suggestion of mine relates to an application placing the SimConnect.dll in the Global Assembly Cache resulting in all .Net applications referencing the same version. I can imagine how this could cause problems within add-ons. However, Fnav reports that he's not using SE (the culprit in the thread on FSDeveloper) so I wonder if another add-on's installer (ASN?) might do the same thing??

 

If I get time I'll do some reading up on the GAC...

 

Share this post


Link to post
Share on other sites

I don't know if FSUIPC has something to do with it, but I have just installed the latest version of it...and to cut a long story short, the install log mentioned SimConnect several times.... can the two conflict? What is their relationship?

Share this post


Link to post
Share on other sites

Dunno (99% sure they can co-exist happily) - but can we have a look at the install log?

Share this post


Link to post
Share on other sites

This is the FSUIPC install log with the SimConnect lines in bold.... Maybe it will shed a bit of light.....

 

 

INSTALLATION FOR FSX:
SetupPath="C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\"
Checking version of the FSX EXE:
... Version 10.0.61637.0  (Need at least 10.0.60905.0)
Checking compatibility with installed SimConnect:
    Found SimConnect build 60905 (Original)
    Found SimConnect build 61242 (SP1 May07)
    Found SimConnect build 61259 (Acc/SP2 Oct07)

Checking if there's already a version of FSUIPC4 installed in:
       C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\FSUIPC4.DLL
... Version 4.939u found.
FSX Modules folder already exists.
Okay -- installed FSUIPC4 into "C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\FSUIPC4.DLL"
Looking for the current user's Application Data path:
... found as "C:\xxxxx\User\AppData\Roaming"
Now finding \Microsoft\FSX\FSX.CFG for all users, including this one
Looking in "C:\xxxxx\Administrator\AppData\Roaming"
Found FSX.CFG in "C:\Users\Administrator\AppData\Roaming\Microsoft\FSX\FSX.CFG"
Now checking DLL.XML ...
... There is a previous DLL.XML, checking for FSUIPC4 section.
... FSUIPC4 section already exists but will be replaced.
     (for FSUIPC4, without Loader)
... FSUIPC4 section of DLL.XML written okay
Now checking for a SimConnect.XML file ...
... No SimConnect.XML file found. This is okay.
Looking in "C:\Users\All Users\AppData\Roaming"
 ... No FSX.CFG there
Looking in "C:\Users\Default\AppData\Roaming"
 ... No FSX.CFG there
Looking in "C:\Users\Default User\AppData\Roaming"
 ... No FSX.CFG there
Looking in "C:\Users\Public\AppData\Roaming"
 ... No FSX.CFG there
Looking in "C:\Users\User\AppData\Roaming"
Found FSX.CFG in "C:\Users\User\AppData\Roaming\Microsoft\FSX\FSX.CFG"
Now checking DLL.XML ...
... There is a previous DLL.XML, checking for FSUIPC4 section.
... FSUIPC4 section already exists but will be replaced.
     (for FSUIPC4, without Loader)
... FSUIPC4 section of DLL.XML written okay
Now checking for a SimConnect.XML file ...
... There is a SimConnect.XML, checking for "local" section.
... "local" section already exists, file not modified.
"Modules\FSUIPC Documents" folder already exists.
Now installing additional files into the "Modules\FSUIPC Documents" folder:
   Installed "FSUIPC4 User Guide.pdf" okay
   Installed "FSUIPC4 for Advanced Users.pdf" okay
   Installed "FSUIPC4 History.pdf" okay
   Installed "List of FSX and P3D controls.pdf" okay
   Installed "FSUIPC Lua Library.pdf" okay
   Installed "FSUIPC Lua Plug-Ins.pdf" okay
   Installed "Lua License.pdf" okay
   Installed "Lua Plugins for VRInsight Devices.pdf" okay
   Installed "LuaFileSystem.pdf" okay
   Installed "Example LUA plugins.zip" okay
   Installed "ASN WX Radar facilities in FSUIPC4.pdf" okay
   Installed "Offset Mapping for PMDG 737NGX.pdf" okay
   Installed "Offset Mapping for PMDG 777X.pdf" okay
   Installed "FSUIPC4 Offsets Status.pdf" okay
   Installed "Profiles in Separate Files.pdf" okay
===========================================================

All installer tasks completed.

*************** End of Install Log ***************
 

Share this post


Link to post
Share on other sites

What a well constructed install log. He's good, that Pete Dowson.

 

But alas, I don't think this sheds a great deal of further light. The references to SimConnect seem entirely normal. The installer finds the SimConnect.XML file (in which the local port is specified) in the "\Users\User\AppData\Roaming\Microsoft\FSX" folder and ascertains that there is an entry in it for the local FSUIPC to access.

What is doesn't say is if the SimConnect.XML file has a "global" entry - which sets the parameters for a remote machine to access this one.

 

Perhaps this is a good time to take a look at that SimConnect.XML file. Would you mind posting it?

 

Also, can you confirm that you are not logging in using the Administrator account?

 

Cheers,

 

Z

Share this post


Link to post
Share on other sites

It looks like FSUIIPC checks in two places for the SimConnect.XML   As long as it finds it in one of the two it should be okay.

 

Now an odd question, but one I should have asked; Can the OP see AI traffic in FSX?  In other words is it working correctly there?

 

Because if the OP can see his aircraft when connected to Plan-G and AI works on his FSX machine, but not in Plan-G once he presses the 'Traffc' button on the 'View' tab within Plan-G, then I am at a complete loss because then it doesn't sound like a simconnect issue. :-)

 

Of course, he could always press the VATSIM button and watch real simmulator pilots flying their aircraft!

 

Another point, which is FYI for the OP is that the only version of SimConnect that needs to be installed is the Accel version; 61259 on both computers, unless FSX: Steam is installed.  In which case Steam will install its own version.  It shouldn't hurt having the extra versions, it's just not necessary.

 

Enjoy..

Ernie

Share this post


Link to post
Share on other sites

Hi Ernie.

 

Not sure the OP reported a problem seeing his ac in Plan-G; If I've understood the root issue correctly, he seemed to be unable to run AI from a remote machine and suspected SimConnect to be the culprit.

 

I'd agree with you that the FSUIPC log seems to indicate that it is working correctly LOCALLY, although there has been nothing yet to confirm that "global" (i.e. across the network) operation is working.

 

My strategy was to establish that the server starts normally and to see it's address/port settings in the diagnostic window and then observe the attempted connection from the remote machine. Sadly, we've failed at the 1st hurdle since the dialog window doesn't display, despite the SimConnect.ini file being apparently configured for it to do so. This suggested to me that the server is not reading the .ini file for some reason (permissions?). The other option is the log file - but the settings for this are also in the .ini file so I'm not expecting that to work either.

 

The current line of investigating the SimConnect.XML file can show us the configured port for the global entry but I can't see how we can establish whether or not SimConnect is even starting (other than the apparent operation of Plan-G which I presume uses SimConnect through the local connection?). I suppose it should probably show up in Task Manager. Thoughts?

 

Share this post


Link to post
Share on other sites

Thanks for the clarification.. I misunderstood his original post.

 

Is Plan-G installed on his remote computer and if the answer is yes;   can he see his aircraft within it?

Share this post


Link to post
Share on other sites

Hi guys,

 

First thing, the .xml file:

 

 

<?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>the machine IP address</Address>
    <MaxClients>64</MaxClients>
    <Port>5000</Port>
    <MaxRecvSize>4096</MaxRecvSize>
    <DisableNagle>False</DisableNagle>
   </SimConnect.Comm>

<SimConnect.Comm>
<Disabled>False</Disabled>
<Protocol>Auto</Protocol>
<Scope>local</Scope>
</SimConnect.Comm>
</SimBase.Document>

 

 

I am not logged on as administrator.....

 

I can see AI Traffic in FSX and also in Plan G when connected to Plan G....Plan G is installed on the remote machine and, to reiterate, I can see both my aircraft and AI traffic in Plan G.

 

I had a look at permissions.... I can edit both the .ini and .xml files from the remote machine and I have no problems. It seems the remote machine has full control over these two files. Maybe I am missing something there.....

 

 

Hopefully, the .xml file can shed some light.....

 

Thanks again.

Share this post


Link to post
Share on other sites

Oh this is frustrating! :fool:

 

I see nothing wrong with that SimConnect.xml file. I wouldn't use that port number personally but it's a trivial thing - I read somewhere that 1200 was a good starting point.

 

So let me remind myself of the issue:

When you run AI Traffic.exe on the remote machine, you get a command prompt window opening and closing, right - with no indication that it is operating?

 

Having just tried the very same thing on my machine without FSX running on my remote server, this is exactly what I get and I KNOW SimConnect is working just fine on this machine, since I've been programming with it.

 

I'm having another a-ha! moment (no Morten jokes please).

What's to say that SimConnect is not working on your setup too?

 

Maybe AI Traffic needs a bunch of other stuff to run... More reading required. Watch this space.

 

 

[Edit: After a pause for reading]

 

Hmmm.

 

I find nothing in the help file (%SDK installation folder%\SDK\Environment Kit\Traffic Toolbox SDK\Traffic Toolbox.html) that indicates that it can/should run on a remote machine.

 

Am I missing something?

 

Z

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this