MobiFlight Community Support

Welcome to the forum for MobiFlight! Feel free to reach out to the community in case you have questions, issues or just want to share great ideas or details about your latest home cockpit project.

You like MobiFlight? Donate via PayPal and support the MobiFlight development. Thanks! 

05/03/2024 - This forum is read-only

The community support for MobiFlight has moved exclusively over to our Discord server. Register for free and enjoy more interactive functions like image and video upload, voice chat. More than 7,000 registered users around the world make it a great experience!

See you on our MobiFlight Community Discord server.

A HUGE Thank You to everyone who participated in the forum, especially obviously to Pizman and Stephan who did an outstanding job over so many years providing an incredible service to the MobiFlight community.

The forum is still providing a lot of good content, hence we keep this information accessible.

icon
Avatar
mmmmm
Posts: 3
Hi,

Are there any plans to run ethernet connection between Mobiflight aplication and arduino or ESP8266?

Recently I've built a wet compass. I used Wemos D1 mini (ESP8266) and SIOC server.
Few lines of arduino code and everything works fine. (only one cable +5V DC coming into the compass enclosure; all communication done over wifi)

It would be very convenient to chose some offsets we are interested in Mobiflight than paste some piece of arduino code and get it working over ethernet/wifi.
2021-02-17 14:51
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
In Theory Yes... But this will not be a supported feature pretty sure....

For a impimentation Sebastian need to include the WiFi System ( Library) in the firmware and must offert this within the GUI of Mobiflight.... And that will not happen i will say.

But for a Programmer this should be possible.

Basicly i alrady think a self Running Programm ( Paralell to Mobiflight) that read Data from Sim and directly send it to the Board you like to use is more porfitable.
BUT there should be also a tricky system that use the current MF System.

Here you must rework the Firmware....
It must be already include the main System.... So Mobiflight Connector detect the Board as a fully compatible Mobiflight Board. So see a Serial Number and MF must "think" it include the whole Firmware.
You must also get sure the whole comunication tool is still working. So Mobiflight must be able to send Raw Data in same way as it do it now..... And the Mega receive the data also same way as today . ( As i know all data is send via a long String Variable )
Finaly you would create a FAKE Device That can include a Value as you need it.... I will say a LCD is maybe the best cause it can include a verry Long String with Chars and Numbers.
At last your code must recive this value and do with it what you like.

Big Question.... Is it possible ( or are you be able) to rework the firmware in a way that it is still detected as a MobiBoard, Have a working Data Transfer and also unclude the needed tools for you expected function like WiFi Library and all the needed calculation code.
Good Luck !
2021-02-17 20:06
Avatar
mmmmm
Posts: 3
iconCode:
//SOLENOID:
//8-AIR/GND SENSOR

#include <ESP8266WiFi.h>

const char* ssid = "xxx";
const char* password = "xxx";
const char* host = "192.168.1.231";  //PROSIM

byte AIR_GND=0; //0-GND, 1-AIR
byte SOLENOID=12; //D6
String line="";

WiFiClient client;
void setup()
{
   
   pinMode(LED_BUILTIN, OUTPUT);
   pinMode(SOLENOID, OUTPUT);
   digitalWrite(SOLENOID, LOW);

  Serial.begin(115200);
  delay(100);
  Serial.println();
  Serial.println("Serial OK");

  Serial.printf("Connecting to %s ", ssid);
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED)
  {
    delay(500);
    Serial.print(".");
  }
  Serial.println(" connected");
  Serial.print("IP Address: ");
  Serial.println(WiFi.localIP());
}

void loop()
{
  
  Serial.printf("\n[Connecting to %s ... ", host);

        if (client.connect(host, 8092))
        {
                Serial.println("connected]");
                client.println("Arn.Inicio:8"); //looking for iocp variable no. 1
                Serial.println("[Response:]");
                
                      while (client.connected() || client.available())
                      {
                        if (client.available())
                        {
                          line = client.readStringUntil('\n');
                          //Serial.println(line);
                          line=line.substring(11,line.length()-2);
                          Serial.println(line);
                        }
                        //////////
                      if (line=="0"){ digitalWrite(SOLENOID, LOW);}
                      if (line=="1"){ digitalWrite(SOLENOID, HIGH);}
                      line="";
                                             
                      }
                client.stop();
                Serial.println("Disconnected");
                
        }
        else
        {
          Serial.println("connection failed!");
          client.stop();
        }
  delay(5000);
}
  

Here is a code I recently wrote to get some data from prosim (air/gnd sensor).
Just a few lines. It works on wemos d1 mini.
It connects to PROSIM usin SIOC server.
The "network" layer in this code is not that much.

If you could some day implement something similar... :)

the whole thing is here:
iconCode:
 client.println("Arn.Inicio:8"); //looking for iocp variable no. 1

you assign for a variable number 8 (set in SIOC) and once it is updated you get it.
2021-02-17 20:27
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Cool System.

But on first view i think this is not a feature we like to support....
BUT i´m not the programmer and maybe Sebastian think different. So you should ask/request this to him personaly! ( Best way is Discord)

About thematic.

What you expect is a different Tool now in the Mobiflight Connector ( PC side) .
So for example a new "Output Device Typ" .
You create a Config that read e.g. a special Offset..... But it should send Information NOT to a Display, LED, Motor or so..... It should provide the Information into a Variable that finaly can be read via a Serial Connection from a "non-Mobiflight Board" via a sketch on that board .

****

But let me ask. Why do you need it if you still got the solution ?

For example in Jeehell airbus FMGS only the basic Funtions are available in the FSUIPC PlugIn.... All other Stuff is in SIOC. So MF Users run Mobiflight with FSUIPC..... But they also Run SIOC in Backround. ( Not with OC Cards.... They use SIOC to read Data and write it to Free Offsets in FSUIPC that are finaly ready again by Mobiflight)

So in your case.... you would use MF and FSUIPC for the "normal" Things... And you run SIOC in Backround for your "special" things.
Good Luck !
2021-02-17 20:46
Avatar
mmmmm
Posts: 3
I'm a newbie in this area. Still learning/searching solutions.

I think SIOC has a limited number of parameters to read (PROSIM->CONFIG->COMBINED CONFIG tab).

I need to get aileron and elevator position this time. I cant find it in COMBINED CONFIG tab (PROSIM).
If I could get all possible FSUIPC offsets via SIOC that would be what Im looking for.

iconQuote:

What you expect is a different Tool now in the Mobiflight Connector ( PC side) .
So for example a new "Output Device Typ" .
You create a Config that read e.g. a special Offset..... But it should send Information NOT to a Display, LED, Motor or so..... It should provide the Information into a Variable that finaly can be read via a Serial Connection from a "non-Mobiflight Board" via a sketch on that board .


If this could be done via ethernet/wifi (instead of serial) (similar to the code I sent above) this would be great :)
2021-02-17 22:19
icon