SimConnect Configuration


SimConnect has multiple configuration files which allow the developer to configure different aspects of SimConnect. The different configuration files and their purposes are as follows:

SimConnect Debug (SimConnect.ini)

The default SimConnect.ini file will enable the debug window and disable the log file. Use a semi-colon to start a comment, or comment out a directive. The file should be placed in your %USERPROFILE%\Documents\Prepar3D v4 Files folder.

Directive Values Description
level Verbose, Normal, Warning, Error, Off Set the level of text communication to be provided to the console, debug string, or log file.
console Yes, No Open a command line debug window to display server to client communication.
RedirectStdOutToConsole Yes, No This setting redirects the output of console print functions to the SimConnect console window. This is useful for debugging DLL or GUI based SimConnect applications that do not launch a console window.
OutputDebugString Yes, No Sends server client communication to the debugger for display. Either your SimConnect application or Prepar3D must be launched from within an integrated development environment (IDE) debugger in order for this option to work. Refer to MSDN documentation for more details.
file Filename Output communications to a log file. If the text %03u is included in the filename, then the filename will be incremented each time Prepar3D starts, so giving a new log file for each test run.
Example: file=c:\simconnect%03u.log
file_next_index Integer The index of the first log file. Subsequent log files will have the index number incremented by one.

SimConnect Client Configuration (SimConnect.cfg)

The SimConnect.cfg file contains communications information for a client (the SimConnect.xml file contains information for a server). This file is only required if a client is going to access Prepar3D running on a remote machine, and should be placed in the Documents folder, or in the same folder as the client application or library, on the computer the client is running on.

Note: SimConnect.msi is no longer needed due to the fact that the WinSxS library has been depreciated.

The SimConnect.cfg file can contain a number of configurations, identified in sections with the [SimConnect.N] title. The index number is used as a parameter in the SimConnect_Open function. This is useful for applications that communicate with a number of different machines that are running Prepar3D. The default configuration index is zero, and if there is only one configuration in the file, no index number is required.

Directive Values Description
Protocol Pipe, IPv4, IPv6 Pipe uses a Named-Pipes communication system. The IPv4 and IPv6 protocols are available on computers running Windows, with IPv4 as the default. IPv6 has more security features and is recommended. If IPv6 is not already installed, there is a utility to install it in the config folder.
The order in which protocols are evaluated is: Pipe, IPv6, IPv4, Pipe. So, for example, if this entry is set at IPv6, then IPv4 and Pipe will evaluated in that order. The first working protocol found will be used. The advantage of Pipe communication is that it avoids conflict with firewalls and virus protection software when the connection is local, which of course is not the situation if a SimConnect.cfg file is required.

  The Address and Port of the SimConnect server should be entered in these fields, these will be the same values as those in the appropriate Comm section of the Simconnect.xml file. A good knowledge of Windows networking and client/server applications will be needed to set these correctly. The address can be the name of a computer in a Domain Controller environment.
MaxReceiveSize Integer The maximum packet size. The default is 8192. If the client receives a packet larger than this size, it will disconnect from the server.
DisableNagle 0, 1 Set to 1 to disable the Nagle packet optimization algorithms.

SimConnect Server Configuration (SimConnect.xml)

The SimConnect.xml file contains communication information for the SimConnect server (the SimConnect.cfg file contains information for a client). The default behavior is that three servers are initiated by the system, for local communication using one of each of the three protocols: Pipe, IPv4, and IPv6. These servers do not require entries in the XML file. The Simconnect.xml file is not needed if this covers the communication requirements. If remote connections are required, then one entry will need to be made in this file to cover each type of remote communication that needs to be supported.

The following table describes the file format. The file should be placed in the in the %APPDATA%\Lockheed Martin\Prepar3D v4 folder, on the computer the server is running on.

XML Values Description
<SimBase.Document Type="SimConnect" version="1,0"></SimBase.Document> String SimConnect version information.
<Descr>SimConnect</Descr> String Description of this file.
<Filename>SimConnect.xml</Filename> String This filename.
<Disabled>False</Disabled> True, False Set to True to disable SimConnect completely.
<SimConnect.Comm></SimConnect.Comm>   Communications section. If remote connections are required, then additional SimConnect.Comm sections should be added, one for each protocol or scope that should be supported.
<Disabled>False</Disabled> True, False Set to True to disable this communication section.
<Protocol>IPv6</Protocol> Pipe (or Auto),
The entry Auto is accepted for backwards compatibility as synonymous with Pipe. The protocol entered here is the only one this particular server will accept.
<Scope>local</Scope> local,
For Pipe or IPv4, one of local or global. For IPv6, one of local, link-local, global, or unrestricted. Link-local is an IPv6 mechanism for accessing computers on a network that does not involve traversing a router. Unrestricted enables Teredo tunneling. Refer to Named-Pipe, IPv4 and IPv6 documentation on MSDN for more details.
  The server address and port. These should be copied to the identically named fields in the SimConnect.cfg files for the clients.
<MaxClients></MaxClients> Integer Define the maximum number of SimConnect clients that can be active at any one time, using this communication section.
<MaxRecvSize></MaxRecvSize> Integer The maximum receive packet size, in bytes. The server will disconnect a client that transmits a packet larger than this.
<DisableNagle>True</DisableNagle> True,
Set to True to disable the Nagle packet sending algorithms.