From 2245ac8d970bf827b32b85eadce6d74ad5f03d2f Mon Sep 17 00:00:00 2001 From: Travis-L-R <> Date: Tue, 11 Nov 2025 19:18:00 +1030 Subject: [PATCH] Shifting serial interface connection parts from __init__() into connect() method --- meshtastic/serial_interface.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/meshtastic/serial_interface.py b/meshtastic/serial_interface.py index 96e1bcc..e80bc2d 100644 --- a/meshtastic/serial_interface.py +++ b/meshtastic/serial_interface.py @@ -50,6 +50,11 @@ class SerialInterface(StreamInterface): else: self.devPath = ports[0] + StreamInterface.__init__( + self, debugOut=debugOut, noProto=noProto, connectNow=connectNow, noNodes=noNodes, timeout=timeout + ) + + def connect(self) -> None: logger.debug(f"Connecting to {self.devPath}") if sys.platform != "win32": @@ -63,9 +68,7 @@ class SerialInterface(StreamInterface): self.stream.flush() # type: ignore[attr-defined] time.sleep(0.1) - StreamInterface.__init__( - self, debugOut=debugOut, noProto=noProto, connectNow=connectNow, noNodes=noNodes, timeout=timeout - ) + super().connect() def _set_hupcl_with_termios(self, f: TextIOWrapper): """first we need to set the HUPCL so the device will not reboot based on RTS and/or DTR