fikkaud Posted September 6, 2010 Report Share Posted September 6, 2010 Hi all, I'm a very happy (FullFSUIPC +WideFS) customer when it comes to what I can accomplish trough the FSUIPC interface and FSX. This post is about taking everything a step further. I need help to enter the alleys of FSUIPC. I have a nice little Arduino board with an LCD output that can talk over a serial interface. I'd like to start my learning here. By making this act like a radio unit. This post is not about programming my microcontroller but rather what commands to send and how to conect to FSUIPC over serial (and the protocol involved). 1) Can someone point me in the right direction to interface with FSUIPC over a serial connection with ascii strings? How to get FSUIPC to listen and talk on the serial interface. The google search "FSUIPC RS-232" doesn't return many hits unfortunately. 2a) When I hve accomplished 1) I'd like to start off simple, by using ready made controls like the COM radio increment. Say I'd like two buttons connected to the Arduino to increment the COM1 frequency. I notice two controls I probably should be able to use 1030 Com1 use whole inc 1032 Com1 use fraq inc How should the string containing the 1030 control be formatted? 2b) How to read back the COM1 frequency from FSUIPC to the display? My guess is that offset 034E would be the one? And again: how to format the request? I hope You guys see where I'm going. I've drawn up this as an exercise for myself to get into this new world. And I think overcoming these obstacles will really widen my understanding on how to interface with FSUIPC. I know I've mentioned a microcontroller here, but a hyperterminal would do just the same trick for me to understand how to get along with the example I presented. Regards Audun Link to comment Share on other sites More sharing options...
Pete Dowson Posted September 6, 2010 Report Share Posted September 6, 2010 This post is not about programming my microcontroller but rather what commands to send and how to conect to FSUIPC over serial (and the protocol involved). You have to write your own driver program, interfacing to FSUIPC as described in the FSUIPC SDK and supported by the various language packages therein. You seem to misunderstand FSUIPC's function. FSUIPC is not a hardware driver program and contains no direct support for serial, USB, parallel or any other sorts of devices. Therefore there is no "protocol" defined. FSUIPC provides an interface for programs to get information in and out of FS. That's it. You have to program the rest in any way you like. When I hve accomplished 1) I'd like to start off simple, by using ready made controls like the COM radio increment. FS itself already contains such controls. Say I'd like two buttons connected to the Arduino to increment the COM1 frequency. I notice two controls I probably should be able to use1030 Com1 use whole inc 1032 Com1 use fraq inc How should the string containing the 1030 control be formatted? There's no strings because there's no protocol. Those numbers are Control Numbers which can be written to FSUIPC offset 3110 to get FSUIPC to invoke the appropriate FS controls. Please download and study the FSUIPC SDK. There's a complete list of supported offsets contained therein. Apart from the list of additional controls added by FSUIPC (those in the 1000 - 5000 range, etc), which are listed in the Advanced Users manual, there are many hundreds already built into FS and listed in the "List of FSxxxx contorls" you will find installed alongside that document. These numbers are the same as used by FS internally, and assigned to buttons and keypresses as recorded in the FSUIPC INI file when assigned in FSUIPC's menus. 2b) How to read back the COM1 frequency from FSUIPC to the display? My guess is that offset 034E would be the one? And again: how to format the request? "Requests" to read and write FSUIPC offsets are made using the API (Application Programming Interface) defined for it in the SDK. It involves opening a connection, queuing read and write requests, then calling a function to process them. There are examples there, in the SDK. (BTW how is it you found out about offset 034E but found nothing about how to read and write offsets?) Regards Pete Link to comment Share on other sites More sharing options...
fikkaud Posted September 6, 2010 Author Report Share Posted September 6, 2010 Thanks for your swift reply. You have to write your own driver program, interfacing to FSUIPC as described in the FSUIPC SDK and supported by the various language packages therein. You seem to misunderstand FSUIPC's function. FSUIPC is not a hardware driver program and contains no direct support for serial, USB, parallel or any other sorts of devices. Therefore there is no "protocol" defined. FSUIPC provides an interface for programs to get information in and out of FS. That's it. You have to program the rest in any way you like. Aha..... Glad you got me sorted on this one... I see the path ahead for interfacing now. FS itself already contains such controls. :D Sure but, it's not educating me in the ways of FSUIPC Those numbers are Control Numbers which can be written to FSUIPC offset 3110 to get FSUIPC to invoke the appropriate FS controls. Please download and study the FSUIPC SDK. There's a complete list of supported offsets contained therein. I aplogize, but I did not see the connection to offset 3110 for the controls listed "Requests" to read and write FSUIPC offsets are made using the API (Application Programming Interface) defined for it in the SDK. It involves opening a connection, queuing read and write requests, then calling a function to process them. There are examples there, in the SDK. (BTW how is it you found out about offset 034E but found nothing about how to read and write offsets?) I'm learning, I'm learning. And I've been reading up for a full week. But as long as I haven't been able to interface with FSUIPC, I'm not able to make it do stuff I want it to. So it's been all theory, and no testing/experimentingfor me. Again, I apreciate your time, and I've been corrected and directed in the right direction Cheers Audun Link to comment Share on other sites More sharing options...
Pete Dowson Posted September 6, 2010 Report Share Posted September 6, 2010 I did not see the connection to offset 3110 for the controls listed You need familiarisation with the Offsets, rather than with the "controls" -- i.e. completely different documentation. Controls are really meant for assignment to buttons and keys, generally not used via the FSUIPC applications interface where, for most things, there are better, more direct, methods. The 3110 offset is a "get out" for some actions which cannot be achieved more directly. That's all. I'm learning, I'm learning. And I've been reading up for a full week. But as long as I haven't been able to interface with FSUIPC, I'm not able to make it do stuff I want it to. So it's been all theory, and no testing/experimentingfor me. Which is why example programs are provided, and sources for those, and even the source for the Library providing the C interface to FSUIPC. There's also the utility program FSInterrogate which is provided so you can investigate the offsets and see how things work. Regaerds Pete Link to comment Share on other sites More sharing options...
fikkaud Posted September 6, 2010 Author Report Share Posted September 6, 2010 Just an update...... Just had a 'simbuilders moment'. A small step for most of you, but a giant step for me. Downloaded an app called 'CH Comm', which gives me an ASCII interface to FSUIPC via serial (or virtual com USB). Made my little Arduino board manipulate ALT in AP, and changing freq in the com radios :D My snowball has finally started rolling. Let's hope it keeps the momentum without too many crashes. Eventually it will probably start rolling uphill again...... but I'll rather not think of it now., Cheers Audun Link to comment Share on other sites More sharing options...
Pete Dowson Posted September 7, 2010 Report Share Posted September 7, 2010 Just had a 'simbuilders moment'. A small step for most of you, but a giant step for me. Downloaded an app called 'CH Comm', which gives me an ASCII interface to FSUIPC via serial (or virtual com USB). Interesting. Do you have a link for it to share with others? [LATER] Ah. Is it CHCOMM3A? From http://www.flightsim.com/kdl.php?fid=101190 ? That' so long ago I forgot all about it. And I've never looked at it before. Glad it suits your needs anyway! Regards Pete Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now