<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">---------- Forwarded message ---------<br>From: <b class="gmail_sendername" dir="auto">Jim Unroe</b> <span dir="auto"><<a href="mailto:kc9hi@comcast.net">kc9hi@comcast.net</a>></span><br>Date: Sat, Jul 3, 2021 at 3:40 PM<br>Subject: [PATCH] [RB26] Fix for varying ACK<br>To: <<a href="mailto:Rock.Unroe@gmail.com">Rock.Unroe@gmail.com</a>><br></div><br><br># HG changeset patch<br>
# User Jim Unroe <<a href="mailto:rock.unroe@gmail.com" target="_blank">rock.unroe@gmail.com</a>><br>
# Date 1625340946 14400<br>
# Sat Jul 03 15:35:46 2021 -0400<br>
# Node ID b845893bebcdeba1754abe44c423c823ffafce1c<br>
# Parent 0eab8146b294ef686ca4a49c17ea38abde54c7ab<br>
[RB26] Fix for varying ACK<br>
<br>
The RB26 sometimes ACKs the "magic" string with a "\x00\x06" and sometimes it<br>
ACKs with only a "\x06". CHIRP currently expects to see the "\x00\x06" as the<br>
response so the process fails if the "\x00" is missing.<br>
<br>
This patch "chews up" the "\x00 if present and then only the individual<br>
"\x06" is expected as the ACK.<br>
<br>
The Retevis RT76 seems to have the same issue and is fixed as a result of this<br>
patch.<br>
<br>
Fixes #9035<br>
<br>
diff -r 0eab8146b294 -r b845893bebcd chirp/drivers/retevis_rt21.py<br>
--- a/chirp/drivers/retevis_rt21.py Sat Jul 03 14:13:35 2021 -0400<br>
+++ b/chirp/drivers/retevis_rt21.py Sat Jul 03 15:35:46 2021 -0400<br>
@@ -297,9 +297,9 @@<br>
exito = False<br>
for i in range(0, 5):<br>
serial.write(radio._magic)<br>
- if radio.MODEL == "RB26" or radio.MODEL == "RT76":<br>
- serial.read(1)<br>
ack = serial.read(1)<br>
+ if ack == "\x00":<br>
+ ack = serial.read(1)<br>
<br>
try:<br>
if ack == CMD_ACK:<br>
</div></div>