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
Fiver
Posts: 6
Hi All, I am a new member. I have downloaded V9.0 but when I try to install it I get the following message. I would have posted a screen shot but not sure how to include it within the message

"Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately. Version string portion was too short or too long"

When I click continue MF opens and it connects with the AUno OK and when MSFS is running the Sim Status turns green but it remains in offline mode so I cannot test it with the sim.

I am using an Arduino Uno for testing and learning purposes which maybe the problem, but I see others on Youtube using the Uno without problems. I would use a Mega but am unable to purchase one because we are in full lockdown where I live and have been for nearly three months, even the postal services have been stopped so I cannot go out to buy or have anything delivered. Hopefully it is something else and not a AUno issue so that I can use my remaining lockdown time to learn how to use MF before splashing out on a Mega.

I hope some of you can help me.
2021-09-10 05:24
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Welcome to Mobiflight !

About Pictures:
This is bad here in Forum. Please join also our DISCORD Group ! https://discord.gg/99vHbK7
There we can share Pics, Vids and Files..... And we can talk together for free and share our Screens or Webcams.
Best way to make support for us and best way to get support for you !

About Problem:

1. Offline Mode.
This is not related to a Sim Connection!. Offline Mode is optional and controlled by the User !
Check the "Lamp" Symbol next to the text in the Status bar. If it is illuminated (Yellow) the Offline Mode is active. If it´s grey then its disabled.
You can change this in the Settings Tab ( Checkmark).

2. UNO
I not know if its currently compatible. In the past it was working but mostly only in a verry limmited way. ( May the Youtube Videos are Older)
So.... We need to find out whats the Problem.

Test 1:
Start MF without the UNO is connected. If the Issue warning no longer comes up then test again WITH the UNO..... If it brings the Error again you have confirmed the UNO is the Problem !

If this is true..... Then we need to find out if there is a Problem with the UNO basically OR if may your UNO is just corrupted and need a Reset !

Test 2:
USe the Arduino IDE and upload a sketch onto it named "EEPROM CLEAR"
Run the Board once again ( Disconnect and Reconnect the USB ) after you upload it so the EEPROM Sketch runs one time.
THIS delete the Whole UNO EEPROM area and set it back to Release State.

Then connect it and start MF..... If your lucky there was just a issue on the UNO and now MF detect it, upload Firmware and you can work with it.

************
Last Note: Try to get a Mega ! The Uno (Whatever you can solve your current problem) is not a good tool to handle Mobiflight. If you like to use the full range of MF Features you need finally a Mega.
Good Luck !
2021-09-10 14:22
Avatar
Fiver
Posts: 6
Thanks Pizzman82 for the prompt response. Clearing the EEPROM was all that was needed to get rid of the error message. However I found also that I had to load FSUIPC7 to be able to do any programming, for some reason the FSUIPC status light does not come on if I do not, it either remains unlit or comes up with a a yellow flag. Only when I load FSUIPC7 separately do I get FSUIPC Status (MSFS) green. I also tried deleting FSUIPC7 after using it for a while to see what happened and MF ran OK on its own, but after about 40 mins or so contact with FSUIPC was lost and the only way I could get it back was to load FSUIPC7 again.

Anyway the main thing is that it has let me play with it and so far I have been able to get two LED outputs and a button input working from the sim which for me felt like an achievement, my next challenge is a rotary encoder but not sure I have the skills to master that. Anyway I now have some thing to play with for the remainder of the lockdown until I can get out and get a Mega.

So from this 73yr old simmer again many thanks, I am sure I will have more questions yet to come.
2021-09-11 11:23
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Nice.....

Just a note....

FSUIPC is no "must Have". In the past for Older Sims it was needed ( FSX/P3D) ..... But for FS2020 we build a new Tool ( WASM Module via SimConnect )

So right.... If you not install/run FSUIPC7 then the "checkmark" in the lower corner is greyed or have a yellow falg (this show you there is no connection to FSUIPC).
BUT
If you not like to use FSUIPC features and you use the WASM Elements (More posibilitiys like FSUIPC by the way) then you can simply ignore it !

In easy words.... Mobiflight run on FS2020 without a FSUIPC connection or fully without a FSUIPC installed..... This is just Optional !
Good Luck !
2021-09-11 16:21
Avatar
Fiver
Posts: 6
Many thanks again for putting me right. I uninstalled FSUIPC7 and tried again with my UNO and I got two buttons with associated LED's to work with out it, so I am quite happy but I have noticed that it can be a bit temperamental at times. The LED's seem to be OK but when working with the buttons if I add another button to the ones I have already loaded they tend to stop or need to be reset which can be a bit of a pain. I suspect that it is the limitation of the UNO but since I cannot buy a Mega for potentially another month of more because of the C19 lockdown I am restricted to what I have. I am still struggling to get a encoder to work as well. My first few attempts failed so it is back to the drawing board and do a bit more reading.

