diff --git a/chirp/drivers/h777.py b/chirp/drivers/h777.py
index b587221fb..8bdc07d30 100644
--- a/chirp/drivers/h777.py
+++ b/chirp/drivers/h777.py
@@ -128,7 +128,7 @@ def _h777_enter_programming_mode(radio):
except:
raise errors.RadioError("Error communicating with radio")
- if not ident.startswith(b"P3107"):
+ if not ident.startswith(radio.IDENT):
LOG.debug(util.hexprint(ident))
raise errors.RadioError("Radio returned unknown identification string")
@@ -285,6 +285,7 @@ class H777Radio(chirp_common.CloneModeRadio):
VENDOR = "Baofeng"
MODEL = "BF-888"
PROGRAM_CMD = b'PROGRAM'
+ IDENT = b"P3107"
BAUD_RATE = 9600
NEEDS_COMPAT_SERIAL = False
@@ -399,12 +400,12 @@ def get_memory(self, number):
mem.empty = True
return mem
- if _mem.rxfreq.get_raw(asbytes=False) == "\xFF\xFF\xFF\xFF":
+ if _mem.rxfreq.get_raw() == b"\xFF\xFF\xFF\xFF":
mem.freq = 0
mem.empty = True
return mem
- if _mem.txfreq.get_raw(asbytes=False) == "\xFF\xFF\xFF\xFF":
+ if _mem.txfreq.get_raw() == b"\xFF\xFF\xFF\xFF":
mem.duplex = "off"
mem.offset = 0
elif int(_mem.rxfreq) == int(_mem.txfreq):
@@ -736,6 +737,30 @@ def match_model(cls, filedata, filename):
return False
+@directory.register
+class BF1909Radio(BF1901Radio):
+ VENDOR = "Baofeng"
+ MODEL = "BF-1909"
+ ALIASES = []
+ IDENT = b"P320h"
+ _ranges = [
+ (0x0000, 0x0110),
+ (0x0250, 0x0260),
+ (0x02B0, 0x02C0),
+ (0x03C0, 0x03E0),
+ ]
+ _memsize = 0x03F0
+
+ # TODO: Is it 1 watt?
+ POWER_LEVELS = [chirp_common.PowerLevel("Low", watts=1.00),
+ chirp_common.PowerLevel("High", watts=10.00)]
+
+ @classmethod
+ def match_model(cls, filedata, filename):
+ # This model is only ever matched via metadata
+ return False
+
+
@directory.register
class MAVERICKRA100Radio(BFM4Radio):
VENDOR = "Maverick"
diff --git a/tests/Python3_Driver_Testing.md b/tests/Python3_Driver_Testing.md
index bf3abf263..cb1fafd28 100644
--- a/tests/Python3_Driver_Testing.md
+++ b/tests/Python3_Driver_Testing.md
@@ -50,6 +50,7 @@
| Baofeng_5RX | [@KC9HI](https://github.com/KC9HI) | 16-Jan-2024 | Yes | |
| Baofeng_BF-1901 | [@cetinajero](https://github.com/cetinajero) | 3-Jul-2023 | Yes | |
| Baofeng_BF-1904 | [@cetinajero](https://github.com/cetinajero) | 3-Jul-2023 | Yes | |
+| Baofeng_BF-1909 | [@KC9HI](https://github.com/KC9HI) | 10-May-2024 | Yes | |
| Baofeng_BF-888 | [@kk7ds](https://github.com/kk7ds) | 13-Feb-2019 | Yes | **15.53%** |
| Baofeng_BF-A58 | [@KC9HI](https://github.com/KC9HI) | 3-Dec-2022 | Yes | **1.46%** |
| Baofeng_BF-A58S | [@KC9HI](https://github.com/KC9HI) | 3-Dec-2022 | Yes | 0.59% |
@@ -457,11 +458,11 @@
| Zastone_ZT-X6 | [Implied by Retevis_RT22](#user-content-Retevis_RT22) | 9-Dec-2022 | Yes | 0.11% |
## Stats
-**Drivers:** 454
+**Drivers:** 455
-**Tested:** 87% (398/56) (93% of usage stats)
+**Tested:** 87% (399/56) (93% of usage stats)
-**Byte clean:** 91% (415/39)
+**Byte clean:** 91% (416/39)
## Meaning of this testing
diff --git a/tests/images/Baofeng_BF-1909.img b/tests/images/Baofeng_BF-1909.img
new file mode 100644
index 000000000..40ef0b1a2
Binary files /dev/null and b/tests/images/Baofeng_BF-1909.img differ
diff --git a/tests/py3_driver_testers.txt b/tests/py3_driver_testers.txt
index e2fbfe20f..3f75c0ae2 100644
--- a/tests/py3_driver_testers.txt
+++ b/tests/py3_driver_testers.txt
@@ -56,6 +56,7 @@ Baofeng_5RM,@vdwel,7-Dec-2023
Baofeng_5RX,@KC9HI,16-Jan-2024
Baofeng_BF-1901,@cetinajero,3-Jul-2023
Baofeng_BF-1904,@cetinajero,3-Jul-2023
+Baofeng_BF-1909,@KC9HI,10-May-2024
Baofeng_BF-888,@kk7ds,13-Feb-2019
Baofeng_BF-A58,@KC9HI,3-Dec-2022
Baofeng_BF-A58S,@KC9HI,3-Dec-2022