Quansheng UV-K5 w/ an active development scene

VK3KYY
Posts: 7590
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia

Re: Quansheng UV-K5 w/ an active development scene

Post by VK3KYY » Sat Jul 22, 2023 6:14 am

I actually have 2 of these radios on order at the moment.

However looking at the processor in the radio and also the EEPROM size; what can be done with this radio is relatively limited

The CPU / MCU processor appears to be a Chinese clone of the STM32G030x8
This is a quite low spec device. Only 64k of program memort space, compared with 512k on the GD77 and 1024k on the UV-380/DM-1701/MD-9600.
It also only has 8k RAM. Whereas the GD77 has I think 128k and I think the UV-380/DM-1701/MD-9600 have something like 192k (its not all completely accessible by the processor)

This radio also only had a 64k EEPROM and no other memory. Compare that to the GD-77 additional has 1Mb of Flash memory and the UV-380/DM-1701/MD-9600 have 16Mb

The processor is also not fast. I think its 48Mhz instead of the 168Mhz processor in the UV-380/DM-1701/MD-9600.

I think you get the picture.

The existing 'hacks' are basically single additional patches that can only be applied one at a time to the official firmware.

i.e There probably isn't space to support the RSSI bar graph, and the specrum analyser and the Pong game all at the same time, otherwise I suspect the author would have at least bundled the RSSI functions in the same package or the RSSI stuff and the spectrum analyser

What the developer has done is basically intercepted the System Timer Interrupt, and either runs his code or the official code, or his code then the official code.


What the devloper has done is technically clever, but ultimately fairly limited.

Before the OpenGD77 development started, I worked on doing something similar with the GD77 to allow direct TalkGroup entry and improving the DMR ID database functionality. But ultimately I realised this was not a good approach, becuase patching the official firmware gets progressively more difficult as you try to add more functionality, and you very quickly run out of program space.


What is quite interesting in this radio is its RF chip, as it operates over a very wide frequency range.
However, the available documentation appears to be incomplete, becuase the official firmware seems to be able to receive AM, but the data sheet for the RF chip makes no mention of AM or even mode selection.

I've been told by people who own this radio that the AM reception is not at all clear. So possibly the RF chip is actually FM only and the official firmware is doing some trick to receive AM.
Or possibly the RF chip can be sent additional microcode by the CPU to add functionality. This would be the same as the SI4735 radio chip, where Tecsan radios using this chip, sent it secret microcode to allow the chip to support SSB Rx even though this is not in its data sheet

The hackers intercepted this microcode and used it in various Arduino based receivers.

So potentially the RF chip in this radio has some undocumented features.

But as no one seems to have done a teaddown to the point of looking at the data traffic between the MCU and the RF chip, ... ADFIK no one knows how to actually set the RF chip into AM mode.


Edit 1

The RF chip used in this radio is completely different from the RF chip in the GD77/DM1701/UV380 and to the RF section in the MD9600

So it would not be possible to take any hacks for this radio and use them on any of the OpenGD77 supported radios.

Edit 2

The RF chip is a BK4819

The data sheet has this text
The BK4819 is a half duplex TDD FM transceiver operating within 18 MHz ~ 660, MHz, 840 MHz ~1300 MHz band range
So according to the data sheet its FM only, but includes some FSK
Besides speech communication, the BK4819 on-chip FSK data modem supports F2D and F1W emission to be used in both FRS and DPMR band for text message and GPS information exchange

User avatar
m1dyp
Posts: 605
Joined: Sat Nov 16, 2019 8:03 am
Location: Hertfordshire, U.K.
Contact:

Re: Quansheng UV-K5 w/ an active development scene

Post by m1dyp » Sat Jul 22, 2023 8:51 am

very interesting, thank you

VK3KYY
Posts: 7590
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia

Re: Quansheng UV-K5 w/ an active development scene

Post by VK3KYY » Sun Jul 23, 2023 1:41 am

The method of AM detection puzzles me, becuase I wasn't aware that you could detect AM on a FM receiver.

I did a search on AM edge detection but I didnt see any results relating to radios

It's well know that you can listen to FM signals on a AM receiver using slope detection, but thats something completely different.

So I'm taking the information about 'edge detection' with a grain of salt at the moment.

Re: 60k firmware files

Yes. The bootloader seems to be 4k, so the maximum application size would be 60k, as the entire ROM size is 64k

In terms of replacing the EEPROM. Yes, it could be replaced but the official firmware would not use any extra space and EEPROMs are generally not as big as Flash memory chips.

Flash chips seem to normally be accessed via SPI but I think they may also have a I2C interface, but again changing to a flash chip would not work with the official firmware


You could also completely replace the MCU with a much more capable version. A lot of STM MCU's have a common pinout and even sticking to the G series there are versions with up to 512k ROM and 144k RAM

However as the RF chip doesnt seem to really do anything except FM , according to its spec, it would not be worthwhile.


I guess the only thing going for this radio is that the firmware encryption has been hacked and its cheap, so possibly would be good to build custom firmware for specific functions e.g. remote monitoring, as the RF is capable of FSK data transmission

OE1MWW
Posts: 106
Joined: Sat Oct 17, 2020 2:20 pm
Location: JN88EG
Contact:

Re: Quansheng UV-K5 w/ an active development scene

Post by OE1MWW » Sun Jul 23, 2023 7:45 am

AM demodulation, or better said - listening to AM signals is done via slope detection.
At least two user replied that to my question about receiving AM. In Facebook are two
diffent UV-K5 groups, one from UK an another english one. I asked the same question
in both groups about receiving AM.

