#Firmware upload on startup after module reconnected to USB

1 messages · Page 1 of 1 (latest)

lean sky
#

Hi there, I have noticed a strange behavior with my 2 Arduino Pro Micro modules. Steps:

  1. Plug in the module, MobiFlight (10.3.0) recognizes the module and asks to upload firmware, proceed with the upload and all good at the end.
  2. Close MobiFlight.
  3. Unplug and plug the module in again, same cable, same USB port, same assigned COM number .
  4. Run MobiFlight, the module is recognized, but like it is the first time MobiFlight sees it, asks for a firmware upload (proceed again and it is successful).

This does not happen after restarting MobiFlight with the module plugged in. I've tried different cable just in case.

Is this correct behavior, or am I missing something?

Thank you

outer mesa
#

Is this happening only the first time you uploaded the firmware or does it happen after that too?

#

Because the pro micro does have a "virtual com port" that is used only for flashing when it is in bootloader mode, and this extra com port appears only when MobiFlight sets the board up for flashing.

If you have two boards, it could perhaps be that two of them appear at once, and only one of the flash processes succeeds and then the other arduino pro micro gets flashed after you restart?

lean sky
outer mesa
#

hmm, do you have any other software running that might connect to the Arduino? Also, just to make sure, can you share a link to the website or such you got it from, just to check the model of the board?

#

also, are you familiar with Arduino IDE or using a serial port monitor / terminal to connect to the serial port? We could check, once the board is flashed with Mobiflight, to connect to it via serial connection and see that it responds to the connection properly.

#

@lean sky wait, you mean the board does work ok, but if you reconnect it, MF asks to upload firmware as if it was a new blank Arduino?

#

So if you open Moniflight Modules, you see it as Moniflight Micro, and then unplug and connect again, it shows as "Compatible"?

outer mesa
#

But if you restary Moniflight and don't reconnect the board, it works fine?

outer mesa
#

hmm, I wonder if there is some other software that connects to it, or something interferes with the "handshake" when the board connects.

lean sky
#

Nothing to the reset pi, rotary encoder, a push button and 7 segment display

outer mesa
#

I will tag @dusky parrot if he has any ideas.

What is connected to it? Nothing on the reset pin?

#

also, can you share a link to the board, just to check that it is the pro micro we know - there are so many similarly named Arduinos these days with new boards it's sometimes hard to know what is what

#

Can you enable logging in MobiFlight, open the Mobiflight modules dialog and reconnect the board, and share the log?

#

I will try to ask our bot to share a link to instructions

sharp grailBOT
#

To help diagnose your problem we need to see your MobiFlight logs. Follow the steps in this wiki to get them: Providing logs from MobiFlight

GitHub

MobiFlight is an open source project that allows you to create your own home cockpit for your favorite flight simulator in a flexible, affordable and extremely user-friendly way. - MobiFlight/MobiF...

lean sky
#

thanks for looking into it. I'll send logs later in the day.

outer mesa
#

yeah, that board looks like what I expect too, I too have several (of the usb micro b variant but I would not think the usb C version if you have that would be in any way different)

#

lets see what the logs say, it might give some clue

lean sky
#

What level of logs should I set it to

dusky parrot
#

Hmhm, no idea for now.
@lean sky set log level to debug please

chrome fiber
#

@dusky parrot Debug is best when troubleshooting firmware upload stuff as it will include the full text of what avrdude outputs.

#

Info will show the board detection but won't show the avrdude output

lean sky
#

Hi again, this is copy of logs after unplugging and plugging back in a module

dusky parrot
#

Hmhm, it looks like the connector doesn't receive the board information for some reason.
Is it a plain installation or did change/add any json file?

#

Hmhm, can't be because it works until the board gets disconnected.
No idea for now.

chrome fiber
#

I'm betting it is a faulty cheap board from AliExpress. We are flashing it fine. If it gets detected as a new board next time then the board didn't keep the flash

supple ingot
#

Maybe similar to this issue, I have observed that a Samsung old tablet connected to the same hub, interferes with how Mobiflight recognizes a Pro Micro board in my setup. Disconnecting the tablet makes the issue disappear.

outer mesa
#

yeah try direct to pc and see if it makes a difference if you now have a hub

lean sky
lean sky
chrome fiber
#

There's not much more we can suggest unfortunately. It is clearly flashing as far as mobiflight is concerned. There are so many random Arduino clones on AliExpress of varying quality.

lean sky
outer mesa
#

@lean sky you could test with arduino ide if you can flash one of the example sketches like the blink and see if that succeeds, but yeah, I think Neil is right