diff --git a/chirp/drivers/retevis_rt21.py b/chirp/drivers/retevis_rt21.py
index 881e317bd..582c6371b 100644
--- a/chirp/drivers/retevis_rt21.py
+++ b/chirp/drivers/retevis_rt21.py
@@ -176,6 +176,7 @@
u8 channel_8[13]; // 0070-007C
u8 unknown_8; // 007D
u8 tail; // QT/DQT Tail(inverted) 007E
+ u8 tailmode; // QT/DQT Tail Mode 007F
} settings;
#seekto 0x01F0;
@@ -528,6 +529,7 @@
PFKEY28B_LIST = ["None", "Scan", "Warn", "TX Power", "Monitor"]
PFKEY86_LIST = ["None", "Monitor", "Lamp", "Warn", "VOX", "VOX Delay",
"Key Lock", "TX Power", "Scan"]
+PFKEY89_LIST = PFKEY_LIST + ["Bluetooth ON/OFF"]
POT_LIST = ["Channel Type", "Volume Type"]
SAVE_LIST = ["Standard", "Super"]
SAVEM_LIST = ["1-5", "1-8", "1-10", "1-15"]
@@ -977,8 +979,10 @@ def get_memory(self, number):
mem.extra.append(rset)
if self.MODEL == "RB26" or self.MODEL == "RT76" \
- or self.MODEL == "RB23" or self.MODEL == "AR-63":
- if self.MODEL == "RB26" or self.MODEL == "RB23":
+ or self.MODEL == "RB23" or self.MODEL == "AR-63" \
+ or self.MODEL == "RB89":
+ if self.MODEL == "RB26" or self.MODEL == "RB23" \
+ or self.MODEL == "RB89":
rs = RadioSettingValueBoolean(_mem.bcl)
rset = RadioSetting("bcl", "Busy Channel Lockout", rs)
mem.extra.append(rset)
@@ -1409,8 +1413,10 @@ def apply_pfkey_listvalue(setting, obj):
"RT76",
"RT86",
"RT619",
+ "RB89",
]:
- if self.MODEL == "RB26" or self.MODEL == "RB23":
+ if self.MODEL == "RB26" or self.MODEL == "RB23" \
+ or self.MODEL == "RB89":
_settings2 = self._memobj.settings2
_settings3 = self._memobj.settings3
@@ -1466,7 +1472,8 @@ def apply_pfkey_listvalue(setting, obj):
rset = RadioSetting("voice", "Voice Annumciation", rs)
basic.append(rset)
- if self.MODEL == "RB26" or self.MODEL == "RB23":
+ if self.MODEL == "RB26" or self.MODEL == "RB23" \
+ or self.MODEL == "RB89":
rs = RadioSettingValueList(VOICE_LIST2,
VOICE_LIST2[_settings.voice])
rset = RadioSetting("voice", "Voice Annumciation", rs)
@@ -1477,7 +1484,7 @@ def apply_pfkey_listvalue(setting, obj):
rset = RadioSetting("chnumberd", "Channel Number Enable", rs)
basic.append(rset)
- if self.MODEL == "RT86":
+ if self.MODEL == "RT86" or self.MODEL == "RB89":
rs = RadioSettingValueList(SPECIAL_LIST,
SPECIAL_LIST[_settings.tailmode])
rset = RadioSetting("tailmode", "QT/DQT Tail Mode", rs)
@@ -1494,6 +1501,7 @@ def apply_pfkey_listvalue(setting, obj):
if self.MODEL in ["RB23",
"RB26",
"RT86",
+ "RB89",
]:
rs = RadioSettingValueBoolean(not _settings.tail)
rset = RadioSetting("tail", "QT/DQT Tail", rs)
@@ -1537,7 +1545,8 @@ def apply_pfkey_listvalue(setting, obj):
rset = RadioSetting("voxd", "Vox Delay", rs)
basic.append(rset)
- if self.MODEL == "RB26" or self.MODEL == "RB23":
+ if self.MODEL == "RB26" or self.MODEL == "RB23" \
+ or self.MODEL == "RB89":
rs = RadioSettingValueBoolean(_settings3.vox)
rset = RadioSetting("settings3.vox", "Vox Function", rs)
basic.append(rset)
@@ -1693,6 +1702,17 @@ def apply_pfkey_listvalue(setting, obj):
rset = RadioSetting("pf2", "PF2 Key Set", rs)
basic.append(rset)
+ if self.MODEL == "RB89":
+ rs = RadioSettingValueList(PFKEY89_LIST,
+ PFKEY89_LIST[_settings.pf1])
+ rset = RadioSetting("pf1", "PF1 Key Set", rs)
+ basic.append(rset)
+
+ rs = RadioSettingValueList(PFKEY89_LIST,
+ PFKEY89_LIST[_settings.pf2])
+ rset = RadioSetting("pf2", "PF2 Key Set", rs)
+ basic.append(rset)
+
if self.MODEL == "RB28B" or self.MODEL == "RB628B":
rs = RadioSettingValueInteger(0, 9, _settings.squelch)
rset = RadioSetting("squelch", "Squelch Level", rs)
@@ -2222,3 +2242,31 @@ class RT86Radio(RT21Radio):
def process_mmap(self):
self._memobj = bitwise.parse(MEM_FORMAT_RT86, self._mmap)
+
+
+@directory.register
+class RB89Radio(RT21Radio):
+ """RETEVIS RB89"""
+ VENDOR = "Retevis"
+ MODEL = "RB89"
+ BLOCK_SIZE = 0x20
+ BLOCK_SIZE_UP = 0x10
+
+ POWER_LEVELS = [chirp_common.PowerLevel("High", watts=5.00),
+ chirp_common.PowerLevel("Low", watts=0.50)]
+
+ _magic = b"PHOGR" + b"\x01" + b"0"
+ _fingerprint = [b"P32073" + b"\x01\xFF", ]
+ _upper = 30
+ _ack_1st_block = False
+ _skipflags = True
+ _reserved = True
+ _gmrs = False # sold as GMRS radio but supports full band TX/RX
+
+ _ranges = [
+ (0x0000, 0x0330),
+ ]
+ _memsize = 0x0340
+
+ def process_mmap(self):
+ self._memobj = bitwise.parse(MEM_FORMAT_RB26, self._mmap)
diff --git a/tests/Python3_Driver_Testing.md b/tests/Python3_Driver_Testing.md
index 5a9a1d77b..a341caef6 100644
--- a/tests/Python3_Driver_Testing.md
+++ b/tests/Python3_Driver_Testing.md
@@ -323,6 +323,7 @@
| Retevis_RB75 | [@KC9HI](https://github.com/KC9HI) | 28-Nov-2022 | Yes | 0.02% |
| Retevis_RB85 | [@KC9HI](https://github.com/KC9HI) | 28-Nov-2022 | Yes | 0.02% |
| Retevis_RB87 | [@KC9HI](https://github.com/KC9HI) | 10-Mar-2023 | Yes | |
+| Retevis_RB89 | [@KC9HI](https://github.com/KC9HI) | 6-Aug-2024 | Yes | |
| Retevis_RT1 | [@KC9HI](https://github.com/KC9HI) | 11-Dec-2022 | Yes | 0.08% |
| Retevis_RT15 | [@KC9HI](https://github.com/KC9HI) | 18-Feb-2023 | Yes | 0.00% |
| Retevis_RT16 | [@KC9HI](https://github.com/KC9HI) | 30-Nov-2022 | Yes | 0.02% |
@@ -467,11 +468,11 @@
| Zastone_ZT-X6 | [Implied by Retevis_RT22](#user-content-Retevis_RT22) | 9-Dec-2022 | Yes | 0.11% |
## Stats
-**Drivers:** 464
+**Drivers:** 465
-**Tested:** 87% (406/58) (93% of usage stats)
+**Tested:** 87% (407/58) (93% of usage stats)
-**Byte clean:** 91% (425/39)
+**Byte clean:** 91% (426/39)
## Meaning of this testing
diff --git a/tests/images/Retevis_RB89.img b/tests/images/Retevis_RB89.img
new file mode 100644
index 000000000..52050f606
Binary files /dev/null and b/tests/images/Retevis_RB89.img differ
diff --git a/tests/py3_driver_testers.txt b/tests/py3_driver_testers.txt
index f70a48d24..a0aaa559f 100644
--- a/tests/py3_driver_testers.txt
+++ b/tests/py3_driver_testers.txt
@@ -289,6 +289,7 @@ Retevis_RB629,@KC9HI,24-Dec-2022
Retevis_RB75,@KC9HI,28-Nov-2022
Retevis_RB85,@KC9HI,28-Nov-2022
Retevis_RB87,@KC9HI,10-Mar-2023
+Retevis_RB89,@KC9HI,6-Aug-2024
Retevis_RT15,@KC9HI,18-Feb-2023
Retevis_RT16,@KC9HI,30-Nov-2022
Retevis_RT19,@KC9HI,30-Nov-2022