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! 

Go to page 1Go to page 012Go to page 2Go to page 2
Avatar
Piotr66
Posts: 11
I have weird problem with Arduino. I have 2 Mega plates and it was working with MobiFlight without any problem. Suddenly I saw this:



I choose OK and





But look at Information box:



When I try to reload config



and I get this:



I was looking for solution on this forum and found advice to clear the EPROM. When I did this at first time everything look fine. I'm able to add some devices and upload configuration to Mega. But when I exit MobiFlight all problem start again!

Well, the Arduino is broken I thought. I took another Mega plate and… the same situation. I change USB cable and… the same situation. I change computer and… the same situation. So I bought brand new Arduino Mega and… the same situation!

So I think that this is not a Arduino problem. Somebody have any idea what is going on?
Please, help me. All my flight stuff is anusless now.
:scared:
[Last edited by Piotr66, 2020-03-08 08:38]
2020-02-28 09:48
Avatar
thatchi
Posts: 151
Backup ur config files. Delete all trace of MF. Reinstall MF. Reload ur config files.
Good luck.
2020-02-28 17:32
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3527
Supporter
Hi

Apollogy for your trouble.....

Badly i never got those problems..... Testing a lot things for other users and work with different Arduinos..... But on my system all work fine from first moment till now... Never got a issue warning.

Possible Issues:

1. Admin mode.
Whatever not official recommend by Sebastian.... I use always Admin Mode for every Programm. No disadvantge is possible.... So a bit more click work but maby it helps.

2. Not use Windows protected Folders
I see in your adress of Ardunino IDE you install it in "/programmfiles x86" This i a windows protected Folder. Specialy when you also intall Moiflight or your Sim in those Folders you can get in bigger trouble.
Its high rcommend to install ALL Programm yo like to work with, in self created folders or much better in a own Harddsic or partition like d:/

3. Check for UpToDate Versions.
Arduino IDE, Mobiflight, FSUIPC, Simulator, AddOn Aircraft

4. ( Most possible problem maby) Corrupt MFMC File.
If Problem occure always when you try to upload a old file...... Maby this file is broke.
Please confirm you be able to upload Devices by hand.
For testing..... Create a Device like a switch.... Upload it..... If it work then SAVE this new situation to a mfmc File..... EEPROM the Board..... and Upload the "new" Device File.
If problem is gone then simply your old Device Backup File is broke.
Good Luck !
2020-02-28 19:55
Avatar
Piotr66
Posts: 11
Hi!

First of all - thank You guys for willing to help me.

iconpizman82:


1. Admin mode.


Not a issue.

iconpizman82:


2. Not use Windows protected Folders


This is not windows protected folder. I'ts made by me on different disk than system is.

iconpizman82:


3. Check for UpToDate Versions.


Arduino IDE, Mobiflight - it's up to date
FSUIPC, Simulator, AddOn Aircraft - it makes no odds at this stage

iconpizman82:


4. ( Most possible problem maby) Corrupt MFMC File.


I've already done that.

Right know problem is still there, but I discover something interesting.

1. I had delete MobiFlight Mega.mfmc and cleared the EPPROM.
2. Arduino recognise new device without firmware and I agree to upload. Upload was successful.
3. Add LED device, upload and save config.
4. Exit MobiFlight, unpluged Mega nad plug it again, run MobiFlight.
5. Everythig is OK, Mega is recognised and LED device is still in config.
6. Add Encoder1 device, upload and save config.
7. Exit MobiFlight, unpluged Mega nad plug it again, run MobiFlight.
8. Everythig is OK, Mega is recognised and all devices is still in config.
9. Add Encoder2 device, upload and save config.
10. Exit MobiFlight, unpluged Mega nad plug it again, run MobiFlight.
11. Everythig is OK, Mega is recognised and all devices is still in config.
12. Add LED 7-segment device in chain (3pcs), upload and save config.
13. Exit MobiFlight, unpluged Mega nad plug it again, run MobiFlight.
14. Everythig is OK, Mega is recognised and all devices is still in config.
15. Add LCD display device, upload and save config.
16. Exit MobiFlight, unpluged Mega nad plug it again, run MobiFlight.
17. And... the problem shows up. Mega not recognized, uploading firmware, but not properly (Firmware n/a in information box).

