hmatuschek / qdmr

A GUI application for configuring and programming cheap DMR radios under Linux and MacOS X.
https://dm3mat.darc.de/qdmr/
GNU General Public License v3.0
223 stars 46 forks source link

APRS settings don't work for DMR-6X2 #468

Closed jancona closed 1 month ago

jancona commented 3 months ago

In version 0.12.0, APRS settings are neither read from or written to my DMR-6X2 running firmware version 2.10 (the latest).

Reading the radio with a working APRS configuration produces a QDMR codeplug with no APRS settings.

Writing that codeplug back to the radio, changes the following Analog APRS settings:

I haven't tested Digital APRS.

If I create an APRS configuration in QDMR and write it to the radio, it trashes other AnalogAPRS settings, including Upload Freq and Signal Path.

Logs of reading and writing the codeplugs using dmrconf:

$ ./build/cli/dmrconf -V read ~/Documents/maine-aprs-read.codeplug.yaml 
Debug in cli/autodetect.cc@40: Autodetect radios.
Debug in lib/usbserial.cc@117: Search for serial port with matching VID:PID 28e9:18a.
Debug in lib/usbserial.cc@124: Found ttyACM0 (USB 28e9:18a).
Debug in lib/usbserial.cc@117: Search for serial port with matching VID:PID 1fc9:94.
Debug in lib/hid_libusb.cc@128: Search for HID interfaces matching VID:PID 15a2:73.
Debug in lib/dfu_libusb.cc@157: Search for DFU devices matching VID:PID 483:df11.
Debug in lib/c7000device.cc@236: Search for C7000 devices matching VID:PID 1206:227.
Info in cli/autodetect.cc@51: Found 1 device(s):
Info in cli/autodetect.cc@53:   Serial interface 'ttyACM0'.
Debug in cli/autodetect.cc@90: Using device ttyACM0.
Debug in lib/usbdevice.cc@258: Check if serial port ttyACM0 still exisist and has VID:PID 28e9:18a.
Debug in lib/radio.cc@61: Try to detect radio at Serial interface 'ttyACM0'.
Debug in lib/usbserial.cc@27: Try to open Serial interface 'ttyACM0'.
Debug in lib/usbserial.cc@72: Opened serial port ttyACM0 with 115200baud.
Debug in lib/anytone_interface.cc@308: Anytone: In program-mode now.
Debug in lib/anytone_interface.cc@337: Found radio 'D6X2UV', version 'V102'.
[                                                  ] 0%
[==============================================    ] 93%
[================================================= ] 99%
Debug in lib/anytone_interface.cc@357: Anytone: Left program-mode.
Debug in lib/usbserial.cc@105: Serial port will close now.
Debug in cli/readcodeplug.cc@48: Save codeplug at '/home/jim/Documents/maine-aprs-read.codeplug.yaml'.

$ ./build/cli/dmrconf -V write ~/Documents/maine-aprs-read.codeplug.yaml 
Debug in lib/config.cc@375: Using format version 0.12.0.
Debug in cli/writecodeplug.cc@36: Read codeplug from '/home/jim/Documents/maine-aprs-read.codeplug.yaml'.
Debug in cli/autodetect.cc@40: Autodetect radios.
Debug in lib/usbserial.cc@117: Search for serial port with matching VID:PID 28e9:18a.
Debug in lib/usbserial.cc@124: Found ttyACM0 (USB 28e9:18a).
Debug in lib/usbserial.cc@117: Search for serial port with matching VID:PID 1fc9:94.
Debug in lib/hid_libusb.cc@128: Search for HID interfaces matching VID:PID 15a2:73.
Debug in lib/dfu_libusb.cc@157: Search for DFU devices matching VID:PID 483:df11.
Debug in lib/c7000device.cc@236: Search for C7000 devices matching VID:PID 1206:227.
Info in cli/autodetect.cc@51: Found 1 device(s):
Info in cli/autodetect.cc@53:   Serial interface 'ttyACM0'.
Debug in cli/autodetect.cc@90: Using device ttyACM0.
Debug in lib/usbdevice.cc@258: Check if serial port ttyACM0 still exisist and has VID:PID 28e9:18a.
Debug in lib/radio.cc@61: Try to detect radio at Serial interface 'ttyACM0'.
Debug in lib/usbserial.cc@27: Try to open Serial interface 'ttyACM0'.
Debug in lib/usbserial.cc@72: Opened serial port ttyACM0 with 115200baud.
Debug in lib/anytone_interface.cc@308: Anytone: In program-mode now.
Debug in lib/anytone_interface.cc@337: Found radio 'D6X2UV', version 'V102'.
Warning in cli/writecodeplug.cc@60: Verification Issue: Warn: In : The support for this radio is still under development. Some features may sill be missing or are not well tested.
Warning in cli/writecodeplug.cc@60: Verification Issue: Warn: In List 'channels', Element 0 ('APRS Analog'): The enum value 'Max' cannot be encoded. Valid values are High, Low. Another value might be chosen automatically.
Warning in cli/writecodeplug.cc@60: Verification Issue: Warn: In List 'channels', Element 1 ('146.52 Analog'): The enum value 'Max' cannot be encoded. Valid values are High, Low. Another value might be chosen automatically.
Warning in cli/writecodeplug.cc@60: Verification Issue: Warn: In List 'channels', Element 2 ('449.00 Analog'): The enum value 'Max' cannot be encoded. Valid values are High, Low. Another value might be chosen automatically.
Warning in cli/writecodeplug.cc@60: Verification Issue: Warn: In List 'channels', Element 84 ('Parrot* 9998 1 K'): The enum value 'Max' cannot be encoded. Valid values are High, Low. Another value might be chosen automatically.
[                                                  ] 0%
[========================                          ] 49%
Debug in lib/dmr6x2uv_codeplug.cc@2278: Allocate roaming zone at 1043000
[================================================= ] 99%
Debug in lib/anytone_interface.cc@357: Anytone: Left program-mode.
Debug in lib/usbserial.cc@105: Serial port will close now.
Debug in cli/writecodeplug.cc@98: Upload completed.

Let me know if there's other information you'd like me to capture. I do have a working QDMR build, so I can test changes if needed.

hmatuschek commented 3 months ago

This affects likely all radios supporting analog APRS. That is 878, 878 II and 578 too.

hmatuschek commented 3 months ago

I am on it. So far, I've not spotted any differences between FW version 2.04 and 2.10 w.r.t. the APRS settings. There are likely none. I may have simply messed it up, as I get similar problems with the APRS settings of the AnyTone D878UV, which has a completely different settings structure. Once this bug is fixed, I'll release 0.12.1.

hmatuschek commented 3 months ago

Okay, this was a complex issue. Should be fixed in branch 468-update-anytone-aprs-settings. Let me know, if it works for you.

jancona commented 3 months ago

Sorry for the delay in responding. I finally got a chance to do some comprehensive testing this morning.

For context, I used these instructions to set up APRS on the radio originally. Not all the settings it mentions are available in QDMR.

The table below has the results of my testing with the fields mentioned in the article. I tested by:

CPS Section CPS Field QDMR Section QDMR Field QDMR Read QDMR Write QDMR Preserve
APRS Auto TX Intervals (s) APRS Update Period
APRS Destination Call Sign APRS Destination
APRS Destination SSID APRS Destination
APRS User Call Sign APRS Source
APRS User SSID APRS Source
APRS APRS Symbol Table ? ?
APRS APRS Map Icon APRS Icon
APRS APRS Signal Path APRS Path
APRS Transmission Frequency ? ?
APRS Transmit Delay (ms) ? ?
APRS Prewave Time (ms) ? ?
APRS Transmit Power ? ?
APRS Enter Your Sending Text APRS Message
Channel Receive Frequency Channel Rx Freq
Channel Transmit Frequency Channel Tx Freq
Channel Channel Type Channel -
Channel Transmit Power Channel Power
Channel APRS Report Type ? ?
Channel Analog APRS PTT Mode ? ?
Channel APRS See Notes

Notes

When I read the CPS-defined codeplug from the radio, the APRS channel definition APRS dropdown was set to \[None\], not the name of the APRS configuration in the GPS/APRS section (APRS APBT62). I selected the APRS config and saved it before writing it back to the radio with QDMR. When I read the codeplig in the Windows CPS, it had my original channel there. But when I read it back into QDMR there were two channels, my original one (APRS APBT62) and a new one named APRS Channel which appeard to have semi-random values in its fields. Neither of the channels had the APRS dropdown set.

The big problem for me is the fields with ❌ in the QDMR Preserve column, because those have to reprogrammed in the radio after I write a codeplug with QDMR/dmrconf. Transmit Delay and Prewave Time aren't exposed in the radio settings, only in the CPS, so I can't really use APRS with QDMR.

PeterSprague commented 3 months ago

I am also wrestling with Ang APRS on 878 plus. Radio is using v2.05 because I haven't located my W10 SSD to use Anytone CPS to upgrade to newest.

Similar issues to above, with biggest one I noticed is the Path. QDMR won't accept my input, nor show the path if I download the plug from the radio where I manually input WIDE1-1.

Pulled Master this morning and built from source on Fedora 40. Fixed the Seg Fault issue, but now this has serviced.

Will pull the above branch, build, test, and report back

jancona commented 3 months ago

@PeterSprague You'll have to check out and build the 468-update-anytone-aprs-settings branch to see the changes @hmatuschek made. My results on the DMR-6X2 are above, but perhaps the 878 plus behaves differently.

PeterSprague commented 3 months ago

Yup, building right now

Imported from radio with APRS including Path configured WIDE1-1. Nuked from codeplug when viewed in QDMR.

Going the other way, opened last saved codeplug with APRS. Tried to add Path, typed in WIDE1-1 and saved. Reopened and no Path there. Uploaded to radio. Obviously PATH is missing, plus also PTT Upload is now off.

So back to the drawing boards. Let me know when another version is ready to be pulled and will build/test again.

PeterSprague commented 3 months ago

Using same build from earlier, added back in the APRS PATH WIDE2-1, TX @end.

Imported to QDMR and now shows in codeplug above the DMR GPS Sys #1 & #2. Tweaked a couple of settings and exported to radio. Kept the settings, and now sends a beacon at the end of a Tx. Shows in aprs.fi

Not sure why or what changed, but its seeming to work properly now :) One guess is that I was using WIDE1-1, which wasn't taking. I had also tried WIDE1-1Wide2-2, which is an older form I suspect. Only WIDE1-2 worked when imported from the radio

Will leave alone until others test and is committed to Master.

jancona commented 1 month ago

Thanks for working on this, but as I noted above, this doesn't fix the issues I have with the DMR-6X2 APRS settings. Ideally this issue should be reopened, but evidently I don't have permission to do that. Should I open a new issue?

hmatuschek commented 1 month ago

A few comments on the table above:

  1. Thank you very much for the comprehensive testing! That is great.
  2. The icon symbol table is implicit. In QDMR, you simply select the icon you want. Although it is not the complete set yet (see #117 (the second to oldest open issue)).
  3. Transmit power is not set in the APRS system but on the revert channel. (Makes more sense, as transmit power (and frequency etc.) is a property of a channel not APRS.
  4. Report type is implicit. Depending on the type of position reporting system associated with the channel: either DMR or FM-APRS.
  5. pre-wave and TX delay are set in the FM-APRS AnyTone settings extension.

There where some bugs in the implementation, give it a try in this branch.

jancona commented 1 month ago

I just tested your latest changes. Most functions are now working! Here's an updated table with the lines that still aren't working.

CPS Section CPS Field QDMR Section QDMR Field QDMR Read QDMR Write QDMR Preserve
APRS Transmit Delay (ms) ? ?
APRS Prewave Time (ms) ? ?
Channel Analog APRS PTT Mode ? ?

Those three still aren't being preserved when I read and write back with QDMR. I also can't see where to set any of them in the UI. I know you said pre-wave and TX delay are set in the FM-APRS AnyTone settings extension, but I can't find that. Are they only relevant for FM APRS? If so, I won't worry about them. The article I used to setup analog APRS on my radio recommended they both be set to 600.

In the Windows CPS channel settings, the Analog APRS PTT Mode is a drop-down with three choices: Off, Start of Transmission and End of Transmission. I don't see the equivalent in the QDMR channel settings.

It looks like you're almost there. Thanks again!

hmatuschek commented 1 month ago

The delays are set in an device specific extension of the FM APRS system. (Now, the another bug was fixed).

  1. Enable Device specific settings in the settings dialog.
  2. Edit the FM APRS system.
  3. Select tab Extensions
  4. Find it under Anytone -- This extension collects all device specific settings of all AnyTone devices for the FM APRS system. For now, only the Prewave and delay settings are relevant for the DMR6X2UV. Screenshot_20241001_171626
hmatuschek commented 1 month ago

Concerning the FM/DMR APRS PTT modes. I do not provide means to set this. However, the setting should be kept. If you like, I can add this settings to the anytone channel settings extension.

jancona commented 1 month ago

Thanks! The latest takes care of all my issues. The Transmit Delay and Prewave Time now round-trip, and I can change them in QDMR. The APRS PTT Mode does round-trip even though it doesn't show up in the UI. If you can make it appear in the Anytone extensions, then I won't need the Windows CPS at all!

One other problem I just noticed. I can't change the Path in the APRS settings dialog. I make the change there and hit okay, but when I re-open the dialog, the old value is still there.

hmatuschek commented 1 month ago

Fixed the APRS dialog too. I would close this issue now. If you find something else, just open a new one. Thanks for the comprehensive testing!

jancona commented 1 month ago

I confirm that I can update the path now. Thanks for all of this. I'm closing this issue.