Project

General

Profile

Actions

Feature #8447

closed

AnyTone AT-778UV

Added by Mike Verdecanna almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
11/17/2020
Due date:
% Done:

100%

Estimated time:
Chirp Version:
daily
Model affected:
AT-778UV
I read the instructions above:

Description

Chirp is working on AT-778UV to program channels but cannot access any of the other features of the radio. Additionally when using chirp to program the channels it erases all the other settings back to factory defaults.
This is a feature request to enable settings control via chirp. I am an engineer and can also assist with this feature request but dont know where to start.


Files

debug -reading.log (41.1 KB) debug -reading.log Mike Verdecanna, 11/20/2020 10:40 AM
debug - writeback.log (41.9 KB) debug - writeback.log Mike Verdecanna, 11/20/2020 10:40 AM
anytone778uv_function.py (47.9 KB) anytone778uv_function.py 1st draft for Function Setup tab Jim Unroe, 11/23/2020 06:10 PM
AnyTone_778UV_20201124.img (12.8 KB) AnyTone_778UV_20201124.img Joe Milbourn, 11/24/2020 12:24 PM
anytone778uv_function2.py (49 KB) anytone778uv_function2.py Jim Unroe, 11/24/2020 05:56 PM
anytone778uv_keyassignment.py (53.8 KB) anytone778uv_keyassignment.py Jim Unroe, 11/24/2020 07:07 PM
anytone778uv_dtmf.py (62.5 KB) anytone778uv_dtmf.py Jim Unroe, 11/26/2020 04:42 PM
AnyTone_778UV_20201124_experimental.img (12.8 KB) AnyTone_778UV_20201124_experimental.img Mike Verdecanna, 11/27/2020 06:01 AM
Actions #1

Updated by Joe Milbourn almost 4 years ago

Hi Mike,

Afraid no one has got around to adding settings to this driver yet. I've a WIP version that can set the welcome message but that's not committed yet.

Mike Verdecanna wrote:

Additionally when using chirp to program the channels it erases all the other settings back to factory defaults.

This is unexpected - please could you describe how to reproduce it? If you can include your chirp debug log (see How_to_report_issues) and a before and after image from the radio that would be really helpful.

Thanks

Actions #2

Updated by Jim Unroe almost 4 years ago

  • Status changed from New to Feedback

Joe Milbourn wrote:

Hi Mike,

Afraid no one has got around to adding settings to this driver yet. I've a WIP version that can set the welcome message but that's not committed yet.

Mike Verdecanna wrote:

Additionally when using chirp to program the channels it erases all the other settings back to factory defaults.

This is unexpected - please could you describe how to reproduce it? If you can include your chirp debug log (see How_to_report_issues) and a before and after image from the radio that would be really helpful.

Thanks

I have been thinking about working on adding some/most of the settings. I just want to make sure I will not be duplicating the work of you or anyone else.

Jim KC9HI

Actions #3

Updated by Bobby Kirbos almost 4 years ago

For the price, this is a pretty decent radio. The manufacturer software, though usable, is VERY clunky.

At the very least PLEASE do "Function Setup" and "Key Assignment" (as labeled in the mfgr. software). You will probably cover 95% of users' needs with those 2.
... and thank you.

Updated by Mike Verdecanna almost 4 years ago

Thank you Joe. You are correct on the unexpected erasing other settings. It is not happening. It must have been when I was also using the factory software (which is horrible compared to Chirp). I found if I load my channels with Chirp to the radio, then use the factory SW to download, then update my general settings in the factory SW, upload back to the radio, then download with Chirp and edit from there it is working.

For reference I attached my logs of reading from the radio custom settings and channels and then a log of writing the same file back.

Actions #5

Updated by Jim Unroe almost 4 years ago

  • Status changed from Feedback to In Progress
  • Assignee set to Jim Unroe
  • Target version set to chirp-legacy
  • Model affected changed from (All models) to AT-778UV

I've started working on this.

Jim KC9HI

Actions #6

Updated by Jim Unroe almost 4 years ago

Hey gang,

Over the last couple of days I have pretty much thrown together all of the settings on the OEM software's Function Setup tab. The code passes all of the developer tests, but I would like to have some real world testing done and receive some feedback before I submit what I have as a formal patch. Please take this test driver module for a spin, test the settings, and let me know what, if anything, is broken.

Important: Be sure to make a CHIRP Radio Images (*.img) file backup of your radios current channels and settings and put it in a safe place before you do any testing.

How to use a test driver module...