I have played with MF and an encoder for the best part of the day with my UNO and have to admit defeat. This could be a limitation of the UNO but I need someone to confirm it. I have a encoder on a circuit board with a switch. If I connect up the switch, upload it to the UNO and set it up in MF to say operate the landing lights, it does so, works fine. However as soon as I upload the encoder part to the UNO without actually connecting the encoder itself to the UNO the switch does not work, If I then remove the encoder from the UNO the switch works again so it is either something in the UNO or in the MF Sketch that does not like the encoder. Any thoughts on this would be appreciated.

Again thanks for your excellent advice, I feel that as small as it is, the progress I am making has been good, as they say we learn by our mistakes and I can assure you I am making many so hopefully I will progress :-).
[Last edited by Fiver, 2021-09-13 14:30]
2021-09-13 10:10
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi again !

Basically..... 99% of USers ( inlculding myself and the whole base MF Team) can not help you..... Cause we not use UNO´s anymore ( i fully no longer own a UNO and throw it in the trash years ago).

So.... For sure. Your descripted problems "can" occure in case of the UNO..... OR..... They are just wrong techniques and wrong understanding from MF.


What i can offert you..... Join DISCORD. There we can get in a better contact. E.g. via Voice Call or shared screen.
If i "see" what you do and understand the situation, then i can tell you if everything is all right and the final problem is the UNO OR if you make a misstake!


****************

About Situation:
Do you correctly use different Pins in the Setting ?
A Encoder is a Encoder..... A Button is a Button.
Its no mater for MF if the Button is physical combind into the Encoder..... Its the same (electrical) like a Button that is located 5 meters away.

So.... Correct electrical Setup..... The Encoder ( Single Shaft with one Button) must have 4 or 5 Pins ! ( 4 Pins with a shared GRD, 5 Pins with 2 Individual GRD)
The GRD ( or the 2 GRD´s in a 5Pin Encoder) must wired to a GRD Pin of the Arduino you use.
The Encoder Pins ( Channel A and Channel B ) must be wired to 2 individual Pins on the Arduino ( E.g. Pin D5 and D6) ..... And these Pins must be set ( Device Settings Menue) as ENCODER.... Correctly for A and B .
Finally the Button must be wired to another free Pin on the Arduino (e.g. D7) and THIS Pin must be assigned as a BUTTON in the Device Settings.


****
At Last:
Enable ( Just for thjis Testing periode) the "Logging Mode" in Typ DEBUG ( Settings Tab)
Then you can easy "see" in the Logging Window if a Input ( Button Encoder and so on ) is detected.
Good Luck !
2021-09-15 00:18
Avatar
Fiver
Posts: 6
Hi Again, I verified my setup exactly as you laid out in your post and I retested the encoder and switch with the debug logger on. The result was exactly the same as I reported before with nothing working, not even the button. After uploading to the UNO the debug logger kept repeating the same two lines from 3:54:17 until I pressed "Run" then nothing no matter what I did with the encoder or button, nothing registered.

Debug Log
9/17/2021 3:54:27 PM(53): Fsuipc2Cache::connect() - No FSUIPC found.
9/17/2021 3:54:27 PM(49): ExecutionManager.autoConnectTimer_Tick(): AutoConnect Sim
9/17/2021 3:54:17 PM(41): Fsuipc2Cache::connect() - No FSUIPC found.
9/17/2021 3:54:17 PM(39): ExecutionManager.autoConnectTimer_Tick(): AutoConnect Sim
9/17/2021 3:54:15 PM(831): SimConnectCache::ClearSimVars . SimVars Cleared
9/17/2021 3:54:05 PM(245): SimConnectCache::Exception ALREADY_CREATED
9/17/2021 3:54:05 PM(242): SimConnectCache::Exception ALREADY_CREATED
9/17/2021 3:54:05 PM(239): SimConnectCache::Exception ALREADY_CREATED
9/17/2021 3:54:05 PM(54): SimConnectCache::ClearSimVars . SimVars Cleared
9/17/2021 3:54:05 PM(52): Fsuipc2Cache::connect() - No FSUIPC found.
9/17/2021 3:53:59 PM(698): Save config: 14
9/17/2021 3:53:59 PM(667): Uploading config (Part): 8.5.6.0.Encoder:1.7.Button:
9/17/2021 3:53:59 PM(636): Reset config: 13
9/17/2021 3:53:59 PM(437): Uploading config: 8.5.6.0.Encoder:1.7.Button:
9/17/2021 3:53:54 PM(219): Set Debug in ComboBox: logLevelComboBox

