Jump to content
The simFlight Network Forums

FSUIPC7: configuring connection parameters for optimal use and to prevent SimConnect issues


John Dowson

Recommended Posts

Background

FSUIPC7 is designed to be able to function whenever it is started - either before MSFS is started, during MSFS start-up or when FSUIPC7 is running, and in any state (e.g. in the main menu, when an aircraft is loaded, or when MSFS is in any other state). However, the recommended setting is to have FSUIPC7 auto-started with MSFS2020.

Due to the variable start-up times of MSFS for each user (mainly due to the number of add-ons it loads, but also related to your PC specification), long start-up times can cause issues when FSUIPC7 is auto-started, or when started during the MSFS initialisation phase. This is because a response is not received from the initial connection request, and this response times-out after a pre-defined (and configurable) time-limit, and a new request is sent. A few re-connection attempts at start-up should not cause any issues, but too many attempts can starve SimConnect of available connections and then prevent other add-ons/simconnect clients from connecting/functioning correctly. It is therefore best to tune FSUIPC so that the connection attempt is delayed until MSFS is ready to accept this connection within a reasonable amount of time.

There are three parameters that you can tune to get FSUIPC7 to connect at the right time and to avoid re-connection attempts. These are:
    DetectToConnectDelayAuto : this is the time/delay used, in seconds, between when FSUIPC7 detects that MSFS is running and when it first tries to connect, and is used when FSUIPC7 is auto-started (by MSFS) only. This has a default value of 60 (seconds), so FSUIPC7 will attempt to connect 60 seconds after it has detected that FSUIPC7 is running. This parameter has a maximum value of 500 seconds,
    DetectToConnectDelay : similar to the above, but used when FSUIPC7 is manually started. This has a default value of 1 (second), which is designed for use when FSUIPC7 is manually started and MSFS is already loaded, i.e. in the main-menu system or with an aircraft loaded and ready-to-fly. You should adjust this to the same default as 
DetectToConnectDelayAuto if you start FSUIPC7 before you start MFS, or if you start FSUIPC7 during the MSFS start-up process. This has a maximum value of 300 seconds.
    InitialStallTime : this is the time taken between issuing a connection request and cancelling/closing this request when a response is not received,. This has a default value of 30 (seconds), and a minimum value of 15 (seconds) when FSUIPC7 is auto-started. What this means is that FSUIPC7 will close/cancel the connection request and issue another connection request if a response is not received in 30 seconds. You can adjust this time, but it is better to first try and configure the other two parameters mentioned above first. Only adjust/increase this if you have reached the maximum value of the other parameters and are still having re-connection attempts.

All of these parameters should go in the [General] section of your FSUIPC7.ini file. If they are already there, you can adjust them as needed (see below), and if they are not there they should be added. They will not be present by default.

What to do when using Auto-connect (recommended)

 First run MSFS and let that load and auto-start FSUIPC7, Ince MSFS fully loads to the main menu, open FSUIPC7 (press Alt + F) and exit (File -> Exit). Then open the FSUIPC7.log file (which can be found in your FSUIPC7 installation folder - note that if you cannot see the file extensions, you need to change your Explorer options to not hide the extensions of known file types). Here is an example extract of the relevant section of a log file:

Quote

 ...
      328 LogOptions=00000000 00000001
      328 Auto-started with DetectToConnectDelayAuto=220, InitialStallTime=10
     3172 Simulator detected
   223172 Trying to connect...
   233172 **** SimConnect open event not received in required time limit: Re-connecting now...
   233172 Trying to connect...
   243172 **** SimConnect open event not received in required time limit: Re-connecting now...
   243172 Trying to connect...
   253172 **** SimConnect open event not received in required time limit: Re-connecting now...
   253172 Trying to connect...
   263172 **** SimConnect open event not received in required time limit: Re-connecting now...
   263172 Trying to connect...
   273172 **** SimConnect open event not received in required time limit: Re-connecting now...
   273172 Trying to connect...
   283172 **** SimConnect open event not received in required time limit: Re-connecting now...
   283172 Trying to connect...
   293172 **** SimConnect open event not received in required time limit: Re-connecting now...
...
   373172 Trying to connect...
   383172 **** SimConnect open event not received in required time limit: Re-connecting now...
   383172 Trying to connect...
   393172 **** SimConnect open event not received in required time limit: Re-connecting now...
   393172 Trying to connect...
   396234 SimConnect_Open succeeded
   396234 Running in "KittyHawk", Version: 11.0.282174.999 (SimConnect: 11.0.62651.3)
   396234 MSFS version = 11.0.282174.999
...

From this log file extract, you can see the current value of the ini parameters being used:

Quote

       328 Auto-started with DetectToConnectDelayAuto=220, InitialStallTime=10

and that it is attempting to connect many times before a connection is obtained. The DetectToConnectDelayAuto value of 220 is used here:

Quote

     3172 Simulator detected
   223172 Trying to connect...

i.e. the difference between detection and connection is 220 seconds. This needs to be adjusted to prevent these sim connection attempts, so find the timestamps of the Simulator detected and  SimConnect_Open succeeded log message:

Quote

     3172 Simulator detected
...
   396234 SimConnect_Open succeeded

then subtract these values and divide by 1000 (to convert from milliseconds to seconds), so (396234  - 3172)/1000 = 393. So for this installation, you would add the following to the [General] section of your FSUIPC7.ini file:
    DetectToConnectDelayAuto=393

If you see several 'SimConnect_Open succeeded' messages, this implies that the InitialStallTime is being reached, and FSUIPC7 is still attempting to re-connect. In this situation, use the timestamp of the last  'SimConnect_Open succeeded' message to determine the value of the DetectToConnectDelayAuto parameter - don't adjust the InitialStallTime unless absolutely needed (see below).

If you find that you are still getting re-connection attempts after setting the DetectToConnectDelayAuto parameter, you can adjust the InitialStallTime parameter. Start with a value of 45 and increase (up to a max of 60) until there are no longer any reconnection attempts. If you find that it is not possible to configure this to remove these connection attempts, please post your log file here and I will take a look.

What to do when manually starting FSUIPC7

You should not need to do anything if manually starting FSUIPC7 once MSFS is up and running and either in the menu system or have an aircraft already loaded. If you start FSUIPC7 before MSFS, or early during the MSFS start-up  process, you need to configure the value for the DetectToConnectDelay ini parameter in the same way as I showed how to configure the DetectToConnectDelayAuto parameter in the previous section, i.e. look at your logs and determine the time between detection and a stable connection and use that,

John

Link to comment
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
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.