INAV USB MSC Mode
Starting from INAV 2.3.0, the flight controller (FC) supports USB MSC (Mass Storage Class) mode, which allows the onboard SD card or built-in flash memory to be mounted as a computer file system for convenient reading and management of flight controller logs (such as Blackbox logs).
I. How to Use
Steps to Enter MSC Mode:
- Connect the flight controller to the computer
- Open INAV Configurator or serial terminal tool and enter
CLI - Enter the command: msc (the flight controller will restart and connect as a USB storage device)
- Close the CLI tool and wait for the system to recognize it (approximately 10-15 seconds)
- Access and copy files through the system file manager, for example: cp /run/media/<username>/<device name>/LOGS/LOG00035.TXT ~/Downloads/
- After completing the operation, safely eject the flight controller storage device through the system
- Power off/on to exit MSC mode
II. File Structure
- SD card method: Read/write (deleting logs requires manual file deletion)
- Built-in flash method: Read-only (deleting logs requires erasing Flash through Configurator or CLI)
- Two file views are provided: Single merged log: inav_all.bbl, segmented logs: such as inav_001.bbl, inav_002.bbl
- May include a readme file: readme.txt
Read/Write Performance Comparison
| Method | Speed | Example Data (~56MB log) |
|---|---|---|
| USB MSC Mode | ~340 KB/s | Takes approximately 2 minutes 40 seconds |
| Card Reader | ~19 MB/s | Takes approximately 2 seconds |
📌 If the SD card is in a physically inconvenient location to remove, using MSC mode is an efficient compromise.
File Integrity Verification
Use the comparison command to confirm that the log content copied by both methods is identical:
cmp LOG_MSC.TXT LOG_SD.TXT
md5sum LOG_MSC.TXT LOG_SD.TXTConsistent output indicates no errors.
Log Decoding Analysis
Use the INAV-specific tool blackbox_decode to decode and verify:
blackbox_decode --stdout --merge-gps /tmp/msclogs/LOG00035.TXT > /dev/nullIf the output statistics, frame rate, and frame loss rate are all normal, it indicates that the log was read correctly.
————This article is referenced from the INAV official website: https://github.com/iNavFlight/inav/blob/master/docs/USB_Mass_Storage_(MSC)_mode.md