Now, when problem shows up at beging I was just adding LCD display to new board.
And after that, all my tryings I ALWAYS start with adding LCD display.

So problem is still up but it's relate only to LCD display.
Very odd because before the problem I had working config with LCD display.

What do You think know?
2020-03-01 00:48
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3527
Supporter
Thats Strange.

Sebastian change some settings in last patch to implement analog Pins..... Maby he broke something in the IC2 Logic.

Just to confirm a last fact.....

You not "block" the IC2 Pins by your other config you create prior ?

If you create at first for example a LED you can choose Pin 19 or 20 and it is then a simple Digital IO Pin.
If you later create a LCD Display i think this occure in a Error.... Cause then the firmware will change internal the Pins to IC2 Ports and same time the other Config will use it as Digital IO.
Good Luck !
2020-03-01 05:29
Avatar
Piotr66
Posts: 11
No, all devices which was added use Pins from 2 to 10.

After clearing EPPROM and starting again from beginning (LED -2, LED-7seg,encoder,encoder, button – 10) after adding LCD display 0x27, 8x2, after plug-out and plug-in Mega – problem appears as always.

The same situation is on another computer.
2020-03-02 14:15
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3527
Supporter
Please wait for a reply from Sebastian.
Maby also Stephan like to check this.

Please also be prepared to send us your File ( The MFMC File) to reproduce the situation...... Maby including a step by step tutorial to got the same situation like on your computer.

Thank you !
Good Luck !
2020-03-02 18:08
Avatar
StephanHo
Moderator
From: EDDG, Germany
Posts: 1525
Supporter
How long (number of characters) are the names of the devices? If the names are longer than 8 characters, please try to use names with max. 8 characters.
If that also does not work it would be the best would be to send your *.mfmc-file to stephanho@t-online.de
I'll have a look on it and check it with my board.
Grüße,
Stephan
2020-03-02 23:31
Avatar
Piotr66
Posts: 11
Sorry for no answer, I'm sick, I will try to answer today,
2020-03-05 09:03
Avatar
StephanHo
Moderator
From: EDDG, Germany
Posts: 1525
Supporter
Get well soon!
Grüße,
Stephan
2020-03-05 22:47
Avatar
Piotr66
Posts: 11
iconStephanHo:

Get well soon!


Danke schön!

I’m just all stupid now and I don’t understand what is going on…
iconStephanHo:

How long (number of characters) are the names of the devices? If the names are longer than 8 characters, please try to use names with max. 8 characters


