Recovering a Stuck Betaflight Serial Connection
Three different problems all present as “the board stopped responding”. They are distinguishable by the exact error, and they have nothing to do with each other.
Mode transitions
Understanding which mode the board is in explains all three:
stateDiagram-v2
[*] --> Normal
Normal --> CLI: any CLI command
CLI --> Normal: exit
CLI --> Stuck: session ends without exit
Stuck --> Normal: USB replug
Normal --> MassStorage: msc
MassStorage --> Normal: USB replug
Normal --> Normal: save → reboot
note right of Stuck
MSP times out here.
Only a power cycle recovers.
end note
The three failure modes
Symptom. MSP requests time out, and any attempt to run a CLI command fails with:
Error: CLI prompt not received within 5000ms. Buffer: "#"Running status may also show CLI among the arming disable flags:
Arming disable flags: RXLOSS CLI DSHOT_TELEMCause. The board entered CLI mode and never left. Betaflight only exits CLI on an
explicit exit or a reboot. While in CLI it does not speak MSP at all, so binary reads
time out. Worse, a tool trying to enter CLI sends # and waits for a fresh prompt — which
never comes, because the board is already at one. The stale # in the buffer is the
signature.
Fix. Unplug and replug the USB cable. Closing and reopening the serial port on the host does not help — the state lives in the firmware, not the connection.
Prevention. End every CLI interaction with exit (or save, which reboots).
Telling them apart quickly
| Error text | Mode | Fix |
|---|---|---|
CLI prompt not received … Buffer: "#" | Stuck in CLI | Replug USB |
No such file or directory | Path moved | Re-enumerate /dev/ttyACM* |
Device or resource busy | Port held | fuser, close the holder |
| Zero bytes, no error at all | Wrong CLI entry | Send a bare #, no line ending |
USB ID is 0483:df11 | Board is in DFU | Replug without holding boot |
| MSP times out but CLI works fine | Not a fault | See MSP over USB |
0483:5740 is the normal virtual COM port, 0483:5720 is mass storage, and 0483:df11 is
the DFU bootloader. Note that EdgeTX radios use the same STM32 IDs, so a handset plugged
in alongside the quad is easy to mistake for the flight controller. Match on the serial
number, not the vendor ID.That last row matters: on this build most MSP reads time out permanently by firmware version, not by connection state, and no amount of replugging changes it.