Files
brnQuanFW/README.md
T
BRNSystemsandClaude Opus 5.5 183dd8fb0d README: user guide with the complete key and menu reference
Replaces the outdated POCSAG note with a guide for this build: UI tree,
main screen keys (short / long / F+), scanning, DTMF entry, keypad lock,
programmable keys, every menu item, scanners, FM radio, SMS / POCSAG
messages, OOK sender and the build options.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 01:13:24 +01:00

31 KiB
Raw Blame History

Stats

Alt

Open re-implementation of the Quansheng UV-K5/K6/5R v2.1.27 firmware

This repository is a fork of Egzumer custom firmware, who was a merge of OneOfEleven custom firmware with fagci spectrum analizer plus my few changes.

All is a cloned and customized version of DualTachyon's open firmware found here ... a cool achievement !

Note

EN - About Chirp, as many others firmwares, you need to use a dedicated driver available on this repository.

FR - A propos de Chirp, comme beaucoup d'autres firmwares, vous devez utiliser un pilote dédié disponible sur ce dépôt.

Warning

EN - THIS FIRMWARE HAS NO REAL BRAIN. PLEASE USE YOUR OWN. Use this firmware at your own risk (entirely). There is absolutely no guarantee that it will work in any way shape or form on your radio(s), it may even brick your radio(s), in which case, you'd need to buy another radio. Anyway, have fun.

FR - CE FIRMWARE N'A PAS DE VÉRITABLE CERVEAU. VEUILLEZ UTILISER LE VÔTRE. Utilisez ce firmware à vos risques et périls. Il n'y a absolument aucune garantie qu'il fonctionnera d'une manière ou d'une autre sur votre (vos) radio(s), il peut même bousiller votre (vos) radio(s), dans ce cas, vous devrez acheter une autre radio. Quoi qu'il en soit, amusez-vous bien.

Caution

EN - I recommend to backup your eeprom with k5prog before playing with alternative firmwares. It's a good reflex to have.

FR - Je recommande de sauvegarder votre eeprom avec k5prog avant de jouer avec des firmwares alternatifs. C'est un bon réflexe à avoir.

User guide (this build)

This section describes the firmware as built from this repository with the default Makefile options: FM broadcast radio, flashlight, UART and the F4HWN features are on; VOX, NOAA, AirCopy, alarm/1750 Hz, voice prompts and the spectrum analyser are off. If you enable or disable features, some keys and menu items change.

Conventions