I then removed the encoder device and re-uploaded the UNO with just the Button remaining which work immediately, see debug log below:-

Debug Log
9/17/2021 3:57:16 PM(507): Config found for Button: Button (RELEASE)@SN-89d-772
9/17/2021 3:57:16 PM(77): Executing OnPress: Button@SN-89d-772
9/17/2021 3:57:16 PM(72): Config found for Button: Button (PRESS)@SN-89d-772
9/17/2021 3:57:13 PM(335): Config found for Button: Button (RELEASE)@SN-89d-772
9/17/2021 3:57:12 PM(997): Executing OnPress: Button@SN-89d-772
9/17/2021 3:57:12 PM(992): Config found for Button: Button (PRESS)@SN-89d-772
9/17/2021 3:57:01 PM(911): SimConnectCache::Exception ALREADY_CREATED
9/17/2021 3:57:01 PM(907): SimConnectCache::Exception ALREADY_CREATED
9/17/2021 3:57:01 PM(903): SimConnectCache::Exception ALREADY_CREATED
9/17/2021 3:57:01 PM(725): SimConnectCache::ClearSimVars . SimVars Cleared
9/17/2021 3:57:01 PM(722): Fsuipc2Cache::connect() - No FSUIPC found.
9/17/2021 3:56:55 PM(36): Save config: 14
9/17/2021 3:56:55 PM(5): Uploading config (Part): 1.7.Button:
9/17/2021 3:56:54 PM(974): Reset config: 13
9/17/2021 3:56:54 PM(781): Uploading config: 1.7.Button:
9/17/2021 3:56:47 PM(677): Set 0 in ComboBox: mfEncoderTypeComboBox
9/17/2021 3:56:44 PM(303): Set Debug in ComboBox: logLevelComboBox

I find the results very strange but do not have the knowledge necessary to interpret them hopefully they make sense to you and it gives you a clearer understanding of my set up. There is nothing else connected to the UNO but the decoder and button. For now I am only persevering with the UNO as a means of learning how to use MF because it is all I have, I will get a Mega once our lockdown is lifted and we can go out shopping and our postal service is returned.

So please bear with me if you can, your excellent support is really very much appreciated.
2021-09-17 11:26
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
I not fully understand the logging here.
iconQuote:

9/17/2021 3:53:59 PM(667): Uploading config (Part): 8.5.6.0.Encoder:1.7.Button:
.....
9/17/2021 3:56:55 PM(5): Uploading config (Part): 1.7.Button:


Never think about this "1.7" Does it means "Arduino #1 Pin #7" ??

May you can confirm the Device Setting Tab..... Tell me what Pins are used for Encoder A / B and for Button ..... And if you wire the electrical lines ALSO on same Pins ?

*****************
About Basic Problem from UNO

The Firmware have a size of ~~32.000 Bytes. The MEga got a Mem of 256k the UNO "just" 32k
Additional the Mem is used for chache data and for the internal RAM, too..... So we can normaly not use the full range and must remain some Kbytes empty.

In the past MF Firmware was smaller..... But with each new release, new featrues come into the software. Like Analog Input and Shift Registers in the last Patch.
Means Firmware size grown up and in case it was already verry close to the end may with MF v9.0 we again overrun the border.
This can occure in strange situations.... E.g. that a Button work, but a Encoder would not in case the firmware is corrupted and the encoder Part is still no longer exist.

*****
What you can do ( until Covid Lockdown)
As i said above.... Come on DISCORD !
There are Power Users who reworked the Firmware for there own usage ( to handle it e.g. on the ProMicro Arduinos that also have only 32kb Ram)
They simply remove parts that are not needed for them..... E.g. they delete the whole ServoMotor Support. Then you can not use a Servo BUT the frimware is going smaller and work 100% fine for all other elements now.

I recommend to get in contact to them..... May you can use there Firmware for your UNOm too..... Or may they can hack a firmware for you personally that work for the moment untill you got a Mega!
Good Luck !
2021-09-17 16:41
Avatar
Fiver
Posts: 6
Hi very briefly I wired the encoder as you suggested A on Pin5, B on Pin6 and the button on pin 7. The following line of code appeared when I saved/uploaded the devices to the UNO
9/17/2021 3:53:59 PM(667): Uploading config (Part): 8.5.6.0.Encoder:1.7.Button: In my ignorance I read it that pins 5 & 6 were loaded under encoder and pin 7 under button as it said, what the numbers 8 & 0 under encoder or the number 1 under button represent I do not know. After I removed the encoder I then saved/uploaded only the button to the UNO and got the following line.... 9/17/2021 3:56:55 PM(5): Uploading config (Part): 1.7.Button: This seemed to conform to me that the numbers 5,6 and 7 were indeed the actual pin numbers I used.

