Skip to content
Recovering a Stuck Betaflight Serial Connection

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_TELEM

Cause. 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 textModeFix
CLI prompt not received … Buffer: "#"Stuck in CLIReplug USB
No such file or directoryPath movedRe-enumerate /dev/ttyACM*
Device or resource busyPort heldfuser, close the holder
Zero bytes, no error at allWrong CLI entrySend a bare #, no line ending
USB ID is 0483:df11Board is in DFUReplug without holding boot
MSP times out but CLI works fineNot a faultSee MSP over USB
Check the USB ID before diagnosing anything else — it settles several of these at once. 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.

Last updated on