• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

COM Radio software help

Messages
6
Country
australia
Hi All
I have been developing a Com/Nav radio via USB that I want to use in FSX. It has an LCD to Display the current and stand by frequencies. Is there a way to use sim connect to update data to and from a usb device.
Or do I need to use a different program.
If any one can put me in the right direction it would be appreciated.

I am using Flowcode to code the Micro Controller and MCHPUSB as the Bootloader. So The device can be changed to USBHID, USBSerial or USBSlave quite easily.

Thank You
Joycey
 
what I Probably should have said is, is it possible to send a String/varible etc.. Example "128.25" to FSX to change the frequencey of the radio when I push the button on the radio stack that alternates the frequenceys using Simconnect ?
This way the LCD (16 characters, 2 Lines) will display the same frequency as the computer.
 
You can send values to FSX to change the radio values, although its a numeric value, not a string.

The way I think you would want to do this is have SimConnect code that tracks the radio values in FSX, and sends any updates to your external device, and some more code that tracks changes made via your external device and uses SimConnect to send those to FSX. That way they are always sync'd (unless your external device is just a display with no internal logic, then you can just track the FSX vars and update the external display accordingly).
 
Of course it is possible.
I am currently working on such a project. My PIC 18F4550 based I/O controller is served by PC software written using Visual C# and managed code to read and write to Simconnect. Everythings is not that complicated but some knowledge is required mainly in PIC programming. Within next few weeks I will have all project ready with details on my website http://www.a320-project.skalarki.co.uk.
In the meantime you can contact me via email.
 
Thanks for your replies.

I have done a bit more reading last cople of days and I see it is possible now.
The chip I am using also is a 18f4550.
I also have C# (2008) and this was what I was planning on using on the PC side of things. This is were I have hit my next wall. Ive never used C# or VB.
Did some tutorials which was fine. I am not new to programing.
Im having trouble just getting started with simConnect. In the SimConnect SDK Reference I had a look at the managed code samples.
Im trying to get Managed Data Request to work.
I have included the reference to microsoft.flightsimulator.simconnect.dll
Im using Windows form app, I get a magnatude of errors and cant get it to compile. Is there any C# examples around, for simconnect, so I can get myself started. :confused:
Thanks

J
 
Last edited:
Try my replacement Managed SimConnect SDK (see blog link in sig), it's much easier to deal with than the original managed wrapper shipped in the official SDK :-> And all of its samples are in C# (includes Console, WinForm, WPF, and Silverlight based samples).
 
I will look into that Beatle.

I feel like an idiot. I found the sample folder. I was copying and pasting from the Reference SDK.:o
Any way The only problem Im having at the moment is when I Debug I get this error with the Managed_Data_Request Example

The specified module could not be found. (Exception from HRESULT: 0x8007007E)
For this code : Application.Run(new Form1());

If its compiled it wont run in XP I get the above error.
But it works in Vista ?
C#(2008) is Installed on XP(SP3)
Simconnect and FSX are installed on Vista.

Any ideas. My system has a dual boot (Vista & XP) and it's getting annoying having to reboot everytime I want to see it running.


Error when run on XP

Microsost .NET Framework
Unhandled exception has occured in you application. If you click continue the application will ignore this error and atempt to continue. If you click quit, the application will close immediately.

The specified module could not be found. (Exception from HRESULT:
0x8007007E)

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at Managed_System_Event.Form1.DefWndProc(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3082 (QFE.050727-3000)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Managed System Event
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///G:/PROGRAM%20FILES/Microsoft%20Games/Microsoft%20Flight%20Simulator%20X%20SDK/SDK/Core%20Utilities%20Kit/SimConnect%20SDK/Samples/Managed%20System%20Event/Managed%20System%20Event/bin/Release/Managed%20System%20Event.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Any Ideas.

J
 
Have you run the SimConnect.MSI installer (in the SDK directory) on the XP machine (another step not required for my replacement managed SDK :-> )?

Also, did you change the build settings from "Any CPU" to "x86" mode (which affects whether it works on 64-bit installs or not) - also not required by my replacement SDK :->
 
ok it wasn't anything like that at all.
I must have altered one of the files in the directory by accident.
When C# opens a file from the sample directory it creates a backup folder.
I simply reopened this file, let C# reback it up and bang everything works.
Thanks again
J
 
Back
Top