Term Meaning
short press and release
long press and hold for about 1 second
F + key press and release F (the # key; an F appears in the status bar), then press the key
SK1 / SK2 side key 1 (upper, below PTT) / side key 2 (lower)
M the MENU key

UI tree

Power on ─ Main screen (VFO A / VFO B)
 ├─ M ──────────────── Menu ─────── item list ── M ── value ── M (confirm) / EXIT (cancel)
 ├─ F + M ──────────── Messages (SMS / POCSAG)
 │                       ├─ M / PTT ── destination (RIC) ── M ── text ── M / PTT (send)
 │                       └─ * ──────── OOK sender
 ├─ F + EXIT ───────── OOK sender ── protocol list ── M ── fields ── PTT / M (send)
 ├─ F + 0 / long 0 ─── FM broadcast radio
 ├─ F + 4 / long 4 ─── Frequency scanner ("close call")
 ├─ F + * ──────────── CTCSS / DCS scanner
 ├─ long * ─────────── Channel / range scan (on the main screen)
 ├─ *  ─────────────── DTMF entry (on the main screen)
 └─ long F ─────────── Keypad lock / unlock

Main screen

Key Short Long F + key
0 type digit 0 FM radio FM radio
1 type digit 1 VFO: next band. Channel: copy channel to VFO same as long
2 type digit 2 swap VFO A / B same as long
3 type digit 3 toggle VFO / channel (memory) mode same as long
4 type digit 4 frequency scanner same as long
5 type digit 5 channel: cycle the channel's scan lists (1, 2, 3 combinations). VFO: set / clear the scan range between VFO A and VFO B frequency nothing (spectrum not built)
6 type digit 6 cycle TX power same as long
7 type digit 7 nothing (VOX not built) nothing
8 type digit 8 frequency reverse (swap RX / TX of a repeater pair) backlight on demand (stays on; press again to restore)
9 type digit 9 go to the "1 Call" channel backlight back to the normal timer
UP / DOWN next / previous channel or frequency step (hold to repeat) repeat squelch +1 / -1
M open the menu programmable action (menu ML) Messages screen
EXIT delete the last typed digit; stop scanning cancel any typed input OOK sender
* DTMF entry start / stop scanning CTCSS / DCS scanner
F arm F for the next key keypad lock / unlock -
SK1 programmable (menu F1S, default MONI) programmable (menu F1L, default NONE) step size +
SK2 programmable (menu F2S, default SCAN) programmable (menu F2L, default NONE) step size -
PTT transmit (hold, or toggle with SPTT = TOG) - transmit (cancels F)

Typing digits:

  • Channel mode: type a channel number. Three digits jump immediately; shorter numbers jump after a short pause.
  • VFO mode: type the frequency in kHz without a decimal point; missing trailing digits become zeros. Example: 433920 → 433.920 MHz. Above 1 GHz the input has 7 digits.

While scanning:

Key Action
0 – 5 select the scan list: 0 = no list, 1 / 2 / 3 = list 1 / 2 / 3, 4 = lists 1+2+3, 5 = all
UP / DOWN skip to the next channel / frequency in that direction
M short stop scanning (resume on the found channel)
M long exclude the current channel from this scan session
EXIT stop scanning and go back to where the scan started
long * stop scanning

DTMF entry (after a short *):

  • Characters: digits type 0–9; M = A, UP = B, DOWN = C, EXIT = D, * = *, F = #.
  • SK1 deletes the last character.
  • PTT sends the string.

Keypad lock (long F): while locked, every key only gives the "locked" beep, except long F (unlock) and long M (its programmable action). PTT is blocked too. Menu KeyLck locks the keypad automatically after a delay.

Programmable keys (menus F1S, F1L, F2S, F2L, ML)

Action What it does
NONE nothing
FLASH flashlight: on → blink → SOS → off
PWR cycle TX power
MON monitor (open squelch) while active
SCAN start / stop scanning
WFM FM broadcast radio on / off
LOCK KEY keypad lock
VFO A/B swap VFO A / B
VFO MEM toggle VFO / channel mode
MODE cycle the demodulation (FM, AM, USB, …)
RX MOD alternately toggle dual watch and cross band
PTT toggle the PTT mode (hold / toggle) for this session
WIDE NAR cycle the bandwidth (wide / narrow / narrower)
MUTE mute / unmute the speaker

Menu

Keys inside the menu:

Key In the item list Editing a value
UP / DOWN previous / next item previous / next value
0 – 9 type the item number (two digits) to jump type the value directly
M edit the value confirm (some items ask twice)
EXIT leave the menu cancel / delete the last typed digit
* - in RCTCS / RDCS: start / stop scanning the received tone / code
PTT transmit transmit
long F keypad lock keypad lock

Editing a channel name (ChName):

  1. M starts editing.
  2. Change the character under the cursor with UP / DOWN, or type a digit; * inserts -, F inserts a space.
  3. M moves to the next character.
  4. After the 10th character, confirm with M.

All items, in menu order:

Item Values Description
STP 0.01 kHz … 500 kHz frequency step
PWR <.02 W, .125, .25, .5, 1, 2, 5 W TX power
RDCS OFF, D023N … (normal and inverted) receive DCS code
RCTCS OFF, 67.0 … 254.1 Hz receive CTCSS tone
TDCS as RDCS transmit DCS code
TCTCS as RCTCS transmit CTCSS tone
TxODir OFF, +, - repeater offset direction
TxOffs frequency repeater offset
WID WIDE, NARR, NAR+, FSKQ bandwidth. FSKQ is the FSK width: the modem sets the filter it needs (POCSAG: 25 kHz mode, 7.5 kHz filter)
SCR OFF, frequency voice scrambler
BusyL OFF, ON busy channel lockout (no TX when the channel is busy)
COMP OFF, TX, RX, TX/RX compander
Mod FM, AM, USB, BYP, RAW, ALM, BEE, CTC, FSA, UN4–UN9 demodulation. Everything after USB is an experimental raw / test mode
ScAdd1 / ScAdd2 / ScAdd3 OFF, ON channel is in scan list 1 / 2 / 3
ChSave channel number save the current VFO to a channel
ChDele channel number delete a channel
ChName channel number edit a channel name
SList 0 no list, 1, 2, 3, 4 lists 1+2+3, 5 all scan list used by the channel scan
SList1 / SList2 / SList3 channel browse the channels in scan list 1 / 2 / 3
ScnRev STOP, CARRIER 0.25–20 s, TIMEOUT 5 s–2 min scan resume mode
F1S / F1L / F2S / F2L / ML see Programmable keys SK1 short / long, SK2 short / long, M long
KeyLck OFF, 15 s … 10 min automatic keypad lock
TXTime OFF, 10 s … 15 min transmit timeout
BatSav OFF, 1:1 … 1:5 battery saver (receiver sleep ratio). Turn it off for POCSAG / FSK receive
BatTxt NONE, VLT, PRC battery voltage / percentage in the status bar
Mic 0–4 (shown in dB) microphone gain
MicBar OFF, ON microphone level bar while transmitting
ChDisp FREQ, CHNUM, NAME, NAME+FREQ what a channel shows on the main screen
FSKMod 450, 700, 1200, 2400, A1200, A2400, NOAA, PCS1200, PCS512, PCS2400 data modem. The first seven are the SMS FSK modes; PCSxxx is POCSAG at 1200 / 512 / 2400 baud
FSKSRC SMS: 0–99999999. POCSAG: 0–2097151 this radio's address. In POCSAG modes this is its own RIC (capcode)
PocMon OFF, ON POCSAG monitor: receive, store and alert on pages for every RIC
BLTime OFF, 5 s … 5 min, ON backlight timeout
BLMin / BLMax 0–9 / 1–10 backlight dimmed / full brightness
BLTxRx OFF, TX, RX, TX/RX backlight on while transmitting / receiving
Beep OFF, ON key beep
Roger OFF, RGR, MDC end-of-transmission tone
STE OFF, ON squelch tail elimination
RP STE OFF, 100 ms … 1 s repeater squelch tail elimination
1 Call channel channel used by long 9
UPCode / DNCode DTMF string DTMF codes sent at the start / end of a transmission
PTT ID OFF, UP CODE, DN CODE, UP+DN CODE, APOLLO when the DTMF codes / Apollo tone are sent
L DTMF OFF, ON hear the DTMF you send (side tone)
D Prel 30–990 ms DTMF preload time
D Live OFF, ON show received DTMF live
RxMode MAIN, RESP, XBAND, DMON MAIN only, dual watch and respond, cross band, dual monitor
Sql 0–9 squelch level (also F + UP / DOWN)
SPTT HOL, TOG PTT hold to talk / toggle
SInv OFF, ON inverted display
STmr OFF, ON show the RX / TX timer
SOff OFF, 1 min … 2 h automatic power off (sleep)
SVol OFF, 1–63 audio volume gain
F Lock 137-174/400-470, DIS ALL, UNL ALL TX band lock: default bands, TX disabled everywhere, TX allowed everywhere
FrCali -50 … +50 reference crystal frequency calibration
BatCal 1600–2200 battery voltage calibration
BatTyp 1600, 2200, 3500 mAh battery type
Reset VFO, ALL reset VFO settings / everything

Scanners (F + 4, F + *)

F + 4 (frequency scanner): hold the scanner close to a transmitter. It finds the frequency, then the tone or code.

F + * (CTCSS / DCS scanner): finds the tone or code on the current frequency.

Key Action
M after a hit: save the result. Channel mode asks for the channel number first (type it or UP / DOWN, then M); M again confirms
UP / DOWN choose the target channel while saving
0 – 9 type the target channel number (3 digits)
* restart the scan
EXIT delete a digit / leave the save prompt / leave the scanner

FM broadcast radio (F + 0)

Key Action
0 – 9 type a frequency (4 digits, e.g. 1043 = 104.3 MHz), or a 2-digit preset number in preset mode
UP / DOWN tune / next preset (hold to repeat; while scanning: move the scan)
M frequency mode: save the station to a preset (UP / DOWN chooses the slot, M confirms). Preset mode: delete the preset (M confirms)
* short / F + * or long * manual scan / automatic scan that fills the presets
F + 0 or EXIT leave the FM radio
F + 1 next FM band
F + 3 toggle frequency / preset mode
F + 4 toggle FM AGC
F + 5 cycle de-emphasis
F + 6 cycle stereo blend

Messages: SMS and POCSAG (F + M)

The modem in FSKMod decides what is sent:

  • SMS modes: this firmware's own FSK SMS. Up to 20 characters, with acknowledgement, retries and relay.
  • PCS modes: standard POCSAG alphanumeric pages. Up to 33 characters, to any pager or POCSAG receiver.

Message list:

Key Action
UP / DOWN previous / next page (2 messages per page, newest on the last page)
M or PTT write a new message
2 / 8 POCSAG only: TX deviation + / - (a popup shows the value; not saved, for tuning)
* OOK sender
EXIT back to the main screen

Writing:

  1. Destination: type the address with the digits (POCSAG: the pager's RIC, 0–2097151); EXIT deletes a digit. M continues.
  2. Text: multi-tap keys (table below). Pressing the same key again cycles through its characters; holding it cycles backwards. A different key moves to the next character. EXIT deletes, long EXIT cancels the message.
  3. M or PTT sends.
Key Characters
1 , . ? & ! space - _ 1
2 a b c A B C [ ] 2
3 d e f D E F @ % 3
4 g h i G H I ~ $ 4
5 j k l J K L | * 5
6 m n o M N O { } 6
7 p q r s P Q R S 7
8 t u v T U V " ' 8
9 w x y z W X Y Z 9
0 # ( ) ; : < > / 0

Receiving happens in the background on any screen. A received message is stored, the radio jumps to the message list with a popup, the LED flashes yellow and, once the reception has ended, a double beep plays.

POCSAG quick start

  1. FSKMod = PCS1200 (or PCS512 / PCS2400, to match the network).
  2. FSKSRC = this radio's own RIC.
  3. WID = FSKQ on the VFO / channel, on the paging frequency.
  4. BatSav = OFF and RxMode = MAIN, so no preamble is missed.
  5. Optional: PocMon = ON to see pages for every RIC.

Pages are standard POCSAG alphanumeric (function 3, 576-bit preamble, two batches). They decode with multimon-ng, PDW, MMDVM / DAPNET receivers and pagers. Developers can watch receive over the programming cable (picocom -b 38400 /dev/ttyUSB0), which logs:

  • PS: locked onto the preamble,
  • PF / PD: capture size / raw bytes,
  • PR / PO / PX: decoded for us / for another RIC / nothing.

Build with -DPOCSAG_DEBUG_UART=0 to switch the log off.

OOK sender (F + EXIT, or * in the message list)

Sends 433 MHz style remote control codes (garage doors, sockets, doorbells) by keying the carrier on and off on the current VFO frequency, usually 433.920 MHz. The frequency must be TX-allowed (F Lock). Otherwise the radio beeps and does not transmit.

Protocol list: UP / DOWN choose, M selects, EXIT leaves.

Protocol Fields Notes
PT2262 Code: keys 0 / 1 / 2 (= F), up to 12 trits classic tri-state remotes, 350 µs
EV1527 ID (0–1048575), Key (0–15) learning-code remotes, 24 bits = ID × 16 + key
RC-SW Code (decimal), Bits (1–32), Proto (1–7) the rc-switch protocols. Choosing a protocol loads its pulse length. Protocol 6 is HT6P20B
INTECH ID (26 bit), Unit (0–15), On (0 / 1) Intertechno / KlikAanKlikUit self-learning
MANCH Code, Bits, Half (half-bit time in µs) raw Manchester: 1 = on/off, 0 = off/on

Every protocol also has Pulse (base pulse in µs, prefilled) and Repeat (default 10).

Fields screen:

Key Action
UP / DOWN previous / next field (> marks the selected field)
0 – 9 type into the field (beeps if the value is out of range)
EXIT delete a digit; on an empty field, back to the protocol list
PTT or M send

Build options

Define Default Effect
POCSAG_MAX_MESSAGE_LENGTH 33 longest POCSAG message and stored message text (max 45, two batches)
MESSAGES_COUNT 12 number of stored messages; the build fails if the store would reach the calibration data at 0x1E00
POCSAG_DEVIATION 963 POCSAG TX deviation (REG_40)
POCSAG_TONE2_GAIN 127 POCSAG FSK TX level
POCSAG_INVERT 1 POCSAG bit polarity (1 = standard: logical 1 is the lower frequency)
POCSAG_DEBUG_UART 1 POCSAG receive log on the UART

Changing POCSAG_MAX_MESSAGE_LENGTH or MESSAGES_COUNT moves the message slots in EEPROM, so messages stored before read back as garbage.

Donations

Special thanks to Jean-Cyrille F6IWW (2 times), Fabrice 14RC123, David F4BPP, Olivier 14RC206, Frédéric F4ESO, Stéphane F5LGW, Jorge Ornelas (4 times), Laurent F4AXK, Christophe Morel, Clayton W0LED, Pierre Antoine F6FWB, Jean-Claude 14FRS3306, Thierry F4GVO, Eric F1NOU, PricelessToolkit, Ady M6NYJ, Tom McGovern (3 times), Joseph Roth, Pierre-Yves Colin, Frank DJ7FG, Marcel Testaz, Brian Frobisher, Yannick F4JFO, Paolo Bussola, Dirk DL8DF, Levente Szőke (2 times), Bernard-Michel Herrera, Jérôme Saintespes, Paul Davies, RS, Johan F4WAT, Robert Wörle, Rafael Sundorf, Paul Harker, Peter Fintl, Pascal F4ICR (2 times), Mike DL2MF, Eric KI1C (2 times), Phil G0ELM, Jérôme Lambert, Meinhard Frank Günther, Eliot Vedel, Alfonso EA7KDF, Jean-François F1EVM and Robert DC1RDB for their donations. That’s so kind of them. Thanks so much 🙏🏻

Table of Contents

Main features and improvements from F4HWN:

  • several firmware versions:
    • Bandscope (with spectrum analyzer made by Fagci),
    • Broadcast (with commercial FM radio support),
    • RescueOps (specifically designed for first responders: firefighters, sea rescue, mountain rescue),
  • improve default power settings level:
    • Low1 to Low5 (<~20mW, ~125mW, ~250mW, ~500mW, ~1W),
    • Mid ~2W,
    • High ~5W,
    • User (see SetPwr),
  • improve s-meter (IARU recommandations),
  • improve bandscope (Spectrum Analyser):
    • add channel name,
    • add save of some spectrum parameters,
  • improve UI:
    • menu index is always visible, even if a menu is selected,
    • s-meter new design (Classic or Tiny),
    • MAIN ONLY screen mode,
    • DUAL and CROSS screen mode,
    • RX blink on VFO RX,
    • RX LED blink,
    • Squelch level and Monitor,
    • Step value,
    • CTCSS or DCS value,
    • KeyLock message,
    • last RX,
    • move BatTxt menu from 34/63 to 30/63 (just after BatSave menu 29/63),
    • rename BackLt to BLTime,
    • rename BltTRX to BLTxRx,
    • improve memory channel input,
    • improve keyboard frequency input,
    • add percent and gauge to Air Copy,
    • improve audio bar,
    • and more...
  • new menu entries and changes:
    • add SetPwr menu to set User power (<20mW, 125mW, 250mW, 500mW, 1W, 2W or 5W),
    • add SetPTT menu to set PTT mode (Classic or OnePush),
    • add SetTOT menu to set TOT alert (Off, Sound, Visual, All),
    • add SetCtr menu to set contrast (0 to 15),
    • add SetInv menu to set screen in invert mode (Off or On),
    • add SetEOT menu to set EOT (End Of Transmission) alert (Off, Sound, Visual, All),
    • add SetMet menu to set s-meter style (Classic or Tiny),
    • add SetLck menu to set what is locked (Keys or Keys + PTT),
    • add SetGUI menu to set font size on the VFO baseline (Classic or Tiny),
    • add TXLock menu to open TX on channel,
    • add SetTmr menu to set RX and TX timers (Off or On),
    • add SetOff menu to set the delay before the transceiver goes into deep sleep (Off or 1 minute to 2 hours),
    • add SetNFM menu to set Narrow width (12.5kHz or 6.25kHz),
    • rename BatVol menu (52/63) to SysInf, which displays the firmware version in addition to the battery status,
    • improve PonMsg menu,
    • improve BackLt menu,
    • improve TxTOut menu,
    • improve ScnRev menu (CARRIER from 250ms to 20s, STOP, TIMEOUT from 5s to 2m)
    • improve KeyLck menu (OFF, delay from 15s to 10m)
    • add HAM CA F Lock band (for Canadian zone),
    • add PMR 446 F Lock band,
    • add FRS/GMRS/MURS F Lock band,
    • remove blink and SOS functionality,
    • remove AM Fix menu (AM Fix is ENABLED by default),
    • add support of 3500mAh battery,
  • improve status bar:
    • add SetPtt mode in status bar,
    • change font and bitmaps,
    • move USB icon to left of battery information,
    • add RX and TX timers,
  • improve lists and scan lists options:
    • add new list 3,
    • add new list 0 (channel without list...),
    • add new scan lists options,
      • scan list 0 (all channels without list),
      • scan list 1,
      • scan list 2,
      • scan list 3,
      • scan lists [1, 2, 3],
      • scan all (all channels with ou without list),
    • add scan list shortcuts,
  • add resume mode on startup (scan, bandscope and broadcast FM),
  • new actions:
    • RX MODE,
    • MAIN ONLY,
    • PTT,
    • WIDE NARROW,
    • 1750Hz,
    • MUTE,
    • POWER HIGH (RescueOps),
    • REMOVE OFFSET (RescueOps),
  • new key combinations:
    • add the F + UP or F + DOWN key combination to dynamically change the Squelch level,
    • add the F + F1 or F + F2 key combination to dynamically change the Step,
    • add F + 8 to quickly switch backlight between BLMin and BLMax on demand (this bypass BackLt strategy),
    • add F + 9 to return to BackLt strategy,
    • add long press on MENU, in * SCAN mode, to temporarily exclude a memory channel,
    • add short press on [0, 1, 2, 3, 4 or 5], in * SCAN mode, to dynamically change scan list.
  • many fix:
    • squelch,
    • s-meter,
    • DTMF overlaying,
    • scan list 2 ignored,
    • scan range limit,
    • clean display on startup,
    • no more PWM noise,
    • and more...
  • enabled AIR COPY
  • disabled SCRAMBLER,
  • remove 200Tx, 350Tx and 500Tx,
  • unlock TX on all bands needs only to be repeat 3 times,
  • code refactoring and many memory optimization,
  • and more...

Main features from Egzumer:

  • many of OneOfEleven mods:
    • AM fix, huge improvement in reception quality
    • long press buttons functions replicating F+ action
    • fast scanning
    • channel name editing in the menu
    • channel name + frequency display option
    • shortcut for scan-list assignment (long press 5 NOAA)
    • scan-list toggle (long press * Scan while scanning)
    • configurable button function selectable from menu
    • battery percentage/voltage on status bar, selectable from menu
    • longer backlight times
    • mic bar
    • RSSI s-meter
    • more frequency steps
    • squelch more sensitive
  • fagci spectrum analyzer (F+5 to turn on)
  • some other mods introduced by me:
    • SSB demodulation (adopted from fagci)
    • backlight dimming
    • battery voltage calibration from menu
    • better battery percentage calculation, selectable for 1600mAh or 2200mAh
    • more configurable button functions
    • long press MENU as another configurable button
    • better DCS/CTCSS scanning in the menu (* SCAN while in RX DCS/CTCSS menu item)
    • Piotr022 style s-meter
    • restore initial freq/channel when scanning stopped with EXIT, remember last found transmission with MENU button
    • reordered and renamed menu entries
    • LCD interference crash fix
    • many others...

Manual

Up to date manual is available in the Wiki section

Radio performance

Please note that the Quansheng UV-Kx radios are not professional quality transceivers, their performance is strictly limited. The RX front end has no track-tuned band pass filtering at all, and so are wide band/wide open to any and all signals over a large frequency range.

Using the radio in high intensity RF environments will most likely make reception anything but easy (AM mode will suffer far more than FM ever will), the receiver simply doesn't have a great dynamic range, which results in distorted AM audio with stronger RX'ed signals. There is nothing more anyone can do in firmware/software to improve that, once the RX gain adjustment I do (AM fix) reaches the hardwares limit, your AM RX audio will be all but non-existent (just like Quansheng's firmware). On the other hand, FM RX audio will/should be fine.

But, they are nice toys for the price, fun to play with.

Compiler

arm-none-eabi GCC version 10.3.1 is recommended, which is the current version on Ubuntu 22.04.03 LTS. Other versions may generate a flash file that is too big. You can get an appropriate version from: https://developer.arm.com/downloads/-/gnu-rm

clang may be used but isn't fully supported. Resulting binaries may also be bigger. You can get it from: https://releases.llvm.org/download.html

Building

Github Codespace build method

This is the least demanding option as you don't have to install enything on your computer. All you need is Github account.

  1. Go to https://github.com/armel/uv-k5-firmware-custom
  2. Click green Code button
  3. Change tab from Local to Codespace
  4. Click green Create codespace on main button
  1. Open Makefile, edit build options and save changes
  2. If necessary, open compile-with-docker.sh, edit build versions and save changes
  3. Run in terminal window
    • ./compile-with-docker.sh bandscope to compile bandscope version
    • ./compile-with-docker.sh broadcast to compile broadcast version
    • ./compile-with-docker.sh voxless to compile voxless version
    • ./compile-with-docker.sh all to compile all versions
    • ./compile-with-docker.sh custom to compile only with Makefile build options
  4. Open folder compiled-firmware
  5. Right click firmware.packed.bin
  6. Click Download, now you should have a firmware on your computer that you can proceed to flash on your radio. You can use online flasher

Docker build method

If you have docker installed you can use compile-with-docker.bat (Windows) or compile-with-docker.sh (Linux/Mac), the output files are created in compiled-firmware folder. This method gives significantly smaller binaries, I've seen differences up to 1kb, so it can fit more functionalities this way. The challenge can be (or not) installing docker itself.

Tip

On Linux/Mac, you may need to uncomment and customize the DOCKER_NETWORK environment variable at the beginning of the compile-with-docker.sh script. Note: this can introduce security risks by removing network isolation. However, if you encounter issues and are using a specific network environment (with a proxy or a firewall), this may help.

Windows environment build method

  1. Open windows command line and run:
    winget install -e -h git.git Python.Python.3.8 GnuWin32.Make
    winget install -e -h Arm.GnuArmEmbeddedToolchain -v "10 2021.10"
    
  2. Close command line, open a new one and run:
    pip install --user --upgrade pip
    pip install crcmod
    mkdir c:\projects & cd /D c:/projects
    git clone https://github.com/armel/uv-k5-firmware-custom.git
    
  3. From now on you can build the firmware by going to c:\projects\uv-k5-firmware-custom and running win_make.bat or by running a command line:
    cd /D c:\projects\uv-k5-firmware-custom
    win_make.bat
    
  4. To reset the repository and pull new changes run (!!! it will delete all your changes !!!):
    cd /D c:\projects\uv-k5-firmware-custom
    git reset --hard & git clean -fd & git pull
    

I've left some notes in the win_make.bat file to maybe help with stuff.

Credits

Many thanks to various people:

Other sources of information

ludwich66 - Quansheng UV-K5 Wiki
amnemonic - tools and sources of information

License

Copyright 2023 Dual Tachyon https://github.com/DualTachyon

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Example changes/updates

Here are a few photos.

Main Only and Dual RX Respond
Main Only and Dual RX Respond
Main Only and Dual RX Respond (invert mode)
Main Only and Dual RX Respond (invert mode)
Some new menu entries
Some new menu entries
Main Only and Spectrum Analyzer
Main Only and Spectrum Analyzer