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