[chirp_devel] [PATCH] [tg-uv2+] Add 2 stopbits serial port setting fixes #8591
Ran Katz
Mon Mar 21 14:30:37 PDT 2022
# HG changeset patch
# User Ran Katz <rankatz at gmail.com>
# Date 1647873307 -7200
# Mon Mar 21 16:35:07 2022 +0200
# Node ID 161021504f56c8cb88224922f3cde66c62676419
# Parent b0c69ba0d8974b891a5826d7e658e47dca131709
[tg-uv2+] Add 2 stopbits serial port setting fixes #8591
A (Windows) user discovered that teh driver did not commmunicate properly with the radio,
The causewas wrong (default) stopbits setting ( was 1 stop bit).
As OEM SW uses 2 stopbits and fix was valicated on Windows and MAC, driver is updated accordingly.
diff --git a/chirp/drivers/tg_uv2p.py b/chirp/drivers/tg_uv2p.py
--- a/chirp/drivers/tg_uv2p.py
+++ b/chirp/drivers/tg_uv2p.py
@@ -19,6 +19,7 @@
import struct
import logging
+import serial
from chirp import chirp_common, directory, bitwise, memmap, errors, util
from chirp.settings import RadioSetting, RadioSettingGroup, \
RadioSettingValueBoolean, RadioSettingValueList, \
@@ -116,6 +117,7 @@
def do_ident(radio):
radio.pipe.timeout = 3
+ radio.pipe.stopbits = serial.STOPBITS_TWO
radio.pipe.write("\x02PnOGdAM")
for x in xrange(10):
ack = radio.pipe.read(1)
More information about the chirp_devel
mailing list