Skip to content

Flashing Firmware

knoinok edited this page May 7, 2026 · 2 revisions

Flashing Firmware

Caution

Flashing is destructive and irreversible. The wrong firmware can brick the radio. The toolkit's bootloader allowlist refuses incompatible combinations, but if you bypass that with Custom .bin, you're on your own. Read this entire page before flashing for the first time.

Before you flash — checklist

Do all of these, in order:

  1. Battery >50%, or AC-powered. A power loss mid-flash is the #1 brick cause.
  2. Back up your calibration. See Calibration and Backup. Without this, even a successful re-flash leaves you without your radio's factory tuning.
  3. Back up your full EEPROM. python -m quansheng_toolkit read -o pre_flash.bin (or Dashboard → Read EEPROM → Save image).
  4. Identify your radio's bootloader. See Hardware Compatibility → Bootloader version. The bootloader is the silicon-level identity that determines which firmwares are compatible.
  5. Read Bundled firmwares below to pick the right .bin.

Entering DFU mode

Same procedure on every supported model:

  1. Power off the radio.
  2. Connect the USB cable.
  3. Hold PTT + Side Key 2 while powering on (rotary knob to ON).
  4. The LCD stays completely blank. No backlight, no logo, nothing. That's bootloader (DFU) mode.

Note

If the LCD shows the boot logo and lights up normally, you missed the timing. Power off, wait 2 seconds, try again. Hold the keys firmly — partial PTT presses count as released.

The flash procedure (GUI)

  1. Open the Firmware tab.
  2. Click Detect DFU bootloader. The toolkit reads the bootloader version and:
    • Identifies the radio (e.g. "UV-K5 V3 / UV-K1(8) v3 Mini Kong, bootloader 7.00.07")
    • Filters the bundled-firmware dropdown to compatible builds
    • Disables the Flash button if no compatible firmware is bundled / selected
  3. Pick a firmware:
    • Bundled — pick from the dropdown (auto-filtered to your bootloader). The card shows version, MCU, source (F4HWN open-source / Quansheng stock), license.
    • Custom .bin — for an external file. The allowlist still checks the firmware's target metadata against the bootloader; if the file is unrecognised, you get a confirmation prompt.
  4. Click Flash selected bundled firmware (or Flash custom .bin).
  5. Three confirmation dialogs appear:
    • DFU reminder — "Is your radio in DFU mode? LCD blank?"
    • File picker (custom .bin path only)
    • Last-chance confirm — quotes the firmware name and bootloader, asks you to type YES or click Flash anyway
  6. The progress bar shows block-by-block write. Don't disconnect, don't power off, don't even bump the cable.
  7. When the flash completes, power-cycle the radio (off → on, not DFU mode). The new firmware should boot.

The flash procedure (CLI)

For scripts and headless setups:

# Confirm the bootloader is what you think it is
python -m quansheng_toolkit dfu-info

# Flash a bundled firmware (full path or filename in firmwares/)
python -m quansheng_toolkit dfu-flash \
    --eeprom firmwares/f4hwn_fusion_5.4.0_k1_k5v3.bin \
    --target k5_v3 \
    --yes-i-understand

The --yes-i-understand flag is mandatory — the CLI refuses to flash without it.

--target must match the bootloader-detected target string. Run dfu-info first if you're not sure.

Bundled firmwares

The toolkit ships 9 verified .bin images at firmwares/. They're SHA-256-pinned in firmwares/manifest.json.

F4HWN open-source (Apache-2.0)

File Version Targets Notes
f4hwn_fusion_5.4.0_k1_k5v3.bin Fusion 5.4.0 UV-K1, UV-K1(8) v3 Mini Kong, UV-K5 V3 Latest stable. Recommended for PY32F071 radios.
f4hwn_fusion_5.3.1_k1_k5v3.bin Fusion 5.3.1 same as above Previous stable. Use if 5.4.0 has a regression for your use case.
f4hwn_fusion_4.3.2_k5v3.bin Fusion 4.3.2 UV-K5 V3 only Older PY32F071 build. Mostly for K5 V3 owners who want minimal feature set.
f4hwn_4.3_k5_k6_basic.bin 4.3 UV-K5 / K5(8) / K6 (DP32G030) Basic build.
f4hwn_4.3_k5_k6_bandscope.bin 4.3 UV-K5 / K5(8) / K6 (DP32G030) With spectrum analyser.
f4hwn_4.3_k5_k6_broadcast.bin 4.3 UV-K5 / K5(8) / K6 (DP32G030) With commercial FM radio.

Quansheng stock (proprietary, redistributed unmodified)

File Version Target Notes
stock_k1_7.03.01.bin 7.03.01 UV-K1 Latest stock K1 firmware.
stock_k1_7.02.02.bin 7.02.02 UV-K1(8) v3 Mini Kong Stock for K1(8) v3.
stock_k5v3_7.00.11.bin 7.00.11 UV-K5 V3 Latest stock K5 V3 firmware.

Note

Quansheng stock images are bundled to give you a safe path back if you've flashed F4HWN and want to revert. They're freely distributed by Quansheng themselves at qsfj.com — bundling them here just saves you the trip.

The anti-brick allowlist

Each firmware in manifest.json declares:

  • target — the canonical target identifier (e.g. k1, k5_v3)
  • compatible_targets — the bootloader-detected target strings it accepts
  • mcu — the MCU family (e.g. PY32F071)
  • supports.bootloaders — the explicit list of bootloader versions verified to work

The Firmware tab cross-references your live bootloader against this metadata before allowing the flash. If you select a custom .bin that doesn't match, you get a hard warning — and a --force flag is the only way past, intended only for developers porting to new bootloader revisions.

Validated combinations

These have been verified end-to-end on real hardware:

Radio Bootloader Firmware Verified by
UV-K5 V3 7.00.07 F4HWN Fusion 4.3.2 Project author
UV-K5 V3 7.00.07 F4HWN Fusion 5.4.0 Project author
UV-K1 standard 7.03.01 F4HWN Fusion 5.4.0 Project author
UV-K1(8) v3 Mini Kong 7.00.07 F4HWN Fusion 5.4.0 Project author

If you successfully flash a combination not on this list, please open an issue so we can extend the allowlist.

Recovery — if something goes wrong

Flash interrupted (cable disconnected, power loss)

The bootloader is in mask ROM — it can't be erased by interrupted firmware writes. Power-cycle the radio in DFU mode (PTT + Side Key 2) and re-flash. As long as DFU mode still responds (LCD blank, dfu-info succeeds), the radio is recoverable.

LCD shows garbage / "F4HWN: bad version" / boot loop

You probably flashed a firmware whose target MCU doesn't match the radio (e.g. DP32G030 build on PY32F071 hardware). DFU mode should still work — boot in DFU, flash the correct firmware.

DFU mode doesn't respond at all

If dfu-info fails and the LCD is fully dead with no backlight even in DFU mode, the radio is likely bricked at the silicon level. Check the cable on a known-good radio first — bad cables are the most common cause of "DFU doesn't work". If the cable is fine and DFU is genuinely dead, the only recovery is JTAG/SWD reflash, which requires opening the radio and is outside the scope of this toolkit.

Calibration looks wrong after flash (wrong S-meter, off-frequency)

You either restored a calibration from a different radio (calibration is per-unit — no two radios share the same calibration), or never restored it. See Calibration and Backup → Restoring.


Next: Calibration and Backup — what to back up before a flash, and how to restore.