USB port falling off is not uncommon in flight controllers. If your FC has a broken USB port and can’t connect to Betaflight (or INAV Configurator) and flash firmware, here are some fixes you can attempt to save your FC.
Before you begin, check if you can solder the USB port back on though it’s not an easy soldering job. In my experience, if your USB port fell off, chances are the tiny solder pads are probably ripped and irreparable, but it’s worth checking, flight controllers are expensive these days!
Get some spare USB ports here:
- Female Micro USB connectors: Amazon | Banggood | AliExpress
- Female USB-C Connectors: Amazon | Banggood | AliExpress
Table of Contents
Connecting FC to Computer via FTDI Adapter
If you just want to connect your FC to Betaflight Configurator (or INAV configurator), all you need is just a FTDI adapter (aka serial converter).
Buy an FTDI adapter here:
- AliExpress: https://s.click.aliexpress.com/e/_Dl7MLeF
- Amazon: https://amzn.to/3XJjRVk
It’s a versatile and useful tool to have around, I highly recommend getting one. You can also use an Arduino board loaded with custom code, but it’s a lot more complicated than using a $3 plug-and-play FTDI adapter. Feel free to google it I won’t go into detail here.
Depending on the type of USB connection your flight controller has (i.e. CP2102 or VCP), extra steps might be necessary which I will explain in this tutorial. Almost all modern FC uses VCP connection these days, only some very old FC use CP2102, if you are not sure, this post explains how to identify which one you have.
Old FC with CP2102 Chip
For older FC with CP2102 chip, you just need to connect the FTDI Adapter to UART1 (and only UART1), connect these 4 wires:
- TX to RX
- RX to TX
- 5V to 5V
- GND to GND
Make sure nothing else but the FTDI adapter is connected to that UART.
Then connect the FTDI adapter to your computer, you should see a new COM port appear.
Generally, you shouldn’t need to worry about driver if your computer is already working with your flight controller, which means driver is already installed. But if driver is needed, you will see a warning sign icon on that COM port. You can normally get the driver file on the product page of your FTDI adapter, or simply google the type of adapter you have.
In Betaflight/INAV Configurator, select this COM port and hit the Connect button. That’s it.
FC with VCP
If you bought your FC in the last 4-5 years, it probably uses VCP connection. It’s not as straightforward as CP2102 because hardware UART’s are not necessary enabled for USB connection by default. The good news is, it’s pretty common that flight controllers are shipped with UART1 enabled for MSP (it allows USB connection), so you can try connecting your FTDI adapter to UART1 and see if you can connect to the Configurator. Try other UART if that didn’t work, if you are lucky one of the UART might have MSP enabled.
Make sure nothing else but the FTDI adapter is connected to that UART.
See this example below, UART1 has “Configuration/MSP” enabled on UART1, this allows you to use the FTDI adapter
If none of the UART’s have MSP enabled, this is going to get a lot more complicated.
You will have to erase and flash your flight controller with a custom firmware that has MSP enabled on UART1, so you can connect using the FTDI adapter. But you will lose the existing config on your FC.
You can’t flash FC firmware using just the FTDI adapter, because it needs to be in DFU mode. You will need a STLink Tool that allows you to upload a firmware file (.hex) to the processor using the STM32 ST-Link Utility.
- Buy the ST Link V2 Tool here: Amazon | AliExpress
- Download STM32 ST-LINK utility: https://www.st.com/en/development-tools/stsw-link004.html
Connection:
- 5V to 5V
- GND to GND
- SWCLK (clock) to SWC
- SWDIO (data) to SWD
Here’s a good instructional tutorial about how to use the STLink tool (starts from 4:40): https://youtu.be/5VmhoyL6Z7Q?t=280
One of the main challenges with this method is finding the SWC or SWD pads, they are not always broken out to solder pads on the FC. Check if you can find them on yours before proceeding, if present, they are usually tiny and near the processor for debugging purposes, sometimes not even labelled so you might have to do a bit of “trial and error”.
To be honest most people would have given up at this stage and just get a new flight controller. I think scraping off the solder mask and expose the USB port data traces would be easier if you don’t already have the tools on hand. Keep reading.
How to Fix Damaged USB Port
This is my “go to” method to fix a FC with damaged USB connector. The idea is to find the D+ and D- connections in the USB port, and connect them to a USB breakout board. Then you can use it just like the stock USB port.
You can buy some USB breakout boards here, very nice to have some spare:
- USB-C Female Connector Board: Amazon | AliExpress
- Micro USB Female Connector Board: Amazon | AliExpress
If those D+ and D- pads on the FC are not ripped, you can simply solder wires to those pads. Connections:
-
- D+ to D+
- D- to D-
- VBUS to any 5V on the FC
- GND to GND
Here are the pinout of a micro USB breakout board, flight controllers use the same 5-pin connector has the same pinout:
Here’s the pinout of a USB-C port, there are normally 16 pins (two rows of 8-pin), D- and D+ are usually the center two pins on both top and bottom row rotated 180-degree:
If those pads are ripped, you can try to follow the copper traces and find where to go, usually end up at a small capacitor which is relatively easy to solder to. Here’s an example where D- and D+ are on a Matek FC.
If you can’t find that, you can scrap off the solder mask and expose the copper traces for D- and D+, and solder the wires to them. I use a small file for that.
If you want those wires to stay on the FC permanently you definitely want to glue the cables and solder joints securely so you don’t break those super tiny solder joints.
Edit History
- May 2018 – article created
- Apr 2021 – Betaflight now offers USB Rescue firmware in the firmware flasher, you no longer need to download it manually from google drive
- Feb 2023 – Added info about flashing FC without USB port, diagrams of USB port pinout
22 comments
Well explain and easy to understand
It’s possible to flash STM32 based FCs over UART without any further requirements: betaflight.com/docs/wiki/guides/current/Broken-USB-Rescue
Hello
I have tried it but i have a problem with the driver. I have install the driver for the FTDI adaptater so I can’t install the DFU at the same time. So it’s impossible to flash in usb rescue mode…
Hi! Is it possible to flash Kakute F4 V2 with Maintenance software via FTDI adapter, since UART 1 is dedicated to SmartPort telemetry and seems to only have one pad? My usb-port was ripped off.. Thanks!
Yea you should be able to flash it too.
So, should I solder both Rx and Tx of FTDI adapter to the same SmartPort (UART1) pad? Also, the documentation says that UART 1 is inverted, is that bad?
I accidentally cleared my uart 1 tx pad in cli. I didn’t know it was connected to the usb port. How do I access the FC now?
Re-flash firmware and reset settings, that’s the only way to fix it.
If pins D- and D+ are broken out like on the Matek f722-se, just cut and solder the white and green wires from a usb cable to those pins and power the device. There is one magic trick and that is to bridge pins 4&5 on the broken usb pads. This will set the “mode” and allow you to connect easily by shorting to mode pin to ground.
Thanks for the great guide! It helped me recover an FC with broken usb port.
i would like to OSB for my diatone 2017 GT-200S Stretch, with Fury 3 Flight Controller, but my usb is broken and can not solder back on or any wiring, I am able to connect via Uart 1 and used custom download flash update to Fury 3 3.16, but that does not get me OSB to get visual on my Frsky Googles, any Idea how to create custom Hex fil to default MSP to Uart 1, so I can flash to Fury3OSB Ver 3.32
Do my old settings get erased by installing the custom firmware ? like pids , etc, …
can you make it for butterflight 3.5?
Can this all be done with one of those ST-Link V2s?
For VCP case “One way of doing it is to flash the FC with a special firmware that by default has UART1 enabled for MSP USB connection. .”
How do you flash the FC if the usb is broken. Did I miss something ???
You can flash the fc through the uart1. Thats not the problem… afterwards you need msp activated on uart1 otherwise you can t connect and configure the fc. So you need a special build firmware where msp is activated on uart1…. in the above mentioned link can you get duch a firmware
Connect ftdi to uart1, bridge boot pads/press boot button. Bootloader is always active on uart1
Hi. I tried connecting ftdi to uart 1 but it doesn’t connect in DFU mode. It seems that there is not bootloader in uart1 at all. Any idea how to do it? Am I missing something?
My steps:
* Connect ftdi to FC (RX to TX, TX to RX, 5v, GND)
* Press boot button
* Connect FTDI to computer
* The FC is not in DFU mode so it can’t be flashed
Is there anyone who can tell me how a special firmware is done? Just activate msp on uart1?
Yes that’s pretty much it.
can i use st-link instead of ftdi?
I think you can, but I have never tried :)