Experimental Baofeng RD-5R version

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

Re: Experimental Baofeng RD-5R version

Post by VK3KYY » Fri May 08, 2020 7:45 am

Thanks Nocola

I think I found the problem

When EW1ADG coverted the firmware he thought the address in the memort of the calibration data was 0x00017c00 , so this is the data we use.

However, I just looked in my Flash backup for memory which looks like calibration data, and I found 6 different copies of the calibration data in the Flash memory !!!

For anyone interested in this, if you open the backup using a hex editor like Hxd ( https://mh-nexus.de/en/hxd/ ) and search for Hex bytes A0 0F in the pattern I find data blocks starting with A0 0F at address

0xF000 (this is the OpenGD77 copy of the calibration)
0x17C00 (this is the address we copy the data from - into 0xF000

But there are also blocks at
0x2F000
0x30000 (same as in 0x2F000)
0x38000 (same as in 0x17C00)
0x4F400 (same as in 0x30000 and 0x2F000)

0x6D000 (same as 0x8F000)
0x8F000 (same as 0x6D000)

So there are 3 completely different sets of calibration data in the Flash memory

One version is in

Version 1 0x17C00 and 0x38000
Version 2 0x2F000 and 0x30000 and 0x4F400
Version 3 0x6D000 and 0x8F000


We already use the version at 0x17C000 which is definitely wrong.

So the correct version must be version 2 or version 3. I will need to try both of these versions, to see if either of them gives the correct frequency.


Looking at the data in my backup, the data in 0x6D000 and 0x8F000 seem to have values for the Reference oscillator which look like they are correct, because the value needed by my radio is around 975 and all the other data have values more than 1000 and in some cases more than the max value of 1023

I will try using 0x6D000 in my radio.

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

Re: Experimental Baofeng RD-5R version

Post by VK3KYY » Fri May 08, 2020 11:47 am

OK.

I decrypted the official firmware 2.1.6 and loaded it into Ghidra to decompile it, to look for the various addresses that contain the calibration data.

But I found references in the decompilation to 0x30000 and 0x6D000 and also 0x8F000, so this method was inconclusive to determine which address the official firmware uses.

So. I modified the OpenCPS to access address 0x8F000.

I loaded the official firmware 2.1.6 and transmitted on 438.000 and looked at the centre frequency using my SDR dongle, (and it showed the frequency was 437.999537 - but my SDR is not calibrated, so this is probably 438.000000 Mhz)

I then reloaded the OpenGD77, used the modified CPS to change the Reference Oscillator value to 900 (very low).

Reloaded the official firmware, and looked at the Tx freq using my SDR, and the frequency was a lot lower (probably 5kHz lower)

I then reloaded the OpenGD77, then used the CPS to set the Ref Osc to 1022 almost the max value

Reloaded the official firmware, and looked at the Tx freq using my SDR, and the frequency was higher than 438.000000

I then reloaded the OpenGD77, then used the CPS to set the Ref Osc to 969, which was the value before my tests,

Reloaded the official firmware, and looked at the Tx freq using my SDR, and the frequency was back to 437.999537Mhz


So.. After all these tests, I'm sure the Calibration data is at 0x8F000 which is the same address as the GD-77, except the signature bytes are not the same as the GD-77

I then modified the firmware to use 0x8F000 as the address of the factory calibration, and also added a feature to re-copy the official calibration data into the OpenGD77 calibration data location, if SK2 is pressed when the radio is turned on (this also resets all other settings)

The updated firmware can be downloaded from here

https://github.com/rogerclarkmelbourne/ ... /D20200507

Specifically

https://github.com/rogerclarkmelbourne/ ... enRD5R.sgl

Please try this version.

BTW. I have not tested the Tx power with this new calibration.

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

Re: Experimental Baofeng RD-5R version

Post by VK3KYY » Fri May 08, 2020 11:56 am

Edit.

I could not resist checking the power calibration, and it was wrong, but I changed the calibration multipler to the same value as in the GD-77 and DM-1801 and the power is now working correctly !!!!

Please download from the link in the previous post and also test the power.

Note. The power calibration in my radio was not accurate even with the official firmware

On UHF. Low was 1.5W and High was 4.6W, this is the same now in the Open firmware

I have not tested power levels below 1W, I will probably need to make some changes to the firmware to adjust for the PA dynamics of this radio, but at least 1W and 5W are now OK!

NicolaLZP
Posts: 6
Joined: Wed Apr 29, 2020 12:45 pm

Re: Experimental Baofeng RD-5R version

Post by NicolaLZP » Fri May 08, 2020 12:43 pm

Tested now: power and frequency levels are ok. Great!

W2RAU
Posts: 5
Joined: Tue Dec 24, 2019 4:02 pm

Re: Experimental Baofeng RD-5R version

Post by W2RAU » Fri May 08, 2020 8:34 pm

Please forgive if this is not posted in the correct location, as I am not the most technical user.

I and several others are still having a problem with the RD-5R running OpenGD77 not connecting to MMDVM hotspots. I have two RD-5Rs. When both had factory firmware they keyed-up and connected to two different hotspots with offsets of ~.25 and a resulting BER of ~.2 With OpenGD77 firmware, one of the RD-5Rs will no longer key-up the hotspots or show any input activity (RX is fine). That radio also still works fine with DMR repeaters and analog.

Tried the latest firmware indicated above, but there is no change. Is anyone working on this issue? I need to be able to use hotspots as well as repeaters with this radio. Should I convert back to factory firmware?

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

Re: Experimental Baofeng RD-5R version

Post by VK3KYY » Fri May 08, 2020 11:00 pm

I've updated the firmware to automatically check whether the version of calibration data that is in use is the correct version

If its incorrect, the firmware will now automatically copy the correct official calibration data to the location which the Open DMR firmware uses.

Can anyone who is still experiencing issues, please try the latest version which I just uploaded

https://github.com/rogerclarkmelbourne/ ... enRD5R.sgl

Note. This is in the same location as the previous version, but the firmware has changed

SO5AJG
Posts: 91
Joined: Sat Nov 16, 2019 3:44 pm
Location: Warsaw, Poland

Re: Experimental Baofeng RD-5R version

Post by SO5AJG » Sat May 09, 2020 10:11 am

At least success with me. The radio is already connecting to a single-slot hotspot. With two-slot I had to change the Tx radio from -700Hz to -50Hz. The same is for a single-slot hotspot. Practically the frequency settings are the same as with the factory software. Big congratulations Roger for the huge commitment and effort in finding a solution to the problem, and finally succeeded.

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

Re: Experimental Baofeng RD-5R version

Post by VK3KYY » Sat May 09, 2020 10:43 am

My RD-5R is now working very well.

Its working with my Duplex hotspot, using the same offset as my GD-77.

I have calibrated all my radios to the same Tx freq, by comparing them using my SDR receiver dongle.

The one radio that does not work with my hotspot is my DM-1801, but I don't know why, as I calibrated its frequency to be the same as other radios.

SO5AJG
Posts: 91
Joined: Sat Nov 16, 2019 3:44 pm
Location: Warsaw, Poland

Re: Experimental Baofeng RD-5R version

Post by SO5AJG » Sat May 09, 2020 10:57 am

I was waiting all the time for positive results from you and I lived to see it. I did not want to move the offset in the hotspot, because other radios would part and all four RD-5R, AnyTone 878, MD380 and GD-77 would work. Of course, the biggest problem was with the RD-5R, because I set the frequency on the 434,500MHz hotspot and with such shift as the RD-5R had, I entered the 435-438MHz band that was forbidden in hotspots, and hence there was probably also a problem. I'm happy and YOU probably also Roger.
Thanks.

SO5AJG
Posts: 91
Joined: Sat Nov 16, 2019 3:44 pm
Location: Warsaw, Poland

Re: Experimental Baofeng RD-5R version

Post by SO5AJG » Sat May 09, 2020 12:47 pm

I have one more problem with this radio, namely when I am listening to the Echo I can hear such a clicking noise in the background. Similarly to using a microphone-speaker from analog radio. I conducted the tests using an internal microphone. Naturally, you can only hear it with digital modulation. The strangest thing is that some correspondents confirm this effect and others do not. Even with direct digital communication, they didn't hear that sound. For now, despite various attempts, even using an external antenna was also audible. I don't know what it comes from. On the factory software this effect also occurs, but not everyone pays attention to it and you can probably hear it on every radio, because in the end it occurs in the background and not always with the same strength and usually at the beginning of the conversation.

Post Reply