1 click "Help" in the CHIRP menu bar
2 enable "Enable Developer Functions"
3 download the test driver module and save it to a convenient location

Note: Left-click the link. On the page that loads, click the "download" link to start the download. Do not right-click the test driver module link and choose "Save Link As...". If you do, the file that you save will not be the file you want.

4 click "File -> Load Module" and then locate and load the file that was saved in step 3

At this point the test driver module is active and you can start testing with your AT-778UV or other compatible radio (I am using a Retevis RT95).

Note: Loading this test driver module does not permanently change your CHIRP installation in any way. Once you close CHIRP, the next time you open CHIRP you will have to load the test driver module again before you will have access to the new AT-778UV settings.

I am looking forward to your feedback. Hopefully I will be able to start on the Key Assignment tab soon.

Jim KC9HI

Actions #7

Updated by Joe Milbourn almost 4 years ago

Mike Verdecanna wrote:

Thank you Joe. You are correct on the unexpected erasing other settings. It is not happening. It must have been when I was also using the factory software (which is horrible compared to Chirp). I found if I load my channels with Chirp to the radio, then use the factory SW to download, then update my general settings in the factory SW, upload back to the radio, then download with Chirp and edit from there it is working.

That's good to know, thanks Mike.

Actions #8

Updated by Mike Verdecanna almost 4 years ago

Hi Joe,
I started testing the test driver module. Appears to be working fine. I did notice one item but it may be because it was a setting I didnt use prior. In chirp settings, at the bottom there is a knob mode setting. This seems to control the P6 soft button. When set to channel, P6 gets set to channel and when set to voice P6 gets set to voice. I know you said you were working on key assignment later so maybe that is intended. I will keep testing and let you know any findings. I assume when you do the key assignments you will do both the main unit and mic programmable keys. Nice work and thank you very much!
-Mike KD2UWR

Actions #9

Updated by Jim Unroe almost 4 years ago

Mike Verdecanna wrote:

Hi Joe,
I started testing the test driver module. Appears to be working fine. I did notice one item but it may be because it was a setting I didnt use prior. In chirp settings, at the bottom there is a knob mode setting. This seems to control the P6 soft button. When set to channel, P6 gets set to channel and when set to voice P6 gets set to voice. I know you said you were working on key assignment later so maybe that is intended. I will keep testing and let you know any findings. I assume when you do the key assignments you will do both the main unit and mic programmable keys. Nice work and thank you very much!
-Mike KD2UWR

Hi Mike,

Jim here. I am the volunteer developer reverse engineering the global settings support.

The CHIRP Knob Mode setting manipulates the same memory bit as the factory software's Knob Mode setting. "0" = Volume and "1" = Channel. What the radio does when this bit is changed is controlled by the radio's firmware and not CHIRP.

Only when the "Knob mode" is set to "Volume" and "Key mode P6" is set to "VOL" is the [P6] key is overridden to "FRQ" and tapping the [P6] key will control the frequency/channel when the knob is turned. If "Key mode P6" is set to any value except "VOL", the [P6] key will be configured as selected by the "Key mode P6" selection and the know will control that feature based on the "Key mode P6" selection.

But thanks for your observation. It is the kind of thoroughness in testing that I am looking for.

Jim KC9HI

Actions #10

Updated by Joe Milbourn almost 4 years ago

Jim Unroe wrote:

I am looking forward to your feedback.

Well, there's one obvious bug - stick your name up at the top ;)

