Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anytone D878: Every code-plug read appends to autoRepeaterSettings/offsets in the config. #348

Closed
toco opened this issue Jun 19, 2023 · 11 comments · Fixed by #352
Closed
Assignees
Labels
bug Something isn't working

Comments

@toco
Copy link

toco commented Jun 19, 2023

With each download for the code-plug from my Anytone AT-D878UVII Plus it appends the same offsets to the autoRepeaterSettings.
Reproduced with qdmr at a335412 and Anytone firmware 3.02n (this also happened with 3.01 already).

    autoRepeaterSettings:
      directionA: Off
      directionB: Off
      vhfMin: 136 MHz
      vhfMax: 174 MHz
      uhfMin: 400 MHz
      uhfMax: 480 MHz
      vhf: off287
      uhf: off288
      vhf2Min: 136 MHz
      vhf2Max: 0 Hz
      uhf2Min: 400 MHz
      uhf2Max: 480 MHz
      vhf2: off287
      uhf2: off288
      offsets:
        - id: off1
          name: ""
          offset: 600 kHz
        - id: off2
          name: ""
          offset: 5000 kHz
        - id: off3
          name: ""
          offset: 600 kHz
        - id: off4
          name: ""
          offset: 5000 kHz
        - id: off5
          name: ""
          offset: 600 kHz
        - id: off6
          name: ""
          offset: 5000 kHz
        - id: off7
          name: ""
          offset: 600 kHz
        - id: off8
          name: ""
          offset: 5000 kHz
        - id: off9
          name: ""
          offset: 5000 kHz
        - id: off10
          name: ""
          offset: 600 kHz
        - id: off11
          name: ""
          offset: 600 kHz
        - id: off12
          name: ""
          offset: 5000 kHz
        - id: off13
          name: ""
          offset: 600 kHz
        - id: off14
          name: ""
          offset: 5000 kHz
        - id: off15
          name: ""
          offset: 600 kHz
        - id: off16
          name: ""
          offset: 5000 kHz
        - id: off17
          name: ""
          offset: 600 kHz
        - id: off18
          name: ""
          offset: 5000 kHz
        - id: off19
          name: ""
          offset: 600 kHz
        - id: off20
          name: ""
          offset: 5000 kHz
        - id: off21
          name: ""
          offset: 600 kHz
[…]
        - id: off286
          name: ""
          offset: 5000 kHz
        - id: off287
          name: ""
          offset: 600 kHz
        - id: off288
          name: ""
          offset: 5000 kHz
@toco toco changed the title Every code-plug read appends to autoRepeaterSettings/offsets in the config. Anytone D878: Every code-plug read appends to autoRepeaterSettings/offsets in the config. Jun 19, 2023
@allesand
Copy link

allesand commented Jun 19, 2023

Can confirm:
[...]

        - id: off431
          name: ""
          offset: 600 kHz
        - id: off432
          name: ""
          offset: 7600 kHz

These are referenced in

   autoRepeaterSettings:
[...]
      vhf: off431
      uhf: off432

@hmatuschek
Copy link
Owner

Cannot reproduce it here with a D878UV on 3.02n. However, there might be subtle differences between these firmwares. Could one attach a binary codeplug here, so I reproduce it? Read it from the device using

dmrconf read d878uv2_codeplug.dfu

The filename does not matter, just the file extension.

@toco
Copy link
Author

toco commented Jun 19, 2023

Here you go:
d878uv2_codeplug.dfu.zip

@hmatuschek
Copy link
Owner

Ok, thanks. I know exactly what happens here, but I don't know why yet. So this only happens when one writes the config to the radio. That is, simply reencoding from a YAML codeplug does not trigger it. I.e.,

dmrconf decode --radio=d878uv2 codeplug.dfu codeplug.yaml
dmrconf encode --radio=d878uv2 codeplug.yaml codeplug.dfu
dmrconf decode --radio=d878uv2 codeplug.dfu codeplug.yaml

is fine. At some point in the decoding, the offsets are added once again.

@hmatuschek hmatuschek self-assigned this Jun 20, 2023
@hmatuschek hmatuschek added the bug Something isn't working label Jun 20, 2023
@hmatuschek
Copy link
Owner

Ok, was a trivial mistake. Should be fixed in 'fix-anytone-repeater-offsets'.

@allesand
Copy link

@toco Looking good here. Can you confirm? I was already wondering about the ever growing yaml file - not anymore :-)

@hmatuschek
Copy link
Owner

In fact, this was an issue affecting all AnyTone devices but only happened in the GUI. The GUI uses a single Config instance throughout the entire runtime. When you open a new codeplug or read one from a device, this instance gets reset. This reset, however, never reached the AnyTone setting extension and consequently, the repeater offset frequency list was never cleared.

@hmatuschek hmatuschek linked a pull request Jun 20, 2023 that will close this issue
@toco
Copy link
Author

toco commented Jun 20, 2023

Verified on 9bde48b, the list no longer grows longer with every download.
I had to upload a fixed code-plug to my device to get rid of some older duplicates, but once I did that the list stayed reliably at two entries.

hmatuschek added a commit that referenced this issue Jun 20, 2023
* Fixed clearing of settings element. Fixes #348.
* Added auto-generation of auto-repeater offset frequency names.
@toco
Copy link
Author

toco commented Jul 19, 2023

Accidentally posted in wrong issue, moved here: #349 (comment)

@hmatuschek
Copy link
Owner

hmatuschek commented Jul 19, 2023

Concerning the first point: You can only define 7 additional FM APRS frequencies in the extension. The first frequency is set by the FM APRS system. That is, within the config:

channels:
  - fm:
    id: aprsChannel
    # ...
    txFrequency: 144.800 MHz   # <- teaser for 0.12.0
    # ...
# ...
positioning:
  - aprs:
    # ...
    revert: aprsChannel  # defines the first APRS frequency implicitly via aprsChannel
    anytone:
     # ...
     frequencies:
       - 144.390 MHz # alternative (second) APRS frequency
     

@hmatuschek
Copy link
Owner

BTW, I believe, you wanted to comment on issue #349. This one here is fixed already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants