Jump to content
The simFlight Network Forums

SimConfigConnection


Recommended Posts

Good evening,

i installed MSFSVariableServices_VB for testing. 
If I install it on the computer running FS2020 it works if I install it on a Client it doesn't work. 
I think it's about correctly configuring Me.VS.SimConfigConnection but I didn't understand how to do it.
Can you advise me or direct me to some examples?

Thank you
Link to comment
Share on other sites

17 hours ago, achilleghilotti said:

Can you advise me or direct me to some examples?

Try this post: https://forums.flightsimulator.com/t/simconnect-on-2nd-pc-network-setup/365647/7

Also, check the SimConnect config documentation. Google can also help if you have issues, e.g.
    https://www.fsdeveloper.com/forum/threads/setup-remote-client-for-simconnect.5187/
    http://www.prepar3d.com/forum/viewtopic.php?t=127714  

Note that the SimConnect functionality should be the same for MSFS as FSX/P3D in this area.

Its not something I've looked at yet in detail. It is something I'll be looking into when I allow FSUIPC7 to be ran on an MSFS client/slave machine.
Not sure when I'll be doing this at the moment though.

John

Link to comment
Share on other sites

Also, of you are developing an FSUIPC client (and NOT a SimConnect client), then a networked SimConnect config isn't going to help, as you are using the FSUIPC SDK and not SimConnect directly. To run FSUIPC clients on a slave PC, you currently need a license for WideFS and use WideClient on the slave PC.
 

John

Link to comment
Share on other sites

3 minutes ago, Paul Henty said:

The OP is wanting to use the WAPID.DLL (via my DLL) on a second machine, talking to the LVars WASM module on the MSFS PC. Am I right in thinking that's just SimConnect and doesn't use FSUIPC?

Forgot about the WAPI being used, which does of course use SimConnect, so yes, that would need a networked SimConect connection.
However, doesn't his client/your library, also require the FSUIPC SDK, and so also FSUIPC to be running (or, on a slave PC, WideClient)?

Or can he use a version of your client libraries for WAPI access that doesn't use the FSUIPC SDK? If so, it should be possible to configure a networked SimConnect connection for that client and run without FSUIPC/WideClient.

John

Link to comment
Share on other sites

Good evening everyone,

first of all thanks.
I wanted to clarify that I bought the widefs and fsuipc licenses and I already use simconnect from the client.
If I do the test with WASMClient everything works, I read Hvar.
In code if I use FSUIPCConnection.WriteLVar ("L: A32NX_ECAM_SD_CURRENT_PAGE_INDEX", CDbl (4)), it works.

I was implementing Hvar

        
If FSUIPCConnection.IsOpen Then
            Me.btnToggleConnection.Text = "Disconnect"
            Me.lblConnectionStatus.Text = "Connected to " & FSUIPCConnection.FlightSimVersionConnected.ToString()
            Me.lblConnectionStatus.ForeColor = Color.Green

            Me.VS = New MSFSVariableServices()
            Me.VS.SimConfigConnection = 0

            ' Handle events
            AddHandler Me.VS.OnLogEntryReceived, AddressOf VS_OnLogEntryReceived ' Fired when the WASM module sends a log entry
            AddHandler Me.VS.OnVariableListChanged, AddressOf VS_VariableListChanged ' Fired when the list of available variables is changed

            Me.VS.Init(Me.Handle) ' Initialise by passing in the windows handle of this form
            Me.VS.Start()
            Me.started = Me.VS.IsRunning
            Me.VS.LogHVars()
            ' Tells the WASM module to rescan the aircraft for variables
            Me.VS.Reload()
...............

but not working

immagine.png.b6cf0288f688e9967185a452fd7c3b1a.png

Link to comment
Share on other sites

1 hour ago, John Dowson said:

However, doesn't his client/your library, also require the FSUIPC SDK, and so also FSUIPC to be running (or, on a slave PC, WideClient)?

Or can he use a version of your client libraries for WAPI access that doesn't use the FSUIPC SDK?

In my library the WAPI access is independent of the FSUIPC SDK. It can be used without a connection to FSUIPC.

20 minutes ago, achilleghilotti said:

In code if I use FSUIPCConnection.WriteLVar ("L: A32NX_ECAM_SD_CURRENT_PAGE_INDEX", CDbl (4)), it works.

That's using FSUIPC/WideFS so nothing to do with SimConnect on the client machine.

21 minutes ago, achilleghilotti said:

If I do the test with WASMClient everything works, I read Hvar.

Do you mean this works on the remote (Client) PC or the MSFS PC?

 

15 minutes ago, achilleghilotti said:

Me.VS.SimConfigConnection = 0

I think this is to select different connections set up within the SimConnect configuration file. So in the SimConnect file you can have a local connection (0) and a remote connection (1).

Link to comment
Share on other sites

16 minutes ago, achilleghilotti said:
24 minutes ago, achilleghilotti said:

     Me.VS.SimConfigConnection = 0

this is correct or is there a configuration ini file.

Adding to what Paul has already said, I think the default (local) connection is -1 (SIMCONNECT_OPEN_CONFIGINDEX_LOCAL). If you use another value, you need to have that SimConnect connection value defined in your client's SimConnect.cfg file.

4 minutes ago, Paul Henty said:

In my library the WAPI access is independent of the FSUIPC SDK. It can be used without a connection to FSUIPC.

Ok, then I would expect it to be possible to run such a client on a client PC with a correctly defined  SimConnect network configuration, and without the need for WideClient on the client PC.

John

Link to comment
Share on other sites

Note also, that once a WAPI instance is created, the setSimConfigConnection() method should be called to set the connection number to be used, if not using the default (local) one, before the start() method is called. I presume this is handled correctly via Paul's dll when setting the VS.SimConfigConnection.

However, I haven't yet tried configuring a WAPI client (or any other SimConnect client)  to run via a networked SimConnect connection to MSFS. I will look into this further when I can, maybe next week...

John

Link to comment
Share on other sites

Got it working....!

The issue was that I needed to explicitly set the sim connection to be used by setting the following (WAPI) ini parameter:
    UseSimConnection=0
(for the WASMClient, this is set in the WASMClient.ini).

Setting this for the client will then force it to use the default connection defined in the SimConnect.cfg file (located in the same folder as the application).

If this is not done (or if a WAPI client doesn't set the connection using the setSimConfigConnection() method), then the default local connection (-1) is used, which is always local.

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.