INAV USB Usage Guide
About 2 minINAVINAVUSBDFU固件刷写MSC 模式Zadigstm32flash
I. USB DFU Mode Flashing Guide
Basic Flashing Steps
- Enter DFU mode. Using a configurator to flash will typically automatically enter DFU mode. If entering DFU mode manually via button, check "No reboot sequence".
- Baud rate is irrelevant to DFU. When upgrading firmware, it is recommended to check "Full chip erase".
1.1 Platform-specific Instructions
1. Linux (requires configuring udev permissions)
Method 1: General permission rules
Create file /etc/udev/rules.d/45-stdfu-permissions.rules with the following content:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666"Method 2: Using user groups (e.g., plugdev for Ubuntu)
(echo "# DFU access"
echo "SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE="0664", GROUP="plugdev"") \
| sudo tee /etc/udev/rules.d/45-stdfu-permissions.rules > /dev/null
sudo usermod -a -G plugdev <你的用户名>Take effect after restart or logout/login.
2. Windows
Issue: Configurator cannot access DFU device
The solution is to use the Zadig tool to replace the driver:
zadig-2.3.rar
- Download and open Zadig.
- Select Options → List All Devices.
- Select the device STM32 BOOTLOADER.
- Select driver WinUSB (v6.x.x.x).
- Click Replace Driver.
- Restart the configurator.

macOS / USB-C Notes
- It is recommended to use a USB-C to USB-A adapter or a hub with an A port.
- Pure USB-C cables cannot automatically determine master/slave mode and are prone to connection failures.
Using dfu-util for flashing (Linux CLI tool)
- Convert firmware .hex to .bin format:
objcopy -I ihex inav_x.y.z_NNNNNN.hex -O binary inav_x.y.z_NNNNNN.bin- DFU flashing:
dfu-util -d 0483:df11 --alt 0 -s 0x08000000:force:leave -D inav_x.y.z_NNNNNN.bin- Flashing with full erase:
dfu-util -d 0483:df11 --alt 0 -s 0x08000000:mass-erase:force:leave -D inav_x.y.z_NNNNNN.bin⚠️ Notes
- In DFU mode, the FC listens on multiple ports. If devices that continuously send data (such as GPS/receiver) are connected, they will interfere with flashing. Please disconnect these devices or turn off their power.
- Old devices or damaged USB interfaces can be flashed via UART.
UART Flashing Method (using stm32flash tool)
Suitable for devices that do not support DFU or have damaged USB interfaces:
- Erase firmware (assuming UART port is /dev/ttyUSB0):
stm32flash -o -b 57600 /dev/ttyUSB0- Flash firmware .hex:
stm32flash -w inav_x.y.z_NNNNNN.hex -v -g 0x0 -b 57600 /dev/ttyUSB0II. USB MSC Mode Introduction
MSC (Mass Storage Class) mode allows you to mount the flight controller board as a USB drive on your computer to directly read log files, such as:
- SD card log files
- Internal flash memory logs
SD Card vs Internal Flash Memory Differences
| Item | SD Card | Internal Flash (Virtual File System) |
| --- | --- | --- |
| Read/Write Permissions | Read/Write | Read-only |
| Log Display | Actual file structure | Merged into single file (inav_all.bb) + other files |
| Deletion Method | Direct file deletion | Must manually erase using configurator/CLI |
Usage Method (entering msc mode)
- Enter CLI mode (via INAV Configurator)
- Enter command: msc; the flight controller will automatically restart and enter MSC mode.
- Close CLI tools including Configurator, CLI, etc.
- Wait for the computer to recognize it as a USB storage device, which usually takes 10-15 seconds.
- Copy log files. You can use the system's built-in file manager or commands such as: cp /media/LOGS/LOG00035.TXT ~/logs/
- After completion, safely eject the device and power cycle the flight controller
Performance Comparison
| Method | Read Speed | Notes |
| --- | --- | --- |
| USB MSC Mode | ≈ 340 KB/s | 55MB log takes approx. 2 min 40 sec |
| Using Card Reader | ≈ 19 MB/s | 55MB log takes only 2 sec |
Although USB MSC is slower, it is still very useful for situations where the SD card is difficult to access/remove.
————This article is cited from the INAV official website: https://github.com/iNavFlight/inav/blob/master/docs/USB_Mass_Storage_(MSC)_mode.md