Skip to content

Calibration and Backup

knoinok edited this page May 8, 2026 · 3 revisions

Calibration and Backup

Caution

This is the most important page on the wiki. If you skip everything else, read this. Calibration data is per-unit — your radio's factory tuning is unique. Lose it without backup, and you have a radio that transmits off-frequency, mis-reports signal strength, and may exceed power limits.

What is calibration?

The calibration region of EEPROM is a small (~512 bytes) area near the top of memory that contains values measured at the factory for this specific unit:

  • Frequency calibration — the exact crystal offset that makes 145.000 MHz be 145.000 MHz
  • TX power calibration — DAC values for each band/power-level combination so output power matches the label
  • RX gain / S-meter calibration — analog gain and S-meter thresholds
  • Squelch calibration — RSSI thresholds per band

These values are measured once at the Quansheng factory using lab equipment (signal generator, RF power meter). They cannot be re-derived without the same equipment. If you lose them and don't have a backup, the radio still works — but it transmits a few kHz off, the S-meter is wrong, and TX power can be significantly higher or lower than displayed (potentially out-of-spec).

Why back up calibration first

Three scenarios where calibration can be lost or corrupted:

  1. Firmware flash — the calibration region is normally preserved across a flash, but a bad/interrupted flash, or a firmware that overwrites the wrong sectors, can destroy it.
  2. Bad EEPROM write — if you're scripting and accidentally write zeros to the calibration region.
  3. Hardware failure — rare, but the EEPROM cell can degrade.

Important

Habit to internalise: before any write or flash operation, dump the calibration to disk and store it somewhere durable (cloud, second machine, USB stick). It's a 5-second operation that has saved many radios.

Making a backup

GUI

  1. Open the Calibration tab.
  2. Click Read calibration. The region is fetched from the radio and shown as a hex view.
  3. Click Save calibration to file…. Default filename includes a timestamp: calibration_<radio>_<timestamp>.bin.
  4. Save it somewhere durable. Do this for every radio you own — calibration is per-unit, not per-model.

You should also save the full EEPROM image while you're at it (Dashboard → Read EEPROM → Save image). It contains the calibration plus everything else (channels, settings, etc.), giving you a complete restore point.

CLI

# Calibration only
python -m quansheng_toolkit dump-calibration -o calibration_$(date +%Y%m%d_%H%M%S).bin

# Full EEPROM (recommended)
python -m quansheng_toolkit read -o eeprom_$(date +%Y%m%d_%H%M%S).bin

Tip

Name your backups with the radio's serial number (printed on the sticker under the battery): calibration_K5V3_SN12345_20260507.bin. If you have multiple radios of the same model, this is the only way to keep them straight after a year.

Verifying a backup

Important

A .bin file on disk is only useful if it actually matches what's on the radio. Verifying takes about 10 seconds and proves your backup is trustworthy before you ever need it for a real recovery.

The toolkit's Verify dump… button re-reads the calibration region from the connected radio and diffs it byte-for-byte against a saved .bin. Two outcomes:

  • Verify OK — every byte matches. The dump is a stable, trustworthy backup of this radio. Archive it.
  • Verify failed — the dialog shows how many bytes differ, the offset of the first divergent byte, and a match ratio. Three likely causes:
    1. Flaky USB / serial link. Take two fresh dumps and run Compare two dumps… — if those also differ, replace the cable before trusting any dump.
    2. Wrong radio. The file was taken from a different unit. Don't restore it.
    3. Calibration changed since the dump (rare — happens after a service-menu retune). Take a new backup.

When to run Verify

  • Right after the very first dump on a new radio. Confirms your link is solid before you build a backup library.
  • Before a restore. If you're about to write a .bin back, first verify it against the radio it was taken from. (Useful when restoring on a replacement unit doesn't apply, but verifying integrity does.)
  • After a flash, before celebrating. Re-dump and verify against your pre-flash backup — should be identical.

How it works

Verify reuses the same read path as Dump (no writes, fully read-only) and runs the comparison in memory. Older 768-byte dumps with the leading 256 B of 0xFF padding are auto-stripped before the diff so legacy backups still verify cleanly.

Note

Verify is currently GUI-only. The CLI gives you the building blocks (dump-calibration + a manual cmp / diff -q of two .bin files); a single verify-calibration subcommand may be added later.

Restoring calibration

Warning

Restore only a calibration that came from this exact radio. No two radios share the same calibration — restoring another unit's calibration produces a radio that's worse than no calibration at all (you've replaced its factory tuning with one that was correct for a different physical unit). The toolkit's restore performs a byte-count and target-metadata check, but it cannot detect "wrong unit, same model".

GUI

  1. Open the Calibration tab.
  2. Click Load calibration from file…. The toolkit opens the file and shows a confirmation dialog with:
    • File path
    • Byte count
    • Target model encoded in the file (e.g. k5_v3)
    • Comparison against the live radio's target
  3. Confirm. The calibration is written and read back for verification.

CLI

python -m quansheng_toolkit restore-calibration --file calibration_K5V3_SN12345_20260507.bin --yes-i-understand

The --yes-i-understand flag is mandatory.

Diffing two calibration dumps

Useful for confirming a flash didn't touch calibration:

  1. Dump calibration before the flash → cal_before.bin
  2. Flash firmware
  3. Dump calibration after the flash → cal_after.bin
  4. In the toolkit: Calibration → Diff two files… → pick the two files

The toolkit shows a byte-by-byte diff. If anything changed, the affected regions are highlighted.

CLI equivalent:

python -m quansheng_toolkit diff-calibration --a cal_before.bin --b cal_after.bin

Best-practice habits

Tip

The toolkit is fully offline — every operation works without an internet connection. Take advantage of that for backup hygiene: keep a USB stick with quansheng-toolkit.exe plus a folder of per-radio backups, and you have a complete portable maintenance kit you can carry to a hamfest or a remote site.

A short checklist that prevents most disasters:

  • First-day ritual on a new radio: read full EEPROM + dump calibration, then click Verify dump… to confirm the read is stable, and save both files with the serial number in the filename.
  • Before any firmware flash: repeat the above. Every time. No exceptions.
  • Before any "experimental" CSV import: save a full EEPROM backup. CSV imports are reversible but it's quicker to restore than to debug.
  • After any firmware flash: dump calibration again and diff against the pre-flash dump. Should be byte-identical. If not, the flash damaged calibration — restore from backup immediately before doing anything else.
  • Annually: re-export your channel CSV. If the radio dies, you need that file to set up a replacement.

Caution

If you restore a calibration backup and the radio still misbehaves, do not flash again trying to fix it. You've already exhausted the easy options. Open an issue with the diff between your pre-flash and post-flash calibration dumps; we may be able to identify what was corrupted.


Next: CLI Reference for headless and scripted workflows.

Clone this wiki locally