[chirp_devel] [PATCH] [UV-B5] RADIO DID NOT ACK PROGRAMMING MODE
Jim Unroe
Thu Oct 15 15:32:20 PDT 2015
# HG changeset patch
# User Jim Unroe <rock.unroe at gmail.com>
# Date 1444948315 14400
# Node ID 254d5c7a71b295a908b8b7bd4a426060da21282d
# Parent 853c2aa66578154be72a4a5d889db2f4d62226e7
[UV-B5] RADIO DID NOT ACK PROGRAMMING MODE
This patch addresses the communication problem that
Baofeng UV-B5/B6 radios with 27 menus are having with CHIRP.
created from code subbmited by Edward Lisle
related to #2747 and #2751
diff -r 853c2aa66578 -r 254d5c7a71b2 chirp/drivers/uvb5.py
--- a/chirp/drivers/uvb5.py Sun Oct 11 10:50:10 2015 +0300
+++ b/chirp/drivers/uvb5.py Thu Oct 15 18:31:55 2015 -0400
@@ -175,9 +175,12 @@
def do_ident(radio):
radio.pipe.setTimeout(3)
- radio.pipe.write("PROGRAM")
- ack = radio.pipe.read(1)
- if ack != '\x06':
+ radio.pipe.write("\x05PROGRAM")
+ for x in xrange(10):
+ ack = radio.pipe.read(1)
+ if ack == '\x06':
+ break
+ else:
raise errors.RadioError("Radio did not ack programming mode")
radio.pipe.write("\x02")
ident = radio.pipe.read(8)
More information about the chirp_devel
mailing list