[chirp_devel] [PATCH] [UV-5R] Add Support for New Baofeng Firmware Versions
Jim Unroe
Sat Aug 16 14:59:59 PDT 2014
# HG changeset patch
# User Jim Unroe <rock.unroe at gmail.com>
# Date 1408225952 14400
# Node ID 2a9dc72bcdad65d2ad5a628fb62ffad25e7a01df
# Parent 424916a7f71731c9ec70c25d7a378ec2373c488d
[UV-5R] Add Support for New Baofeng Firmware Versions
Baofeng has released new firmware versions that are currently unsupported
by the uv5r.py driver. This patch adds support for them.
N5R-20 for radios with 2 power levels (UV-5R and variants)
N5R-30 for radios with 3 power levels (BF-F8HP and Intek KT-980HP)
Related to Bug #1849
diff -r 424916a7f717 -r 2a9dc72bcdad chirp/uv5r.py
--- a/chirp/uv5r.py Sun Aug 03 19:16:06 2014 -0700
+++ b/chirp/uv5r.py Sat Aug 16 17:52:32 2014 -0400
@@ -252,13 +252,13 @@
vhf_220_radio = "\x02"
-BASETYPE_UV5R = ["BFS", "BFB"]
+BASETYPE_UV5R = ["BFS", "BFB", "N5R-2"]
BASETYPE_F11 = ["USA"]
BASETYPE_UV82 = ["US2S", "B82S", "BF82"]
BASETYPE_BJ55 = ["BJ55"] # needed for for the Baojie UV-55 in bjuv55.py
BASETYPE_UV6 = ["BF1"]
BASETYPE_KT980HP = ["BFP3V3 B"]
-BASETYPE_F8HP = ["BFP3V3 F"]
+BASETYPE_F8HP = ["BFP3V3 F", "N5R-3"]
BASETYPE_LIST = BASETYPE_UV5R + BASETYPE_F11 + BASETYPE_UV82 + \
BASETYPE_BJ55 + BASETYPE_UV6 + BASETYPE_KT980HP + \
BASETYPE_F8HP
@@ -899,9 +899,6 @@
if 'BFS' in version_tag:
idx = version_tag.index("BFS") + 3
return int(version_tag[idx:idx + 3])
- elif 'BFB' in version_tag:
- idx = version_tag.index("BFB") + 3
- return int(version_tag[idx:idx + 3])
elif 'BF82' in version_tag:
idx = version_tag.index("BF82") + 2
return int(version_tag[idx:idx + 4])
@@ -923,6 +920,15 @@
elif 'BFP' in version_tag:
idx = version_tag.index("BFP") + 5
return int(version_tag[idx:idx + 1]) + 98000
+ elif 'N5R-2' in version_tag:
+ idx = version_tag.index("N5R-2") + 4
+ return int(version_tag[idx:idx + 2]) + 300
+ elif 'N5R-3' in version_tag:
+ idx = version_tag.index("N5R-3") + 4
+ return int(version_tag[idx:idx + 2]) + 98000
+ elif 'BFB' in version_tag:
+ idx = version_tag.index("BFB") + 3
+ return int(version_tag[idx:idx + 3])
raise Exception("Unrecognized firmware version string")
More information about the chirp_devel
mailing list