Closed smrqdt closed 1 year ago
I have the same issue, didn’t have the time to analyze and report yet.
The mix up must be happening when reading from the radio - since I shared configs between my 868 and 878, I only edited and wrote. That worked. Plus, from the yaml it looks like it writes exactly what it (falsly) read from the radio. I am AFK right now, will check when back.. Can you confirm that writing works for you when you set the keys as they should be in the Anytone extensions?
You’re right, writing works fine. After changing the functions in qdmr they’re correctly written to the radio.
I was first under the impression the numbered and lettered Keys where swapped because of Power/Vox for PF3, but the other keys don’t match. I was confused by the read functions for funcKey3-6
which don’t exist on D878UVII. Maybe some descriptions telling which key is which would be nice (and maybe Off as default for non-existing keys?).
You’re right, writing works fine. After changing the functions in qdmr they’re correctly written to the radio.
Thanks for testing, so it is the "read" process that needs fixing.
I was first under the impression the numbered and lettered Keys where swapped because of Power/Vox for PF3, but the other keys don’t match. I was confused by the read functions for
funcKey3-6
which don’t exist on D878UVII. Maybe some descriptions telling which key is which would be nice (and maybe Off as default for non-existing keys?).
@hmatuschek mentinoned in https://github.com/hmatuschek/qdmr/issues/298#issuecomment-1568093684 that the 578 has more keys. Since "tooltips" are supported, maybe some explanation on the actual labels on the device is possible?
Some observations: this is the list with key settings:
typedef enum { Off = 0x00, Voltage = 0x01, Power = 0x02, Repeater = 0x03, Reverse = 0x04, Encryption = 0x05, Call = 0x06, VOX = 0x07, ToggleVFO = 0x08, SubPTT = 0x09, Scan = 0x0a, WFM = 0x0b, Alarm = 0x0c, RecordSwitch = 0x0d, Record = 0x0e, SMS = 0x0f, Dial = 0x10, Monitor = 0x12, ToggleMainChannel = 0x13, HotKey1 = 0x14, HotKey2 = 0x15, HotKey3 = 0x16, HotKey4 = 0x17, HotKey5 = 0x18, HotKey6 = 0x19, WorkAlone = 0x1a, SkipChannel = 0x1b, DMRMonitor = 0x1c, SubChannel = 0x1d, PriorityZone = 0x1e, VFOScan = 0x1f, MICSoundQuality = 0x20, LastCallReply = 0x21, ChannelType = 0x22, Roaming = 0x24, ChannelRanging = 0x25, MaxVolume = 0x26, Slot = 0x27, APRSType = 0x28, Zone = 0x29, RoamingSet = 0x2a, APRSSet = 0x2b, Mute=0x2c, CtcssDcsSet=0x2d, TBSTSend = 0x2e, Bluetooth = 0x2f, GPS = 0x30, ChannelName = 0x31, CDTScan = 0x32, APRSSend = 0x33, APRSInfo = 0x34
I set the keys to the settings starting with "Voltage" and they are read "off by one": when I set a key to "VOX" (0x07), qdmr displays "Call" (0x06). But - the table above show values off by more that one position?
One thing that cloud contribute is the "Monitor" (0x12) function. It can only be set to a short press and then the long press is not selectable
Ok, I have to investigate that one a bit more. I've used the same code-table for the encoding and decoding of the function keys. Either the mapping is wrong, or (what I actually believe) there are different mappings for the different modes (long/short) and possibly for the different keys. This setting is and was always a real headache.
I also fixed up the entries for my 878 in a saved qdmr file and then wrote it to the radio. After that the key functions were restored, so it looks like the write works fine.
By the way, you do not need to edit the yaml files by hand. Enable Show device extensions in the Settings dialog. Then you should find a tree view of the extensions for all devices. You will then find the AnyTone key settings in the general Settings tab (right) under Anytone -> keySettings.
For the 578, new firmware has been released: http://www.wouxun.us/category.php?category_id=94 (Changelog http://www.wouxun.us/Software/AnyTone-Software/AT-D578UVII-PLUS-v2.06.2-Changelog.pdf) So it is very likely that the 878 will receive new firmware shortly, too. Upgrade recommendation for this new version for the 578 is not to re-use the old configuration but to start with an empty config (and do CVS export/import etc.) so it sounds like internal structures may have changed. Maybe it is worth waiting for the new firmware for the 878 and pick up from there?
Probably. However, it sounds like, they broke the codeplug format (again). As there is no firmware version information in the handshake, I cannot check for compatibility.
Once upon a time, AnyTone had backward comparability of the binary codeplug format even across models (e.g., You could -- in principle -- load a 878 codeplug onto a 868 and vice versa.). Now, they break it constantly even with minor FW updates.
As inconvenient as this bug is - qdmr writes correctly, so problems only arise when making changes outside qdmr and needing to read from the radio. Since it sounds like "big changes ahead": then save the dev/debug energy for the probably changed codeplug format in the coming firmware. Since "keySettings:" is a pretty obvious block in the yaml file that should not change position, a diff should fix things when needing to read and before write? Maybe faster than using the GUI. Yes, somewhat "hacky", but should work?
@hmatuschek While above "workaround" mitigates the problem, it is still frustrating that qdmr is reading "wrong". Regarding this issue: an 878 only has funcKey1-2 and A-C. Still, qdmr reads values for all other keys as well. The radio actually has values for non-existent keys in the config? Is there a way to set the non-existent keys to "Off" on read?
Onto the actual problem: Trying to find an "offset". Settings how they should be: funcKeyAShort: DMRMonitor (DMRMonitor = 0x1c) funcKeyALong: Scan (Scan = 0x0a) funcKeyBShort: Monitor (Monitor = 0x12) funcKeyBLong: Off (Off = 0x00) funcKeyCShort: Voltage (Voltage = 0x01) funcKeyCLong: Power (Power = 0x02)
Settings how they are read: funcKeyAShort: Off (Off = 0x00) funcKeyALong: Encryption (Encryption = 0x05) funcKeyBShort: Voltage (Voltage = 0x01) funcKeyBLong: Call (Call = 0x06) funcKeyCShort: Power (Power = 0x02) funcKeyCLong: VOX (VOX = 0x07)
Interesting thing here: values on read are increasing 0-1-2 and 5-6-7 When I set funcKeyCLong to "TalkAround/Repeater" (right after Tx Power/Power in the radio menu), it stays at "VOX", though, and: the values qdmr reads from my radio (with different settings) are the exact same ones @smrqdt reported above! Is qdmr reading the same positions it is writing to? Since writing works?
Set funcKeyCLong to "FM Radio/WFM = 0x0b: on read, still displayed as "VOX" (0x07). It should change, shouldn't it? What can be the reason that it does not and why are the values so remarkable in a row?
OMG, look at the diff: https://github.com/hmatuschek/qdmr/commit/8837668ef53eb75193d7ca04b5aab9458bf45a2e
The clue: The values you mentioned, are the default values for those settings. So, they are never set. (I first checked, if the addresses are OK, they where.) Please let me know, if that patch fixed it. (branch fix-d878uv2-key-function-decoding)
@smrqdt @toco @francais01 : please give fix-d878uv2-key-function-decoding a try - for me, qdmr is reading the correct values now! Thanks @hmatuschek ! Well, sometimes a step back and a second try leads to success - nice job! To err is human.. With the 878, funcKey 3-6 seem to have "random" values on read? Is the mapping "qdmr names" <-> "buttons on the radio" already documented somewhere? Would a tool tip be possible?
Tested with 0438e77 and it looks good to me.
Is the mapping "qdmr names" <-> "buttons on the radio" already documented somewhere? Would a tool tip be possible?
I agree this would be helpful. To me it looks like the mapping is:
qdmr | AnyTone D878UVII+ |
---|---|
funcKey1 |
P1 |
funcKey2 |
P2 |
funcKeyA |
PF1 |
funcKeyB |
PF2 |
funcKeyC |
PF3 |
Thanks for the overview. In fact, this is (somewhat cryptic) documented in the manual: (scroll down to Keypad settings extension fields).
Very nicely documented!
Breadcrumb: Anytone function key description manual link section differences models 878 578 mapping picture table
qdmr 0.11.3 mixes up PF1, PF2 and PF3 key functions when reading from and re-writing to Anytone D878IV II Plus with firmware 3.02n.
Steps to reproduce:
funcKeyAShort
funcKeyALong
funcKeyBShort
funcKeyBLong
funcKeyCShort
funcKeyCLong
Anytone CPS before using qdmr
qdmr codeplug
excerpt from yaml
Anytone CPS after programming with qdmr
I can provide the Anytone codeplugs before/after if useful.
Versions
Anytone D878UVII Plus with Firmware 3.02n qmdr 0.11.3