Project

General

Profile

Actions

Bug #8947

closed

Chirp is not populating the Settings tab on Wouxun KG-UV9P

Added by Benjamin Krajmalnik about 3 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
Start date:
03/31/2021
Due date:
% Done:

100%

Estimated time:
Chirp Version:
next (py3)
Model affected:
Wouxun KV-UV9P
Platform:
All
Debug Log:
I read the instructions above:

Description

The Settings pane is not being rendered for my image file.
Settings are viewable in the Wouxun factory software.
I have seen that on the KG-UV9 Mate video from Ham Radio Crash Course (https://www.youtube.com/watch?v=XovbtR9n3Fo) it is rendering properly and allowing modification, so I do not know if it is something data-centric or has to do with the specific version of firmware.

CHIRP daily 20210310


Files

Wouxun_KG-UV9D Plus_BSR.img (32.2 KB) Wouxun_KG-UV9D Plus_BSR.img Image file from downloaded firmware Benjamin Krajmalnik, 03/31/2021 11:10 PM
Wouxun_KG-UV9D Plus_BSR(toa & abr_lvl fixed).img (32.2 KB) Wouxun_KG-UV9D Plus_BSR(toa & abr_lvl fixed).img Jim Unroe, 04/01/2021 06:02 AM
kguv9dplus_toa_abrlvl_fix.py (66.2 KB) kguv9dplus_toa_abrlvl_fix.py KG-UV9DPlus update to fix ABR_LVL and TOA settings Mel Terechenok, 11/29/2022 02:03 AM
Actions #1

Updated by Jim Unroe about 3 years ago

The following configuration options have out-of-range values in them.

Transmit Timeout Alarm (toa)
Backlight Brightness (abr_lvl)

You can probably just change these 2 settings to a different value using the radio's menu and then download to CHIRP to see if they are fixed. I any case, I have edited the original image to include values for these settings that are now in range.

Jim KC9HI

Actions #2

Updated by Benjamin Krajmalnik about 3 years ago

Hi Jim,

Just wanted to follow up. That was the issue. Working fine.
Thank you for the quick response.

Actions #3

Updated by Bernhard Hailer about 3 years ago

  • Status changed from Feedback to Closed
  • Platform changed from Windows to All

Thanks for your feedback!
Issue resolved.

Actions #4

Updated by Jim Unroe about 3 years ago

Bernhard Hailer wrote:

Thanks for your feedback!
Issue resolved.

I don't know that the issue was resolved. I just worked around it for the submitor.

CHIRP allows the Timeout Alarm setting to have a value in memory from 0 to 9. It was set to 10. I just changed it to 9.

CHIRP allows the Backlight Brightness the have a value in memory from 0 to 4. It was set to 5. I just change it to 4.

The question is "Why were these 2 settings set to an out-of-range value?" How did they get this way? Has the manufacturer changed the specifications for these settings and CHIRP needs to be adjusted to accommodate the change? I don't know. Perhaps the driver author should look into it.

Jim KC9HI

Actions #5

Updated by Benjamin Krajmalnik about 3 years ago

Hi Bernhard,

Those values were the ones on the radio as it came from the reseller, and are within the ranges that can be set both on the radio itself and via Wouxun's own software.

Actions #6

Updated by Bernhard Hailer about 3 years ago

  • Status changed from Closed to Feedback
  • Target version set to chirp-legacy

Hi Jim, I've reopened the ticket - it seems we could adapt our driver to deal with these out-of-range values?

Actions #7

Updated by Benjamin Krajmalnik about 3 years ago

Looking at the driver itself, it has the following definition:

TOA_LIST = ["Off"] + ["%ds" % t for t in range(1, 10)]

This is strange, since this is implying that 10 is a valid value here. I did not look at the backlight brightness, but I would assume it is probably similar.

Actions #8

Updated by Jim Unroe about 3 years ago

Benjamin Krajmalnik wrote:

Looking at the driver itself, it has the following definition:

TOA_LIST = ["Off"] + ["%ds" % t for t in range(1, 10)]

This is strange, since this is implying that 10 is a valid value here. I did not look at the backlight brightness, but I would assume it is probably similar.

In the Python range() function , the optional "stop" value 10 is not included the sequence of numbers that are generated. See "Python range() function":https://www.geeksforgeeks.org/python-range-function/.

The above snippet of code builds a list of: ["Off", "1s", "2s", "3s", "4s", "5s", "6s", "7s", "8s", "9s"] which is what CHIRP then uses to display the list of choices for the Transmit Timeout Alarm setting. The corresponding values that are expected to be in memory are: 0x00, 0x01, 0x02, 0x03, ox04, 0x05, 0x06, 0x07, 0x08 and 0x09

The value in the radio's memory was 0x10 which is not in the expected range of values (which caused the Settings tab to not build properly).

It is a similar situation for Backlight Brightness setting.

LIST_1_5 = ["%s" % x for x in range(1, 6)]

The above builds a list of ["1", "2", "3", "4", "5"] which is what CHIRP uses to list the choices. The corresponding values to be stored in memory are 0x00, 0x01, 0x02, 0x03, and 0x04. What was in memory and store in the image was the unexpected value of 0x05 (which also caused the Settings tab to not populate with settings).

After uploading the modified image to the radio, what are the values displayed in the radio for the Transmit Timeout Alarm and Backlight Brightness settings?

Jim KC9HI

Actions #9

Updated by Jim Unroe about 3 years ago

Bernhard Hailer wrote:

Hi Jim, I've reopened the ticket - it seems we could adapt our driver to deal with these out-of-range values?

The course of action by a developer would depend on what the root cause of the problem really is.

For many lower end Chinese models, for whatever reason, there is just a stray bad value in memory. If it appears to be a one-off thing, it can just be fixed in the image and that can be the end of it. If it happens to be a common situation affection more than a few radios, then updating the driver to force an out-of-range value to a sane value could make sense. I recently had to do this for a model that was being loaded at the factory with an incorrect TXP value in both of the radio's VFOs. I was having to help radio owners deal with the issue almost daily.

But is isn't always a stray value or a manufacturing mistake. Sometimes the design of the radio changes.

For example the early Baofeng UV-5R had an ABR menu that allowed the user to choose from OFF, 1, 2, 3, 4 and 5 to adjust the backlight timeout. Later on the radio's menu choices were expanded to include 6, 7, 8, 9 and 10. Until the driver was updated accommodate the new range of values, radios that had ABR set to a value above 5 could not access the Settings tab. While updating the driver, I did some experimenting that showed that radio was capable of understanding values up to 24, so that is currently the range that CHIRP supports.

More recently the AnyTone AT-778UV (and the Retevis RT95 variant) added the VOX to the newer radios. This added the VOX choice to the programmable function key's list of selections making it possible to choose a value that was correct for the radio but not currently acceptable for the CHIRP driver being used for that radio. I recently submitted a patch to incorporate the changes required to support this new variant that includes the VOX feature (and patiently waiting for it to be accepted).

So a developer should try to figure out what the root cause of the out-of-range values is for the KG-UV9P and then determine what the correct course of action should be. I could probably do this with the right kind of help from one or more radio owners, but I would rather it be the original developer or at least someone with access to and/or experience with the Wouxun KG-UV9P.

Jim KC9HI

Actions #10

Updated by Benjamin Krajmalnik about 3 years ago

Hi Jim,

Thanks for the clarification. I am not Python coder, so I assumed the upper value in the range() function was included in the result set, and therefore misinterpreted the definition.
So I understand everything the code is doing, but this nuance caught me :)
I just checked the radio itself after the fixed image was applied, and it is showing 9 and 4 respectively. Radio allows 10 and 5 as max values, as does the factory software.

Thanks for your efforts. Much appreciated.

Benjamin KE0MDR

Actions #11

Updated by Mel Terechenok over 1 year ago

Please Try this corrected driver that should address the issues reported. I have confirmed it opens and correctly displays the settings with the original image, however I don't have a radio to test on. If there are no problems, I can submit it for official inclusion.

To load the driver:
Open Chirp -- then select the following menu items
Help -- Enable Developer Options
File -- Load Module -- Select this driver from your download location (background will turn RED).

Actions #12

Updated by Mel Terechenok over 1 year ago

  • Status changed from Feedback to Closed
  • Assignee set to Mel Terechenok
  • Target version changed from chirp-legacy to chirp-py3
  • % Done changed from 0 to 100
  • Chirp Version changed from daily to next (py3)

submitted fix for this issue to Chirp-Next for inclusion into the daily builds on 1/17/2023.

Actions

Also available in: Atom PDF