[chirp_devel] Fwd: [PATCH] [RB26] Fix for varying ACK

Jim Unroe
Sat Jul 3 12:46:02 PDT 2021


---------- Forwarded message ---------
From: Jim Unroe <kc9hi at comcast.net>
Date: Sat, Jul 3, 2021 at 3:40 PM
Subject: [PATCH] [RB26] Fix for varying ACK
To: <Rock.Unroe at gmail.com>


# HG changeset patch
# User Jim Unroe <rock.unroe at gmail.com>
# Date 1625340946 14400
#      Sat Jul 03 15:35:46 2021 -0400
# Node ID b845893bebcdeba1754abe44c423c823ffafce1c
# Parent  0eab8146b294ef686ca4a49c17ea38abde54c7ab
[RB26] Fix for varying ACK

The RB26 sometimes ACKs the "magic" string with a "\x00\x06" and sometimes
it
ACKs with only a "\x06". CHIRP currently expects to see the "\x00\x06" as
the
response so the process fails if the "\x00" is missing.

This patch "chews up" the "\x00 if present and then only the individual
"\x06" is expected as the ACK.

The Retevis RT76 seems to have the same issue and is fixed as a result of
this
patch.

Fixes #9035

diff -r 0eab8146b294 -r b845893bebcd chirp/drivers/retevis_rt21.py
--- a/chirp/drivers/retevis_rt21.py     Sat Jul 03 14:13:35 2021 -0400
+++ b/chirp/drivers/retevis_rt21.py     Sat Jul 03 15:35:46 2021 -0400
@@ -297,9 +297,9 @@
     exito = False
     for i in range(0, 5):
         serial.write(radio._magic)
-        if radio.MODEL == "RB26" or radio.MODEL == "RT76":
-            serial.read(1)
         ack = serial.read(1)
+        if ack == "\x00":
+            ack = serial.read(1)

         try:
             if ack == CMD_ACK:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://intrepid.danplanet.com/pipermail/chirp_devel/attachments/20210703/dde2d31f/attachment-0001.html 


More information about the chirp_devel mailing list