I had a play around, and I hit this (my _radio_settings.vfomrModeB == 0x04, I've attached the image).

ERROR: Exception running RadioJob: list index out of range
ERROR: -- Exception: --
DEBUG: Reporting exception
ERROR: Traceback (most recent call last):
  File "/mnt/c/Users/joe.milbourn/git.local/personal/chirp_8005/chirp.hg/chirp/ui/common.py", line 116, in _execute
    result = func(*self.args, **self.kwargs)
  File "/mnt/c/Users/joe.milbourn/git.local/personal/chirp_8005/chirp.hg/chirp/drivers/anytone778uv.py", line 1032, in get_settings
    rs = RadioSettingValueList(options, options[_radio_settings.vfomrModeB])
IndexError: list index out of range

Cheers
Joe

Actions #11

Updated by Jim Unroe almost 4 years ago

Joe Milbourn wrote:

Jim Unroe wrote:

I am looking forward to your feedback.

Well, there's one obvious bug - stick your name up at the top ;)

I had a play around, and I hit this (my _radio_settings.vfomrModeB == 0x04, I've attached the image).
[...]

Cheers
Joe

Thanks Joe. I'm on it.

Jim KC9HI

Actions #12

Updated by Jim Unroe almost 4 years ago

Here is version 2 of the Function Setup tab. It includes...

  • changes to fix bug that Joe was experiencing
  • the password setting is now editable
  • the anytone778.py driver was added to the "manifest" so that pep8 testing is done
  • correct pep8 issues and other formatting changes

Jim KC9HI

Actions #13

Updated by Jim Unroe almost 4 years ago

Here is the Key Assignment tab which also includes the Function Setup tab. So as of right now, this is the one to test.

I'm looking forward to your feedback concerning bugs or anything else related to this work-in-progress.

Jim KC9HI

Actions #14

Updated by Bobby Kirbos almost 4 years ago

Jim, MANY thanks. Your work on this is very much appreciated. So far, what I have tested on both modules works well, and I have not experienced any bugs.

Total nit-pick here...
Busy channel lockout: In the mfgr. software, this is assigned to each channel. I don't know if it is possible to make this a global setting. It's something that I do use on select channels, but it is by no means a critical item, and I don't want it to causes spec. creep for what you are working on here (I've written many lines of code and I absolutely hate spec. creep with a passion). If it is not something that can be handled globally, I will open another ticket for it. Again, a total nit-pick and not a show stopper by any means.

I wish I could offer more to this project than just testing, but the learning curve on this would require more time than I have at the moment. Again, thank you for your time and efforts on this.

-BK
KC3QMT
Hopefully changing to KC3RJF soon. It appears that the FCC takes the whole 'working at the speed of government' thing very seriously.

Actions #15

Updated by Jim Unroe almost 4 years ago

Bobby Kirbos wrote:

Jim, MANY thanks. Your work on this is very much appreciated. So far, what I have tested on both modules works well, and I have not experienced any bugs.

Total nit-pick here...
Busy channel lockout: In the mfgr. software, this is assigned to each channel. I don't know if it is possible to make this a global setting. It's something that I do use on select channels, but it is by no means a critical item, and I don't want it to causes spec. creep for what you are working on here (I've written many lines of code and I absolutely hate spec. creep with a passion). If it is not something that can be handled globally, I will open another ticket for it. Again, a total nit-pick and not a show stopper by any means.

I wish I could offer more to this project than just testing, but the learning curve on this would require more time than I have at the moment. Again, thank you for your time and efforts on this.

-BK
KC3QMT
Hopefully changing to KC3RJF soon. It appears that the FCC takes the whole 'working at the speed of government' thing very seriously.

Hi BK,

