Author Topic: Quansheng UV-K5(8) firmware modding  (Read 1184 times)

0 Members and 2 Guests are viewing this topic.

Offline radiolistenerTopic starter

  • Super Contributor
  • ***
  • Posts: 3408
  • Country: ua
Quansheng UV-K5(8) firmware modding
« 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 which is designed for Windows and is based on k5prog which is available on linux.

Tried k5prog:
Code: [Select]
$ ./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?
« Last Edit: April 23, 2024, 10:43:42 am by radiolistener »
 

Offline radiolistenerTopic starter

  • Super Contributor
  • ***
  • Posts: 3408
  • Country: ua
Re: Quansheng UV-K5(8) firmware modding
« Reply #1 on: April 23, 2024, 11:28:44 am »
According to source code, it seems that the EEPROM size is 0x00002000 (8192) bytes.
And the last 0x00000200 (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?
« Last Edit: April 23, 2024, 11:31:17 am by radiolistener »
 

Online mag_therm

  • Frequent Contributor
  • **
  • Posts: 700
  • Country: us
Re: Quansheng UV-K5(8) firmware modding
« Reply #2 on: April 24, 2024, 06:58:27 pm »
In case you have not already,
search "Chirp" and "Quansheng UV-K5-8 firmware"
They might get you to a forum with users
 

Offline radiolistenerTopic starter

  • Super Contributor
  • ***
  • Posts: 3408
  • Country: ua
Re: Quansheng UV-K5(8) firmware modding
« Reply #3 on: April 25, 2024, 02:05:34 pm »
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?
« Last Edit: April 25, 2024, 02:08:21 pm by radiolistener »
 

Offline pienari

  • Regular Contributor
  • *
  • Posts: 70
  • Country: fi
Re: Quansheng UV-K5(8) firmware modding
« Reply #4 on: April 25, 2024, 07:51:48 pm »
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.
 

Offline radiolistenerTopic starter

  • Super Contributor
  • ***
  • Posts: 3408
  • Country: ua
Re: Quansheng UV-K5(8) firmware modding
« Reply #5 on: April 25, 2024, 08:53:21 pm »
I backupped old fw of my K5.

How?

According to source code research, I can backup entire EEPROM with this command:
Code: [Select]
./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:
Code: [Select]
[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:
Code: [Select]
./k5prog -F -YYY -b firmware.bin
Still looking for a way to get current firmware from the radio
« Last Edit: April 25, 2024, 09:07:53 pm by radiolistener »
 

Offline dobsonr741

  • Frequent Contributor
  • **
  • Posts: 674
  • Country: us
Re: Quansheng UV-K5(8) firmware modding
« Reply #6 on: April 26, 2024, 12:01:20 am »
Instead getting FW from radio you can always go the official firmware as posted on http://qsfj.com/products/3268
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf