How to update Firmware without USB? Need help

Hi guys,
I have a situation that my Matek765 USB port connector broken. I have installed AC 4.05 already and my drone fly well. Now I want to update to AC 4.06 but can not use USB port anymore. I ever read that we still can update the firmware via UART (serial) port, but I need advise from expert how to do it smoothly. Anybody has this experience? Normally we have to disconnect first and then make a new USB connection to start the update, but now I am a bit confused about this procedure.
Thank you.

well, without usb port the procedure its not easy.
You can try the DFU mode or alternatively try change the usb connector…not an easy procedure.
Alternatively you can purchase the same fc and set it like the one you already own

please excuse my bad english, but i use a translator.
My F765 also has a defective USB port.
I soldered a cable to the pads SWC and SWD on the board of the F765 and flashed the new firmware directly with a USB / ST link and the software - STM 32 - ST Link Utility.
Via a UART of the F 765 I could not perform a firmware update, but with the ST-Linker it worked fine.

well, with stlink you can flash .bin and .hex files.
As your fc its not ardupilot native but it can support ardupilot firmware, you need to flash the binary file that contain the bootloader and firmware in only one file.

Thank you for you response,
@Andreas what do you mean by SWC and SWD pad?? Sorry could you pls. elaborate more detail? When you said that you use one port, how do you setting this port?? Do you change one port to be “console”?? I appreciate if you can share in mire detail. Also how to use Stlink? Any wiki ?
@Dave84, do you think we still can flash the Matek765 using other Uart port instead of USB? If yes, how is the setup parameter and should we connect directly the serial port to the PC Windows and run MP? How is the procedure? I still don’t understand. Tks

SWD corresponding to swdio while SWC to Swclk, aside these pin you need also the 3.3v and the GND.
Stlink tool its easy but can be s little bit triky.
You must find the correct address before flash the bootloader with the firmware file.
As you don’t need flash the bootloader, you must find the correct address for flash it… you need first download the .hex file and with the option you can flash it.

On that board you should be able to flash firmware over telem1/uart7. That method will almost certainly fail if you try it over a radio, but if you connect a serial/USB adapter (ftdi), it should flash fine. For anyone else reading this or encountering a similar problem, check the bootloader hwdef for your board and see if a serial port is enabled in it (ie

Thank you very much James, so is this sokution valid for every Pixhawk board (such as Pixhawk 1, Pixhawk 2 (Cube), Pxhawk 4, ext. In the past I remember that I ever had same situation that the USB port connector (of my CUAV3 Pixhack broken. Can I also do flasing using Telemetri 1 and FTDI cable connector directly. Is the procedure of updating Firmware still same as when we use USB connection??
Than you…

Procedure is the same via ftdi as it is with USB. Most boards have a serial port enabled in the bootloader, but which one it is varies - checking the hwdef-bl.dat is how to find out.

I find that reboot-to-bootloader doesn’t work over FTDI as it does with the USB port. I have to cycle the power by hand after the reboot command is sent. Is there a way around this?

the trick is the baud-rate for the reboot command. Are you using the on command line or using a GCS like MissionPlanner?
If using from Tools/scripts then use the --baud-flightstack option to set the mavlink baud rate.

I’m calling from another python script, so I’ll try mucking with the various baud rate arguments.

So this worked on a CubeBlack (FMUv3). After setting the baud-flightstack to 115200, the flashing process completed. However, the same process doesn’t work on a PH4-mini (FMUv5). I can see the board rebooting but the uploader never detects it. It doesn’t even work if I manually cycle the power.

One clue is that the rebooted device appears as /dev/serial/by-id/usb-3D_Robotics_PX4_BL_FMU_v5.x_0-if00, which looks different from the CubeBlack that reboots to /dev/serial/by-id/usb-Hex_ProfiCNC_CubeBlack-BL_300049001651373238353233-if00. Does this mean it’s got a different non-AP bootloader that might not be talking on Telem1?

Yes. Update the bootloader on the PH4-Mini. A recent one will enumerate as a Holybro device.

1 Like

Note that you can specify a --port for the device and --force if required to write the firmware even in the absence of a board ID.

Yeah it wasn’t even getting to that point @peterbarker. But after MAV_CMD_FLASH_BOOTLOADER I am able to flash both boards over serial.