BCL appears to not have been implemented in the initial driver release (I believe I also read a comment in the code to that effect). BCL is a per-channel setting. Common per-channel settings can be applied to multiple channels at the same time. For example to disable TX and skip when scanning on all 7 of the NOAA WX Radio channels at the same time...

  1. click, shift-click and/or ctrl-click as needed to highlight the 7 channels
  2. click the [Properties] button at the top of the "spreadsheet style memory editor" (brings up the "Memory Properties" editor
  3. tick the box to the left of "Duplex:" to enable editing and set the value to "off"
  4. tick the box to the left of "Skip:" to enable editing and set the value to "S"
  5. click the [OK] button

That's it all 7 channels will not transmit if the [PTT] button is pressed and all 7 will be skipped when scanning.

The same could be done to set common CTCSS tone, bandwidths and transmit power levels across multiple channels at the same time.

Unless Joe was planning on adding them, maybe I could take a look at BCL and any of the other "other" type settings when I have finished this project.

Jim

Actions #16

Updated by Mike Verdecanna almost 4 years ago

Hi Jim, this is awesome, many thanks. I tried it out and no bugs. Seems to cover every option that is available in the factory software.

Actions #17

Updated by Joe Milbourn almost 4 years ago

Jim Unroe wrote:

Here is the Key Assignment tab which also includes the Function Setup tab. So as of right now, this is the one to test.

Looking good Jim - only found one small niggle, my radio doesn't have lower case letters in the character set so we need to force the welcome message to upper case.

Joe

Actions #18

Updated by Jim Unroe almost 4 years ago

Joe Milbourn wrote:

Jim Unroe wrote:

Here is the Key Assignment tab which also includes the Function Setup tab. So as of right now, this is the one to test.

Looking good Jim - only found one small niggle, my radio doesn't have lower case letters in the character set so we need to force the welcome message to upper case.

Joe

Joe. This is definitely something I would like to do. Can you offer come ideas on how you can do this? My only solution so far is to have CHIRP notify you that a lower case character is not valid. Thanks.

Jim

Actions #19

Updated by Jim Unroe almost 4 years ago

Jim Unroe wrote:

Joe Milbourn wrote:

Jim Unroe wrote:

Here is the Key Assignment tab which also includes the Function Setup tab. So as of right now, this is the one to test.

Looking good Jim - only found one small niggle, my radio doesn't have lower case letters in the character set so we need to force the welcome message to upper case.

Joe

Joe. This is definitely something I would like to do. Can you offer come ideas on how you can do this? My only solution so far is to have CHIRP notify you that a lower case character is not valid. Thanks.

Jim

Joe, I figured out something I am happy with. But I would still be OK with seeing something that you would suggest.

Jim

Actions #20

Updated by Joe Milbourn almost 4 years ago

Jim Unroe wrote:

Joe, I figured out something I am happy with. But I would still be OK with seeing something that you would suggest.

You made it into a challenge, that's not fair. How about sub-classing RadioSettingValueString to RadioSettingValueStringUpper and forcing everything to upper case (and the right charset) there? Something like this:

diff --git a/chirp/drivers/anytone778uv_keyassignment.py b/chirp/drivers/anytone778uv.py
index ffee91c..b20f3de 100755
--- a/chrip/drivers/anytone778uv_keyassignment.py
+++ b/chirp/drivers/anytone778uv.py
@@ -595,6 +595,15 @@ def dtcs_code_val_to_bits(code):
     val = chirp_common.ALL_DTCS_CODES.index(code)
     return (val & 0xFF), ((val >> 8) & 0x01)

+class RadioSettingValueStringUpper(RadioSettingValueString):
+    def set_value(self, value):
+        nval = ''
+        for char in value.upper():
+            if char in self._charset:
+                nval += char
+            else:
+                nval += ' '
+        RadioSettingValueString.set_value(self, nval)

 class AnyTone778UVBase(chirp_common.CloneModeRadio,
                        chirp_common.ExperimentalRadio):
@@ -1085,7 +1094,8 @@ class AnyTone778UVBase(chirp_common.CloneModeRadio,
             name += chr(self._memobj.starting_display.line[i])
         name = name.rstrip()  # remove trailing spaces

-        rs = RadioSettingValueString(0, 7, name)
+        rs = RadioSettingValueStringUpper(0, 7, name,
+                                          charset=CHARSET_ASCII_PLUS)
         rset = RadioSetting("starting_display.line", "Starting display", rs)
         function.append(rset)
Actions #21

Updated by Jim Unroe almost 4 years ago

Joe Milbourn wrote:

Jim Unroe wrote:

Joe, I figured out something I am happy with. But I would still be OK with seeing something that you would suggest.

You made it into a challenge, that's not fair. How about sub-classing RadioSettingValueString to RadioSettingValueStringUpper and forcing everything to upper case (and the right charset) there? Something like this:

[...]

Joe,

That's pretty cool. I've never don't anything like that before. I did try it out. It does work. But I think what I came up with does the same thing with less changes to the code.

Jim

Actions #22

Updated by Jim Unroe almost 4 years ago

Hey gang,

Here is the DTMF tab (including everything previously). This also has the fixes for the bugs that Joe mentioned).

Jim KC9HI

Actions #23

Updated by Jim Unroe almost 4 years ago

  • % Done changed from 0 to 100

I went ahead and submitted this work as three separate patches, one for each tab. If we find something else, we can "fix" whatever it is with additional patches. These 3 tabs pretty much cover everything a ham would need. So I'm going to call this issue complete.

Once the patches are approved, the support will be in the following CHIRP daily build.

Jim KC9HI

Actions #24

Updated by Mike Verdecanna almost 4 years ago

I dont know if this is a bug or related to the VOL/CH oddity on this radio. Since the hand mic dont have a programmable option for a channel button, I use knob mode setting to volume, which then forces P6 to channel. This gives me the option to control channel on the mic after the setting timeout. I still would like a volume button on the base so I assign P4 to volume. What I get on the base is both P4 and P6 changed to channel. My end goal is to be able to control both channel and volume from either the mic or base. I just cannot seem to get that winning combination with these settings. I attached my .img for reference.
Thanks, Mike KD2UWR

Actions #25

Updated by Jim Unroe almost 4 years ago

I don't know why I didn't receive the "build test" email, but the patches were accepted and are supported in today's CHIRP daily build.

Jim KC9HI

Actions #26

Updated by Bernhard Hailer almost 4 years ago

  • Status changed from In Progress to Closed
Actions

Also available in: Atom PDF