Several users replied: 'horrible', 'garbage', '...rubbish for AM and they should be taken to
court for false advertising...' and some posted short videos with awfull sound on recording.

Looks like, strong AM signals are more distorted than weak AM. => slope detector ???

There is a model UV-K5(8), different (nice) housing, but electric the same device.
Now to be found on BangGood as UV-K6. My further search - the following document:
http://www.oe1mww.work/UV-K5.pdf

G4EML
Posts: 930
Joined: Sat Nov 16, 2019 10:01 am

Re: Quansheng UV-K5 w/ an active development scene

Post by G4EML » Sun Jul 23, 2023 10:19 am

I suspect that people are wrongly using the term slope detection. As Roger said, slope detection really refers to receiving FM on an AM radio. It was used a lot in the early days of amateur FM when many receivers were AM only. By slightly offsetting the tuning so that the signal is placed on the side slope of the IF filter, frequency changes are converted to amplitude changes which makes the signal detectable.

There is no simple equivalent when receiving an AM signal on an FM receiver. All FM receiver's amplify the incoming signal in a limiter stage which deliberately removes any amplitude variation and then apply it to discriminator which is effectively a sloping response filter which converts the FM to AM which is then detected.

No limiter is perfect, so it's effect will be greater on strong signals than weak ones. So what they might be doing is reducing the IF gain to a point where the limiter is less effective. The resulting output would then still have an AM component which would be detected by the discriminator stage.

The limiter would still introduce a lot of amplitude distortion which is what people are hearing. It would work better on weak signals as has been suggested.

Colin G4EML.

VK3KYY
Posts: 7590
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia

Re: Quansheng UV-K5 w/ an active development scene

Post by VK3KYY » Sun Jul 23, 2023 10:51 am

OE1MWW wrote:
Sun Jul 23, 2023 7:45 am
There is a model UV-K5(8), different (nice) housing, but electric the same device.
Now to be found on BangGood as UV-K6. My further search - the following document:
http://www.oe1mww.work/UV-K5.pdf
This document can't be true because at the very least, the display is a different colour in some models.

Also, people have measured the capacitor values in the audio section and say they are different in the newer models.

Also, unless they redesigned the UV-5R recently, it uses a different RF chip to the chip these radios.

VK3KYY
Posts: 7590
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia

Re: Quansheng UV-K5 w/ an active development scene

Post by VK3KYY » Sun Jul 23, 2023 10:52 am

G4EML wrote:
Sun Jul 23, 2023 10:19 am
There is no simple equivalent when receiving an AM signal on an FM receiver. All FM receiver's amplify the incoming signal in a limiter stage which deliberately removes any amplitude variation and then apply it to discriminator which is effectively a sloping response filter which converts the FM to AM which is then detected.

No limiter is perfect, so it's effect will be greater on strong signals than weak ones. So what they might be doing is reducing the IF gain to a point where the limiter is less effective. The resulting output would then still have an AM component which would be detected by the discriminator stage.

The limiter would still introduce a lot of amplitude distortion which is what people are hearing. It would work better on weak signals as has been suggested.
So I wonder if the AT1846S in the GD77 and UV380 etc could demodulate AM in a similar way.

Albeit, equally badly.

OE1MWW
Posts: 106
Joined: Sat Oct 17, 2020 2:20 pm
Location: JN88EG
Contact:

Re: Quansheng UV-K5 w/ an active development scene

Post by OE1MWW » Sun Jul 23, 2023 6:32 pm

VK3KYY wrote:
Sun Jul 23, 2023 10:51 am
OE1MWW wrote:
Sun Jul 23, 2023 7:45 am
There is a model UV-K5(8), different (nice) housing, but electric the same device.
Now to be found on BangGood as UV-K6. My further search - the following document:
http://www.oe1mww.work/UV-K5.pdf
This document can't be true because at the very least, the display is a different colour in some models.

Also, people have measured the capacitor values in the audio section and say they are different in the newer models.

Also, unless they redesigned the UV-5R recently, it uses a different RF chip to the chip these radios.
Look at https://www.youtube.com/watch?v=QnS4jQA9CoQ and read some of the comments,
including the answers on some. Seems the UV-K5(8) and the UV-K6 are the same, binaries are compatible.

Reminds me of the joke: China man reply: 'mistel.. leal plastic.. no imitation.' (mister, real plastic, no imitation)

VK3KYY
Posts: 7590
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia

Re: Quansheng UV-K5 w/ an active development scene

Post by VK3KYY » Wed Aug 02, 2023 4:56 am

Various vendors are selling what they claim to be UV-K5 for less than $10. (i.e old model not new model radios)

I've taken a gamble and ordered one of these, but it could be a scam and I may receive nothing.
However AliExpress are usually quite good when recovering money on scams

ok1pt
Posts: 167
Joined: Mon Jul 20, 2020 3:38 am

Re: Quansheng UV-K5 w/ an active development scene

Post by ok1pt » Wed Aug 02, 2023 6:29 am

Hi!
I would like to ask the users of this radio: Is there a firmware which is capable of FM TX/RX on the "4M" (73-84MHz) band ? In my country (Czech Republic) this band is used commercially but there are some "shared channels", which don't need any licensing or registering to use them. Similar channels are allocated on "standard" bands like 160 or 450 MHz, but they are much more used because there is a lot of available radios. If it is possible to transmit, what's the achievable power and spectral purity ? Can it be used ? These shared channels are limited to 1W ERP so I don't need more, but I'm afraid of spurious emissions...
With regards / 73,
Pavel OK1PT

Locked