#Always have to Update Firmware on connect

1 messages · Page 1 of 1 (latest)

vast bobcat
#

I am running 10.3.0 of Mobi flight and on both my Mega and Uno (Both being originals), I have to constantly update firmware when I connect them.
Firmware update is always successful, and after this I can use them.

I have been reading here on the discord server and on the forums that these issues have been popping up in the past (from time to time) over the development.

Was just wondering if there is any setting in Mobiflight or in the Avrdude parameters that I should change to try to solve it?

Thanks for all responses and I hope that I was clear enough in my description.

gray sundial
#

Usually this is an indicator of the boards being bad

#

Enable debug logs and upload them here so we can take a look. The bot is about to provide instructions.

livid flameBOT
vast bobcat
#

Here is the logs when I connect the Mega and update the firmware:

gray sundial
#

Thanks, that all looks as expected. So next time you run mobiflight it tries to upload the firmware again?

vast bobcat
#

Yes, every time I connect the same Mega it gives me the "New firmware available" and successfully uploads the firmware. Then I can access the configured modules on the board.

gray sundial
#

Very strange

#

I can see in the logs why we don't think it has firmware but I don't know why it would happen

opal rain
#

when you upload the firmware, are all the devices recognized in the onboard configuration without further action?

#

The serial number is intact?

gray sundial
#

This is what the logs show when we first ask the board to give us its info:

08/06/2024 18:38:20(69): MobiFlightModule.GetInfo(): Retrieved board: Arduino Mega 2560, Arduino Mega 2560, /, .

Notice there's no firmware version or serial number returned. After flashing we get this back:

08/06/2024 18:38:35(395): MobiFlightModule.GetInfo(): Retrieved board: MobiFlight Mega, MobiFlight Mega, 2.5.1/2.5.1, SN-960-4B7.

opal rain
#

yes, but is that SN the same or a new one?

vast bobcat
gray sundial
#

when you do upload the firmware again, you don't have any orphaned serials dialog correct? It's the same serial number every time

#

it's just missing at the start

vast bobcat
#

let me double check quickly to make sure.

opal rain
#

If it is the same SN, then it is not a bad EEPROM as all the data is retrieved correctly after reuploading the firmware.

#

I have similar behavior on a couple of my boards, but generally I get them to connect after I shutdown MF. power cycling them and restarting Mobiflight.

#

I don't know why this happens

vast bobcat
#

Click the manage orphaned serials does not do anything.

I can verify that the serial SN-960-4B7 is returned evertime I update the firmware.

gray sundial
#

ok, so it's not bad eeprom

vast bobcat
#

To be honest, I get the same with my Uno - And I am starting to wonder if it is something with my computer? I have no idea what would be causing that though.

#

I have used both the Uno and Micro Pros in the past successfully.

gray sundial
#

Not convinced it's something to do with your computer. @opal rain you say you see the same thing sometimes, with the serial number staying the same?

#

@vast bobcat can you try something for me? Close mobiflight, run it, and when you are prompted to update the firmware don't upload it

#

then after mobiflight runs, disconnect the usb from the mega, and plug it back in. Just leave mobiflight running while you do this

vast bobcat
#

Will do right away.

gray sundial
#

then check in the modules dialog to see if it detected the board properly when you plugged it in

vast bobcat
#

Interesting! So I did what you said. I started MF, plugged in the Mega, cancelled update, kept the Mega connected, restarted MF and MF found it and the orphaned serial box appeared, I pressed OK. MF did then not ask me to update the firmware.

gray sundial
#

ok but that's quite what I was hoping for 😅

vast bobcat
#

Haha. ok. 😄

gray sundial
#

do this:

  1. Run Mobiflight
  2. When it asks to update firmware say no
  3. Leave Mobiflight running
  4. Disconnect the USB from the Mega
  5. Reconnect the USB to the Mega
  6. Open the modules dialog and see if the mega shows up properly
#

don't close mobiflight between steps 4 and 5

vast bobcat
#

So I did this. Remember that always when I connect the Mega I get the "Update firmwaree". But when I cancel out of it this is what see:

opal rain
gray sundial
opal rain
#

when this happens, the boards appear as compatible in MF Modules, just as reported by the OP.

gray sundial
vast bobcat
#

Everytime I connect the Mega, cancelling the update, even with MF running (or restarting) it I get the same screenshot as above without serial.

opal rain
#

they won't come back if MF is running.

opal rain
#

just to test if your issue behaves like mine.

gray sundial
opal rain
#

I believe it is a bug in the recognition protocol, but I know zero about it.

vast bobcat
#

Hmmmm...Now I did what Jamie said and MF now recognized the board at start without any firmware forcing....

#

Let me try this again, just to be sure.

gray sundial
#

yeah, ok. sounds like we all have the same issue sometimes

opal rain
#

I just note this happens way more often in the latest official release

vast bobcat
#

yeah, not the Mega is regonized at start. Let me do the same with the Uno here to see if I can make it work.

#

Hmmm...And now the Uno is recognized at startup.

#

Let me see if I can get me Micro Pro going as well. (I have had problem with them in the past, and was thinking about starting a thread to get some help with them).

opal rain
#

Pro Micros have a particular behavior when updating firmware in that they create a temporary serial port to do the upload. So they may require a reset after uploading.

vast bobcat
#

I assume that might be a different thread all together but I get an "access denied" on port during the flashing process on my Micro Pros. (But they are identified in MF, I just can't update the firmware).

opal rain
gray sundial
opal rain
#

tomato tomahto

#

lol

gray sundial
#

😅

vast bobcat
#

I read somewhere that there also is a timing issue. When I use the avrdude manually (outside of MF) but with the exact same parameters, I tried to change the attempts to more that "1", but that is skipped.

So I am not sure if it actually times out before it swaps. But If you guys have any insight to how to do it I would be so happy.

No other boards are connected except for the PM.

gray sundial
#

it's not a flashing problem, it flashes fine. the problem is when we ask the board for its version and serial number. mobiflight seems to get nothing back.

vast bobcat
opal rain
#

I don't usually encounter this problem with my two Pro Micros.

vast bobcat
#

That is what happens to my Pro Micro

opal rain
#

The pro micro when reset, gives you a window of just a few seconds in which to initiate upload of a new firmware

gray sundial
#

For your pro micro, it looks like it's not reconnecting with a different com port for flashing like it should. what kind of pro micro is it? genuine or some clone?

vast bobcat
#

This is actyally a clone. Works with the Arduino IDE though.

gray sundial
#

it's not behaving correctly as far as I can tell from the logs. One thing to try: look for it in device manager and uninstall it, then plug it in again

#

and then try mobiflight again

vast bobcat
#

Pops up as a Arduino Leonardo in the Device Manager...

gray sundial
#

yeah uninstall it

vast bobcat
#

yeah, still getting nothing from it. Would you recommend that I use Ardunio Nanos instead if I need a small board, since the Pro Micros seems to be so finickyy? @gray sundial

opal rain
#

I haven't had much trouble with Pro Micros

#

although not used by Mobiflight, I kind of like their flexibility in being used in HID type projects like joysticks and keyboards.

vast bobcat
#

I agree, I have used them for that specific things. I just ordered some nanos to see how they work work MF. I am not making huge cockpits, but smaller panels, so the small factor is of interest.

opal rain
#

I have used Nanos and they carry their own set of issues too. It depends on whether you get CH340 chips or not, whether these chips are counterfeit or not and whether the bootloader is new or old.

#

All nano clones from China will most likely have the CH340 chip.