EEVblog Electronics Community Forum
Electronics => RF, Microwave, Ham Radio => Topic started by: radiolistener on April 23, 2024, 10:30:53 am
-
just bought Quansheng UV-K5-8 radio.
I want to play with custom firmwares with AM/SSB and spectrum view.
But first I want to backup factory firmware and calibration data. But it's not clear, how to do it on linux?
I read that on windows it can be done with k5prog-win (https://github.com/OneOfEleven/k5prog-win) which is designed for Windows and is based on k5prog (https://github.com/sq5bpf/k5prog) which is available on linux.
Tried k5prog:
$ ./k5prog -r -v
Quansheng UV-K5 EEPROM programmer v0.9 (c) 2023 Jacek Lipkowski <sq5bpf@lipkowski.org>
k5_prepare: try 0
cmd: 15 05 ok:1
****** Connected to firmware version: [2.01.32]
Successfully read EEPROM
It wrote k5_eeprom.raw file with size 8192 bytes. But I'm not sure is that eeprom file contains calibration data, or is it needs to be read with different command?
And I don't see the option in k5prog to read exiting firmware from radio. In documentation it has option -b to write firmware, but I want to read it from the radio. Is it possible?
-
According to source code (https://github.com/OneOfEleven/k5prog-win/blob/a8af838b91bf17027179881accc1701949d66a0b/Unit1.cpp#L3561), it seems that the EEPROM size is 0x00002000 (https://github.com/OneOfEleven/k5prog-win/blob/a8af838b91bf17027179881accc1701949d66a0b/Unit1.h#L76) (8192) bytes.
And the last 0x00000200 (https://github.com/OneOfEleven/k5prog-win/blob/a8af838b91bf17027179881accc1701949d66a0b/Unit1.h#L75) (512) bytes is a calibration data block. Is it correct?
So, if I understand correctly, k5prog -r reads all EEPROM include factory calibration data and it is enough for backup. Is it correct?
-
In case you have not already,
search "Chirp" and "Quansheng UV-K5-8 firmware"
They might get you to a forum with users
-
I was used Chirp on windows. But now I'm on linux and looking for linux software which is open source. Chirp is more general software, I want some specific for the radio to avoid a bunch of unwanted code and data.
At a glance it looks that k5prog is good enough for all modding stuff. I saved backup of EEPROM calibration data.
But I still didn't tried to flash custom firmware, because I don't know how to backup existing firmware.
It looks that there is no way to read existing firmware through baofeng cable. Is it correct?
-
Hi.
I backupped old fw of my K5.
But never going to back, new modded works so well.
There is 2 different programs, fw updater and other to add frequency etc.
I have heard Chirp works but havent tested yet.
-
I backupped old fw of my K5.
How?
According to source code research, I can backup entire EEPROM with this command:
./k5prog -r -v
it reads 8192 (0x2000) bytes, the last 512 (0x200) contains calibration data.
At offset 0x1F40 there are 8 uint16_t values which define battery indicator values:
[0] - 0 bar value
[1] - 1 bar value
[2] - 2 bar value
[3] - 3 bar value it equals to ADC value for 7.6 V
[4] - 4 bar value
[5] - always 0x2300 ???
[6] - always 0xFFFF ???
[7] - always 0xFFFF ???
The battery voltage can be calculated as V = (760 * ADC) / [3] / 100
And I can write new firmware to the radio with this command:
./k5prog -F -YYY -b firmware.bin
Still looking for a way to get current firmware from the radio
-
Instead getting FW from radio you can always go the official firmware as posted on http://qsfj.com/products/3268 (http://qsfj.com/products/3268)