MobiFlight Connector How does it work - MobiFlight/MobiFlight-Connector GitHub Wiki
The Mobiflight Connector is the user interface to using and configuring Mobiflight. The main purpose of this application is to intelligently connect with your arduino supported boards via their serial port connection on one end, to the flight simulation software on the other end, and be able to send and receive data to and from both the simulation and to the arduino boards. In this way, you can read the status of the airplane, display it, operate knobs, buttons, and toggle switches and send these commands back to the simulator to control the aircraft without using the mouse.
Following, we briefly explain the different pieces of the Mobiflight puzzle to give you an idea of how everything ties together and works. We will not cover any details of how any of these different pieces are used. There are other tutorials for that.
Hardware Management
Your physical control input and output devices: buttons, switches, knobs, potentiometer, leds, 7-segment display modules, etc, are connected to the Arduino micro-controller. These micro-controllers run the Mobiflight firmware to communicate with MFConnector. This firmware is a specially developed Arduino sketch that can talk to a variety of supported devices and relay that information to your PC. We call these boards that have the Mobiflight firmware installed: "Mobiflight Modules".
The MFConnector, running on your PC, is capable of detecting supported boards connected to your PC, uploading the Mobiflight firmware to them, as well as uploading the user-defined device configuration to be used.
When the firmware is first uploaded to a board, MFConnector assigns a serial number to each new board. This serial number is later used to identify each board when MFConnector starts up.
FSUIPC
FSUIPC is a third party software developed by John and Peter Dowson in the late 90s (yeah, it's been around a very long time), that can serve as an intermediate layer to extract information from and send information to different flight simulator software, such as FSX, Prepar3d, Xplane, and MSFS2020. There are different versions of this program to work with the different simulartors. Mobiflight uses Fsuipc to establish communication with the different simulators, prior to MSFS2020.
MOBIFLIGHT WASM MODULE FOR MSFS2020
Fsuipc7 can still be used by Mobiflight to communicate with MSFS2020 and Simconnect. However, in early 2021, Mobiflight developed its own method to communicate with MSFS2020 and Simconnect: a WASM (acronym for "Web Assembly") module. In this new method, the MSFS2020 native RPN events are used directly by Mobiflight when communicating information to and from MSFS2020.
MFMC FILE
A Mobiflight Module stores in its EEPROM the list of the devices connected to it, along with the general purpose input/output (GPIO) pins used, as defined by the user. The user uploads this information to each board using MFConnector. This configuration is sent to MFConnector as part of the normal startup.
In case of any problem, the user can store the hardware configuration of any board to a file in the PC. This file is what we call the MFMC - Acronym for MobiFlight Module Configuration (the acronym is used as the extension in the file name). It is highly recommended that you store all of your boards hardware configurations in this type of file. Users can then load their stored configuration from one board to another.
MCC File
The user creates input configurations that map what simulator control action should be sent for each device action (e.g. button1 press means toggle Parking Brakes). Output configurations are used to extract data from the sim and optionally display it in a device. All input and output configurations, including the serial number of the Mobiflight Module used, are saved to an MCC file (Acronym for Mobiflight Connector Configuration). This acronym is used as the extension to these files.
MCC files allow the user to store multiple configuration profiles for his hardware panels. For example, storing the controls for the FlybyWire A320 airplane in one mcc file, and the controls for the Cessna C152 in another file. Very different airplanes, but can be controlled from the same set of hardware devices.