I think I will hold now until I get a Mega, details of the one I plan to buy is shown below, is this version OK?:-

The Vietduino Mega 2560 (Arduino Mega 2560 Compatible) circuit is researched and manufactured by MakerLab.vn based on the prototype of the Arduino Mega 2560 circuit, the Vietduino Mega 2560 circuit has the same function, size, shape and usage. like the Arduino Mega 2560 circuit but improved to eliminate the 3 main disadvantages that this circuit has:

Electricity supply:
The Arduino Mega 2560 circuit uses a LM1117 5VDC linear power converter IC with low output current and very hot when the input voltage is high (the differential voltage is converted to heat, if there are additional modules attached, the circuit will burn at 12VDC. ).
The Vietduino Mega 2560 circuit uses a pulse source circuit with a flexible input voltage range of 6~35VDC, a maximum output current of up to 1.5A, a low heat source circuit with high conversion efficiency and outstanding energy saving ability. dominant.
The 3.3VDC power switch IC of the Arduino Mega 2560 circuit has a maximum output of 150mA, while the Vietduino Mega 2560 circuit is 700mA, which is enough to power current popular Wifi modules such as ESP8266, ESP32,... need any additional power circuitry.

Charger IC:
The Arduino Mega 2560 circuit uses the ATmega16U2 Microcontroller to emulate the USB UART function, often losing the firmware when used for a long time or burning the quartz, resulting in not receiving the USB port.
The Vietduino Mega 2560 circuit uses a genuine imported CP2102 dedicated USB UART functional IC for stability and durability, because it is a functional IC and has a built-in quartz inside, so it will avoid the error cases of Arduino Uno board.

USB port power isolation function when external power supply:
In the Arduino Mega 2560 Clone circuit versions made in China (price less than 300,000 VND, no paper box, genuine Arduino Sticker), the USB port power isolation function when supplying external power from the Vin pin or the DC jack does not working (can measure power at USB port when external power supply to verify).
The Vietduino Mega 2560 circuit completely overcomes this drawback with the ability to isolate the USB port automatically when supplying external power to help protect your computer's USB port more safely.
Specifications:

Fully compatible in function, size, shape and usage with the Arduino Mega 2560.
The CP2102 dedicated UART interface and charging IC is compatible with all operating systems Windows, Mac, Linux, ..
Main Microcontroller: ATmega2560
Quartz speed: 16Mhz
Circuit feeder:
5VDC from Micro USB port.
External power from round DC jack or Vin pin from 6~35VDC.
5VDC pin output current when powered from:
USB port: 500mA
DC or Vin port: Max 1.5A
Number of Digital pins: 54 (supports 15 PWM pins)
Analog pins: 16
Maximum output current on GPIO: 20mA
Maximum output current on 3.3VDC power supply pin: 700 mA (Lastest version)
Flash memory capacity: 256 KB, 8 KB used by bootloader.
SRAM: 8 KB
EEPROM: 4 KB
Integrate more buttons Switch S8 connected to pin D8.
Dimensions: 101 x 53mm
2021-09-19 17:58
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hmmm.

Fully unless in my opinion.

We not power the MEGA external. ( I know some users do, but we official not recommend it.)
We use our Megas "just" with the 500mA Power from USB. Also users with a full B737 Cockpit and hudnrets of LED´s and dozens of Motors do this.

For Sure.... High Power Devices ( Like Steppers and Servos) are not powerd by the Mega itself..... Here we use External Power.... BUT We not external power the Mega.... We external Power the Device ( e.g. Motor) itself..... the Mega still is powerd just via USB with 500mA from the Computers PSU ( Or via a powerd USB Hub)

I not know your "special" Mega..... But i can tell you also Advanced USers with full cockpits just use the 8 US$ China Clone Megas. Yes.... Some are low quality.... But its no mater. Order simply 2-3 as Backup. If a Mega really get broke you connect a new one and flash firmware and device backup and after 5 Mins all is working again.

I just can tell you my setup experinece..... i got 10 Megas and all are Clones.... And all work from the first day till now!
Good Luck !
2021-09-20 00:24
Avatar
Fiver
Posts: 6
OK thanks for your comments, all understood. I will be back when I get my Mega(s) hopefully within the next month.
2021-09-20 04:29
icon