[chirp_devel] [h777] Fix some settings not taking effect on Baofeng 888 and variants

Dan Smith
Tue Aug 20 18:01:23 PDT 2019


> There are plenty of issues related to settings not "sticking" or taking effect for Baofeng 888 and derivative radios. I experienced this personally on a Radioddity GA-2S.
> 
> Changes based on serial capture of Baofeng "V12" programming software. Many thanks to Dan Clemmensen's notes on easy Linux serial capture.

Hmm, I've set several of these on my BF-888 clones and not had a problem. As such I'm a little reluctant to apply this, being concerned that maybe we have a variant out there and that applying this to fix half of them will break the others.

> diff --git a/chirp/drivers/h777.py b/chirp/drivers/h777.py
> --- a/chirp/drivers/h777.py
> +++ b/chirp/drivers/h777.py
> @@ -166,7 +166,10 @@
>  def _h777_write_block(radio, block_addr, block_size):
>      serial = radio.pipe
>  
> -    cmd = struct.pack(">cHb", 'W', block_addr, BLOCK_SIZE)
> +    if 0x02B0 <= block_addr <= 0x02C0:
> +        cmd = struct.pack(">cHb", 'Y', block_addr, BLOCK_SIZE)
> +    else:
> +        cmd = struct.pack(">cHb", 'W', block_addr, BLOCK_SIZE)

Your assertion is that between these ranges we have to use a different command, but with the same sized block? I've seen cases where we use W for low blocks and then something else (like X) for upper blocks of a larger size. It seems really weird to have a hole in the middle of the range where we switch from W to Y and then back again...

> @@ -281,8 +284,8 @@
>  
>      _ranges = [
>          (0x0000, 0x0110),
> +        (0x0380, 0x03E0),
>          (0x02B0, 0x02C0),
> -        (0x0380, 0x03E0),

This also seems weird to me. It writes the low range, jumps to the upper, and then back to the middle? That seems quite illogical.

I guess I need to test this with some of my examples here, but maybe you can provide some more discussion about how you came across this, what all you tested it with, and why you think it matters?

--Dan


More information about the chirp_devel mailing list