Bug #11786
openWouxun KG-UV920P-A - Incorrect settings from uninitialized channel memory
0%
Description
Adding channels in chirp results in some weird settings being applied on the radio. Most obviously the DTMF mute function is enabled and scrambling is enabled and set to an invalid mode (together these mean you can't receive any normal signals).
This appears to be a memory initialization issue. When the radio's memory is reset, every bit is set to 1. Probably what the underlying flash or EEPROM does after a chip erase. Storing channels from the radio front panel ends up setting most things to 0 when no special functions like scrambling are enabled, and most of the "unknown" bits in the memory map are 0. Chirp only sets certain fields to known values when creating channels and leaves many bits as 1, so other settings get really weird values.
Channels in the attached image:
1, 2: Defaults that come with the radio
3: Stored from front panel with default VFO settings, no tones, no scrambling, "QT" mute mode, no repeater shift etc
4: Added with chirp, nothing changed from default except frequency
5, 6, 7: Added with chirp, a few other settings changed
8, 9, 10: Added from the radio with a few different scramble/mute settings.
Files
Updated by Stephen Cavilia about 18 hours ago
- File kguv920pa-mem-zero.patch kguv920pa-mem-zero.patch added
I came up with a patch that seems to fix this by setting most of the bytes to 0 when storing to an empty memory location.
Updated by Dan Smith about 15 hours ago
Hi Stephen, thanks for that. In general I think that's fine to apply and I can do that if you don't want to submit via github. However, what would you think about just always doing the clear before we set all the bits? That could mean that chirp wipes some feature bits that are already set on the memories, and we often do try to do the "going from empty to non-empty, clear first" pattern. However, I find it just yields more weird behavior where there's something set in the memory that doesn't mesh with what chirp is setting (like a digital flag that doesn't make sense with FM, or a squelch mode that doesn't mesh with tone, etc). It often just leads to a different kind of weirdness.
So, what would you think about just doing that always and removing the if
? And, of course, if you're looking to help decode the rest of those bits I can point you at examples for how to expose whatever they mean as extra features on the memory :)