Module Not Recognized - MobiFlight/MobiFlight-Connector GitHub Wiki

Arduino board is not recognized by MFConnector correctly

If you are having problems getting Mobiflight to recognize your supported board for the first time, and the firmware upload fails, here is what you need to do.

What is the issue?

Mobiflight Connector uses the Arduino board's USB vid/pid (Vendor ID/Product ID) to identify the type of board that is connected. These codes are supposed to be unique and each product manufacturer should ideally, request a new vid/pid for their USB connected product. Unfortunately, this not always happens. In particular, Chinese clones of Arduino boards, have become quite popular for Mobiflight use, due to their relative low prices and complete compatibility with their original counterparts. The problem is that these boards use a different chip for USB communications, called a CH340, which totally works for its intended purpose, but it reports the same vid/pid (vid 1A86/pid 7523) in the case of clone Mega, Uno, or Nano boards. This condition makes it impossible for Mobiflight to tell them apart, when first connected.

UPDATE JAN 13 2023 As of Mobiflight version 9.6.0, the board detection has been improved to recognize the ambiguous VID/PID codes of the CH340 chip used in Chinese clones of the Mega, Uno and Nano boards. If the CH340 VID/PID is detected, you now have the option of manually selecting which board firmware version to install.

We should also mention that some duplicate vid/pid codes have also been detected for FTDI chips.

When an ambiguous vid/pid code is detected, Mobiflight will assume the connected board is a type Mega 2560 board. In the past, this was not a problem because the support for other smaller boards like Uno and Pro Micro, was only experimental. Since late 2021, the support for Uno and Pro Micro boards was made official and the issue is now commonly encountered with Uno and Nano clone boards.

Once the Mobiflight firmware is successfully flashed to any board, Mobiflight will correctly identify that board by the firmware version and serial number stored inside each board, regardless of its vid/pid codes.

Solution to the problem

Windows should be able to recognize that your board is a serial USB device. If not, you may need to first, install the CH340 or other appropriate device driver to your Windows installation.

The solution is basically to temporarily allow the vid/pid code to be assigned to the clone board type. This is achieved by editing the configuration files that store this information. These files are located in the Mobiflight app folder, under the Boards subfolder. You will need a text editor program, preferably a code editor like Notepad++.

Steps to solve:

  1. Go to the Mobiflight\Boards folder. It should contain several files with the json extension. One for each type of supported board.

  2. Make a backup of the files for "arduino_mega.board.json" and "arduino_uno.board.json".

  3. Open arduino_mega.board.json with your text or code editor app.

  4. Locate the "HardwareIds" section.

    image

    Note the line containing the "^VID_1A86&PID_7523",

  5. Select this line and copy it to the clipboard with Ctrl-C. Delete it from the mega file.

  6. Open arduino_uno.board.json in your text/code editor.

  7. Locate the same "HardwareIds" section in this file.

    image

  8. Paste the copied information from the Clipboard to the json file

    image

  9. Save the file. You are done.

Restart Mobiflight Connector and now it should correctly identify your board as an Arduino Uno. You may want to restore the files from the backup copies you made at the beginning.

Closing notes:

The procedure shown is specific for the 1A86/7523 vid/pid combination, which is known to be the source of the issue, most of the time. It is possible that other vid/pid codes could be mistaken by Mobiflight. It is a moving target. If you find other codes that give you problems, please report those issues in the support forum or our Discord server.

ENJOY.