Marc Stephens Posted October 1, 2019 at 09:26 AM Posted October 1, 2019 at 09:26 AM Hello, With the new audio codec coming out I have decided to move away from fsinn and use v-pilot. I am looking at how to control the Stby/mode C/Ident externally to v-pilot. I have done some research and have found that it is possible via SimConnect using the Squawkbox client data area. What is this client data area? How do I access it? Is there a guide as to how to set this up? I have looked but have not yet found anything. Many thanks Marc Link to comment Share on other sites More sharing options...
Andreas Fuchs Posted October 1, 2019 at 11:20 AM Posted October 1, 2019 at 11:20 AM Hi Marc, without knowing what SIM and setup you are using, I guess that it will just work out of the box. Have you tested vpilot already with your SIM? You should be able to install and use it in parallel to FsInn. Cheers, Andreas Member of VATSIM GermanyMy real flying on InstagramMy Twitch streams of VATSIM flights and ATC Link to comment Share on other sites More sharing options...
Trevor Hannant Posted October 1, 2019 at 12:18 PM Posted October 1, 2019 at 12:18 PM It will also depend on the aircraft you’re using - some in-cockpit controls send Mode c/ident messages through to vPilot and therefore the network, others don’t. Trevor Hannant Link to comment Share on other sites More sharing options...
Ross Carlson Posted October 1, 2019 at 01:11 PM Posted October 1, 2019 at 01:11 PM If you were able to control the transponder mode with FSInn, it should work with vPilot as well. Is that not the case? Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy Senior Controller, Boston Virtual ARTCC Link to comment Share on other sites More sharing options...
Marc Stephens Posted October 1, 2019 at 05:27 PM Author Posted October 1, 2019 at 05:27 PM Thanks guys for your responses, apologies for my lack of info. So I am in the middle of building a sim cockpit panel based on Carenado's A36 Bonanza. I am currently flying FSX but am planning on making the move to p3d as the future is 64 bit. I am interfacing my hardware to fsx via arduino & link2fs. I would like to be able to be able to select stby/mode c using a switch and ident using a button. Fsinn has a settings page where I could select either a key press or a joystick button to trigger mode c. I did try using Link2fs to connect a switch to a key press and although windows was detecting the key press it would not work in fsinn. I did have a look to see if the aircraft transponder would trigger mode c in vpilot but it did not work. Hope that all makes sense. Many thanks Marc Link to comment Share on other sites More sharing options...
Ross Carlson Posted October 2, 2019 at 02:32 AM Posted October 2, 2019 at 02:32 AM Your best bet would be to use FSUIPC to set the offsets. That is much simpler than using the SimConnect client data area. Is FSUIPC an option for you? Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy Senior Controller, Boston Virtual ARTCC Link to comment Share on other sites More sharing options...
Marc Stephens Posted October 2, 2019 at 03:54 PM Author Posted October 2, 2019 at 03:54 PM (edited) Hi Ross, It's not at the minute but only because I do not own a registered version but I have not yet bought it as I have not yet needed the registered version. Thinking about it, I coud be wrong but there is a section in Link2fs with an FSUIPC offsets page, I'm not sure if it needs a registered version to work or not. So are you saying that vpilot will recognise a switch using fsuipc offests? I am not against getting the registered version if I have to. I have a LIST OF fsuipc's offsets so will have a play and see what happens. Many thanks Marc Edited October 2, 2019 at 04:14 PM by Guest Link to comment Share on other sites More sharing options...
Ross Carlson Posted October 2, 2019 at 04:06 PM Posted October 2, 2019 at 04:06 PM Okay, sounds good. If you don't end up going the FSUIPC route, let me know and I'll [Mod - Happy Thoughts]ist you with the SimConnect client data area setup. Note that there is an undocomeented plugin interface for vPilot if you want to go that route. If you can develop a .net [Mod - Happy Thoughts]embly, you can build a vPilot plugin, which gives you the ability to control the transponder, connect/disconnect, among other things. Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy Senior Controller, Boston Virtual ARTCC Link to comment Share on other sites More sharing options...
Ed Wilson Posted December 16, 2019 at 10:48 PM Posted December 16, 2019 at 10:48 PM I am interested in information regarding using SimConnect in C/C++ to interact with vPilot. I have read the docomeentation for vPilot and can find no SDK information at all. Where can I locate SDK info for external control from an addon such as an aircraft? Thank you Ed Wilson Gauge Programmer Link to comment Share on other sites More sharing options...
Ross Carlson Posted December 16, 2019 at 11:04 PM Posted December 16, 2019 at 11:04 PM Hi Ed, The reason you can't find any docomeentation for vPilot SDK is because the transponder control stuff is part of the Squawkbox SDK. vPilot just supports it, so that aircraft written to support the Squawkbox transponder offsets will inherently work with vPilot. Here's where the Squawkbox offsets are defined: http://squawkbox.ca/doc/sdk/fsuipc.php Also, Pete Dowson added functionality to FSUIPC such that the values of all the Squawkbox offsets are copied to/from a SimConnect CDA (Client Data Area) so that the offsets can be written to or read from via SimConnect as well as via FSUIPC, as long as FSUIPC is running. The name of that CDA is "SquawkBox Data". That should get you started ... let me know if you have any questions. Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy Senior Controller, Boston Virtual ARTCC Link to comment Share on other sites More sharing options...
Ed Wilson Posted December 21, 2019 at 11:22 PM Posted December 21, 2019 at 11:22 PM Thank you for your response. I got the Mode C and Ident to function. Now I'm trying to get the SELCAL notification to work... I hear the SELCAL tone in vPilot... but I never see the notification from the client data. Ed Wilson Gauge Programmer Link to comment Share on other sites More sharing options...
Ed Wilson Posted December 29, 2019 at 04:34 AM Posted December 29, 2019 at 04:34 AM At this point, I am unable to get current data settings from Squawkbox Data. I can tell vPIlot to turn on/off Mode C. I can tell vPilot to IDENT. However, at no time can I see that Mode C is active via SimConnect and Squawkbox Data. I also can not see IDENT active, nor COM transmit active. I don't see running nor connected. In short, no part of the Squawkbox Data area is usable for determining the state of the interface. This is using current version of vPilot. This is the code I used to connect and set up the data: hResult = simConnect->MapClientDataNameToID("SquawkBox Data", SQUAWKBOX_DATA); simConnect->AddToClientDataDefinition(SQUAWKBOX_DATA_ID_RUNNING, 0, 1); simConnect->AddToClientDataDefinition(SQUAWKBOX_DATA_ID_CONNECTED, 1, 1); simConnect->AddToClientDataDefinition(SQUAWKBOX_DATA_ID_TRANSPONDER_MODE, 17, 1); simConnect->AddToClientDataDefinition(SQUAWKBOX_DATA_ID_ATC_PING, 18, 1); simConnect->AddToClientDataDefinition(SQUAWKBOX_DATA_ID_IDENT, 19, 1); simConnect->AddToClientDataDefinition(SQUAWKBOX_DATA_ID_COM1_VOICE_ACTIVE, 20, 1); simConnect->AddToClientDataDefinition(SQUAWKBOX_DATA_ID_COM1_VOICE_RECEIVE, 21, 1); simConnect->AddToClientDataDefinition(SQUAWKBOX_DATA_ID_COM1_VOICE_TRANSMIT, 22, 1); simConnect->AddToClientDataDefinition(SQUAWKBOX_DATA_ID_COM2_VOICE_ACTIVE, 24, 1); simConnect->AddToClientDataDefinition(SQUAWKBOX_DATA_ID_COM2_VOICE_RECEIVE, 25, 1); simConnect->AddToClientDataDefinition(SQUAWKBOX_DATA_ID_COM2_VOICE_TRANSMIT, 26, 1); simConnect->AddToClientDataDefinition(SQUAWKBOX_DATA_ID_ATC_PING_COUNT, 27, 1); simConnect->AddToClientDataDefinition(SQUAWKBOX_DATA_ID_MESSAGE_RECEIVED, 28, 1); simConnect->AddToClientDataDefinition(SQUAWKBOX_DATA_ID_SELCAL_NOTIFICATION, 29, 1); simConnect->AddToClientDataDefinition(SQUAWKBOX_DATA_ID_TEXT_TYPE, 32, 1); simConnect->AddToClientDataDefinition(SQUAWKBOX_DATA_ID_TEXT_AREA, 33, 65); simConnect->RequestClientData(SQUAWKBOX_DATA, SQUAWKBOX_REQUEST_ID_RUNNING, SQUAWKBOX_DATA_ID_RUNNING, SIMCONNECT_CLIENT_DATA_PERIOD_ON_SET, SIMCONNECT_CLIENT_DATA_REQUEST_FLAG_CHANGED); simConnect->RequestClientData(SQUAWKBOX_DATA, SQUAWKBOX_REQUEST_ID_CONNECTED, SQUAWKBOX_DATA_ID_CONNECTED, SIMCONNECT_CLIENT_DATA_PERIOD_ON_SET, SIMCONNECT_CLIENT_DATA_REQUEST_FLAG_CHANGED); simConnect->RequestClientData(SQUAWKBOX_DATA, SQUAWKBOX_REQUEST_ID_TRANSPONDER_MODE, SQUAWKBOX_DATA_ID_TRANSPONDER_MODE, SIMCONNECT_CLIENT_DATA_PERIOD_ON_SET, SIMCONNECT_CLIENT_DATA_REQUEST_FLAG_CHANGED); simConnect->RequestClientData(SQUAWKBOX_DATA, SQUAWKBOX_REQUEST_ID_ATC_PING, SQUAWKBOX_DATA_ID_ATC_PING, SIMCONNECT_CLIENT_DATA_PERIOD_ON_SET, SIMCONNECT_CLIENT_DATA_REQUEST_FLAG_CHANGED); simConnect->RequestClientData(SQUAWKBOX_DATA, SQUAWKBOX_REQUEST_ID_IDENT, SQUAWKBOX_DATA_ID_IDENT, SIMCONNECT_CLIENT_DATA_PERIOD_ON_SET, SIMCONNECT_CLIENT_DATA_REQUEST_FLAG_CHANGED); simConnect->RequestClientData(SQUAWKBOX_DATA, SQUAWKBOX_REQUEST_ID_COM1_VOICE_ACTIVE, SQUAWKBOX_DATA_ID_COM1_VOICE_ACTIVE, SIMCONNECT_CLIENT_DATA_PERIOD_ON_SET, SIMCONNECT_CLIENT_DATA_REQUEST_FLAG_CHANGED); simConnect->RequestClientData(SQUAWKBOX_DATA, SQUAWKBOX_REQUEST_ID_COM1_VOICE_RECEIVE, SQUAWKBOX_DATA_ID_COM1_VOICE_RECEIVE, SIMCONNECT_CLIENT_DATA_PERIOD_ON_SET, SIMCONNECT_CLIENT_DATA_REQUEST_FLAG_CHANGED); simConnect->RequestClientData(SQUAWKBOX_DATA, SQUAWKBOX_REQUEST_ID_COM1_VOICE_TRANSMIT, SQUAWKBOX_DATA_ID_COM1_VOICE_TRANSMIT, SIMCONNECT_CLIENT_DATA_PERIOD_ON_SET, SIMCONNECT_CLIENT_DATA_REQUEST_FLAG_CHANGED); simConnect->RequestClientData(SQUAWKBOX_DATA, SQUAWKBOX_REQUEST_ID_COM2_VOICE_ACTIVE, SQUAWKBOX_DATA_ID_COM2_VOICE_ACTIVE, SIMCONNECT_CLIENT_DATA_PERIOD_ON_SET, SIMCONNECT_CLIENT_DATA_REQUEST_FLAG_CHANGED); simConnect->RequestClientData(SQUAWKBOX_DATA, SQUAWKBOX_REQUEST_ID_COM2_VOICE_RECEIVE, SQUAWKBOX_DATA_ID_COM2_VOICE_RECEIVE, SIMCONNECT_CLIENT_DATA_PERIOD_ON_SET, SIMCONNECT_CLIENT_DATA_REQUEST_FLAG_CHANGED); simConnect->RequestClientData(SQUAWKBOX_DATA, SQUAWKBOX_REQUEST_ID_COM2_VOICE_TRANSMIT, SQUAWKBOX_DATA_ID_COM2_VOICE_TRANSMIT, SIMCONNECT_CLIENT_DATA_PERIOD_ON_SET, SIMCONNECT_CLIENT_DATA_REQUEST_FLAG_CHANGED); simConnect->RequestClientData(SQUAWKBOX_DATA, SQUAWKBOX_REQUEST_ID_ATC_PING_COUNT, SQUAWKBOX_DATA_ID_ATC_PING_COUNT, SIMCONNECT_CLIENT_DATA_PERIOD_ON_SET, SIMCONNECT_CLIENT_DATA_REQUEST_FLAG_CHANGED); simConnect->RequestClientData(SQUAWKBOX_DATA, SQUAWKBOX_REQUEST_ID_MESSAGE_RECEIVED, SQUAWKBOX_DATA_ID_MESSAGE_RECEIVED, SIMCONNECT_CLIENT_DATA_PERIOD_ON_SET, SIMCONNECT_CLIENT_DATA_REQUEST_FLAG_CHANGED); simConnect->RequestClientData(SQUAWKBOX_DATA, SQUAWKBOX_REQUEST_ID_SELCAL_NOTIFICATION, SQUAWKBOX_DATA_ID_SELCAL_NOTIFICATION, SIMCONNECT_CLIENT_DATA_PERIOD_ON_SET, SIMCONNECT_CLIENT_DATA_REQUEST_FLAG_CHANGED); simConnect->RequestClientData(SQUAWKBOX_DATA, SQUAWKBOX_REQUEST_ID_TEXT_TYPE, SQUAWKBOX_DATA_ID_TEXT_TYPE, SIMCONNECT_CLIENT_DATA_PERIOD_ON_SET, SIMCONNECT_CLIENT_DATA_REQUEST_FLAG_CHANGED); simConnect->RequestClientData(SQUAWKBOX_DATA, SQUAWKBOX_REQUEST_ID_TEXT_AREA, SQUAWKBOX_DATA_ID_TEXT_AREA, SIMCONNECT_CLIENT_DATA_PERIOD_ON_SET, SIMCONNECT_CLIENT_DATA_REQUEST_FLAG_CHANGED); Ed Wilson Gauge Programmer Link to comment Share on other sites More sharing options...
Ross Carlson Posted December 29, 2019 at 05:50 PM Posted December 29, 2019 at 05:50 PM Hi Ed, vPilot only supports a few of the SquawkBox CDA offsets. They are: 0 - running 1 - connected 17 - transponder mode 19 - ident trigger It does not support the others. I'm not sure why you would be able to set the transponder mode and trigger an ident, but not be able to see the "running" and "connected" bytes toggle. It might be that you are only asking SimConnect to tell you about changes to values. You might need to fetch the current value when your aircraft first loads, and then subscribe to changes. Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy Senior Controller, Boston Virtual ARTCC Link to comment Share on other sites More sharing options...
Ed Wilson Posted December 31, 2019 at 04:53 AM Posted December 31, 2019 at 04:53 AM I switched to reading directly via FSUIPC offsets. I see 0 for running, 0 for connected, 1 for mode c, 0 for ident. I have confirmed this by having FSUIPC display those offsets in a window in the sim. Clearly something isn't working as expected. As for the other offsets... the ones that I would be interested in are the COM transmit indications and the SELCAL notification. vPilot is seeing these events (obviously)... it would be useful if they were set accordingly at their offsets. Ed Wilson Gauge Programmer Link to comment Share on other sites More sharing options...
Ross Carlson Posted December 31, 2019 at 10:38 PM Posted December 31, 2019 at 10:38 PM I'm afraid I don't know why you aren't seeing the values change. This has been working well in vPilot for years. Note that you should not expect to see a change in the ident offset when you ident using the button in the vPilot UI. The offset in the CDA is only for triggering an ident, not for signaling that ident is active. Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy Senior Controller, Boston Virtual ARTCC Link to comment Share on other sites More sharing options...
Kyle Weber Posted January 8, 2020 at 02:02 AM Posted January 8, 2020 at 02:02 AM On a bit of a similar note, I have a third party aircraft that seems to have a transponder gauge not functioning correctly. It seems to constantly send a squawk standby command to vPilot, regardless of how I have the transponder knob set in the cockpit. Is there a way to completely ignore transponder variables from the aircraft and operate the transponder in "manual" mode via vPilot? The option to force the transponder in mode C when airborne sort of works, but still not able to control it on the ground then. Thanks. Kyle Weber Minneapolis ARTCC, VATUSA, C3 / P2 Link to comment Share on other sites More sharing options...
Ross Carlson Posted January 8, 2020 at 02:08 AM Posted January 8, 2020 at 02:08 AM No, there's no way to have vPilot ignore the squawkbox offsets ... sounds like that aircraft has a bug, if it is constantly setting the standby value in the squawk mode offset. Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy Senior Controller, Boston Virtual ARTCC Link to comment Share on other sites More sharing options...
Kyle Weber Posted January 8, 2020 at 02:23 AM Posted January 8, 2020 at 02:23 AM sounds like that aircraft has a bug, if it is constantly setting the standby value in the squawk mode offset. Yes, I agree. Trying to figure out any kind of work around. Kyle Weber Minneapolis ARTCC, VATUSA, C3 / P2 Link to comment Share on other sites More sharing options...
Ed Wilson Posted January 22, 2020 at 03:48 PM Posted January 22, 2020 at 03:48 PM I would hazard that if the aircraft in question doesn't see vPilot as active/connected that it may not allow the transponder to change state. Just a thought. Ed Wilson Gauge Programmer Link to comment Share on other sites More sharing options...
Recommended Posts