Yes, I was using device name longer then 8 character. It wasn’t very long (LedDisplay1, LedModule1, encCOM1_MHz etc., but still, it was longer than 8 character.
“Aha!”, I thought, it may be possible cause…
So I did this:
1. Clear EPPROM
2. Delete file MobiFlight Mega.mfmc
3. First run and uploading firmware was made.
4. Add LED as ledTaxi (pin 2), upload, save mfmc¸ exit, unplug Mega and plugin, starting MFConnector
5. Add LED 7-Seg as ledM_1 (pin 3,4,5), upload, save mfmc¸ exit, unplug Mega and plugin, starting MFConnector
6. Add encoder as eC1_MHz (pin 6,7), upload, save mfmc¸ exit, unplug Mega and plugin, starting MFConnector
7. Add encoder as eC1_kHz (pin 8,9), upload, save mfmc¸ exit, unplug Mega and plugin, starting MFConnector
8. Add button as bC1_swap (pin 10), upload, save mfmc¸ exit, unplug Mega and plugin, starting MFConnector
9. Add LcdDisplay as lcd1 (0x27,16x2), upload, save mfmc¸ exit, unplug Mega and plugin, starting MFConnector

And it works! So i add second LcdDisplay as lcd2 (0x26,24x2), upload, save mfmc¸ exit, unplug Mega and plugin, starting MFConnector.

Still working properly. Just to be sure, I repeat this “process” using old names: Output, LedModule1, encCOM1_MHz, encCOM1_kHz, butCOM1_swap and finally LcdDisplay1.
And… every think work fine. Add LcdDisplay2 and still working.

So I don’t know what to think about it.
If you still want to send to You requested information, I will do it with pleasure.
It’s working now, but I worrying that same beautiful day it stop with same problem. There must be some cause.
2020-03-06 06:09
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3527
Supporter
As a user i agree.... It happen also to me, that i do 2 times absolutly the same but finaly earn two different results.
From Point of view of a programmer i can not agree. Two times the same code must result in the same action.

I will say.... Maby the difference was not visible.
For example nobody realy knows how a "space" behind the name is handle by the System .... So when you write deviceneame ... for example "TEST1" BUT you press a Space at the End... Like "TEST1_" .... Is this Space ignored.... or is it finaly used in the system and maby occure in a error.
Same can happen when you use a dot and a decimal wrong way..... Maby one is working and the other will not. In german keyboard they are side by side and looks nearly identical.

So i think...... Your testruns was not 100% identical. There must be a difference normaly.


***********


Last Note:
You NOT need to Restarts after ever single device..... I´m not sure if you do this only temporary for the testing procedure OR if you think this is needed basicly.
Its correct to make a Restart after uploading the new Stuff ( before you firsttime work with a Display, butten etc)
BUT Its no problem if you upload for example 10 LED Device 10 Buttons and 2 Displays in only one sequence.
So create all Devices in a row.... click one time "Upload" ... And then make one Restart of Mega and Mobiflight !
Good Luck !
2020-03-06 09:27
Avatar
Piotr66
Posts: 11
iconpizman82:

As a user i agree.... It happen also to me, that i do 2 times absolutly the same but finaly earn two different results.
From Point of view of a programmer i can not agree. Two times the same code must result in the same action.


I fully understand You, I’m programmer to. Not a full job, but sometimes I'm writing small aplications (C#, C++, mainly DB connection ) and I know something about it. That’s why I wrote “There must be some cause”, some reason for such a behavior.
iconpizman82:

You NOT need to Restarts after ever single device.


Yes, I know. I was doing it only for test purposes, because earlier I have few situation where I was adding a few devices with success, but after plug-out and plug-in Mega, the problem was showing up. That’s why I was doing it step by step.

Thank You for Yours support.
2020-03-06 10:24
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3527
Supporter
Just to clearify .... I´m NOT a programmer !

Sorry.... Here translation was wrong. I just do the support. Programming is 100% Sebastians part.
Good Luck !
2020-03-06 10:37
Avatar
Piotr66
Posts: 11
I haven’t wait too long. Yesterday problems return.
In the config from latest test I removed few devices and leave only encoder and both lcd displays, then I add led and exit MobiFlightConnector. When I run again MobiFlightConnector a beautiful information window showed up: “There are Arduinos connected to Your PC – do you want to upload the MobiFlight Firmware to them?”.

So I :
1. Deleted MobiFlight Mega.mfmc
2. Cleared EPPROM and upload firmware
3. Changed Mega name to MobiMega_lights
4. Added lcd display as lcd1 (0x26, 8x2), upload, save MobiMega_lights.mfmc and exit.
When I run again MobiFlightConnector, a “beautiful information window” showed up again.

Next try:
1. Deleted MobiFlight Mega.mfmc
2. Cleared EPPROM and upload firmware
3. Changed Mega name to MobiMega_lights
4. Added encoder as encHPa (2,3), upload, save MobiMega_lights.mfmc and exit.
When I run again MobiFlightConnector everything was OK. So I add lcd1 (0x26, 8x2), upload, save MobiMega_lights.mfmc and exit. But when I run again MobiFlightConnector, a “beautiful information window” showed up again. ☹

At the same Mega my Arudino scripts are working without any problem, but I don’t use EPPROM. I will try write something and try out.
Please! Help mi!
StephanHo, can I send you *.mfmc-file?
2020-03-08 08:42
Go to page 1Go to page 012Go to page 2Go to page 2