[chirp_devel] [PATCH] [UV-5X3] Add support for the Baofeng UV-5R-3
Jim Unroe
Thu Nov 2 17:07:17 PDT 2017
# HG changeset patch
# User Jim Unroe <rock.unroe at gmail.com>
# Date 1509660282 14400
# Node ID 6d231a5d530f944e103cd4f3cbe628884648acdb
# Parent 7cd9e08d2fae82c9272b71226ca63273716f947c
[UV-5X3] Add support for the Baofeng UV-5R-3
This patch adds support for the Baofeng UV-5R-3 tri-band handheld radio.
related to #5309
diff -r 7cd9e08d2fae -r 6d231a5d530f chirp/drivers/uv5x3.py
--- a/chirp/drivers/uv5x3.py Thu Oct 12 07:20:04 2017 -0700
+++ b/chirp/drivers/uv5x3.py Thu Nov 02 18:04:42 2017 -0400
@@ -36,6 +36,9 @@
# BTECH UV-5X3 magic string
MSTRING_UV5X3 = "\x50\x0D\x0C\x20\x16\x03\x28"
+# Baofeng UV-5R3 magic string
+MSTRING_UV5R3 = "\x50\x0D\x0C\x20\x17\x09\x19"
+
##### ID strings #####################################################
# BTECH UV-5X3
@@ -43,6 +46,9 @@
UV5X3_fp2 = "UVVG301" # UVV300 original
UV5X3_fp3 = "UVVG306" # UVV306 original
+# Baofeng UV-5R3
+UV5R3_fp1 = "5R31709" # BFB300 original
+
DTMF_CHARS = " 1234567890*#ABCD"
STEPS = [2.5, 5.0, 6.25, 10.0, 12.5, 20.0, 25.0, 50.0]
@@ -384,8 +390,6 @@
def get_prompts(cls):
rp = chirp_common.RadioPrompts()
rp.experimental = \
- ('The BTech UV-5X3 driver is a beta version.\n'
- '\n'
'Please save an unedited copy of your first successful\n'
'download to a CHIRP Radio Images(*.img) file.'
)
@@ -664,7 +668,7 @@
0, 7, _filter(_msg.line2)))
other.append(rs)
- if str(_mem.firmware_msg.line1) == "UVVG302":
+ if str(_mem.firmware_msg.line1) == ("UVVG302" or "5R31709"):
lower = 136
upper = 174
else:
@@ -683,6 +687,9 @@
if str(_mem.firmware_msg.line1) == "UVVG302":
lower = 200
upper = 230
+ elif str(_mem.firmware_msg.line1) == "5R31709":
+ lower = 200
+ upper = 260
else:
lower = 220
upper = 225
@@ -1200,3 +1207,17 @@
return True
else:
return False
+
+
+ at directory.register
+class BaofengUV5R3Radio(UV5X3):
+ VENDOR = "Baofeng"
+ MODEL = "UV-5R3"
+
+ _fileid = [UV5R3_fp1, ]
+
+ _magic = [MSTRING_UV5R3, ]
+
+ VALID_BANDS = [(136000000, 174000000),
+ (200000000, 260000000),
+ (400000000, 521000000)]
More information about the chirp_devel
mailing list