fix: try both COM11 and \\.\COM11 formats when opening serial port
pyserial should auto-add \\.\ prefix for COM>=10, but some versions don't. Added _open_serial() helper that tries the raw port name first, then falls back to explicit NT namespace prefix on Windows. Replaces all serial.Serial() calls across serial_monitor, reboot_manager, and widgets.
This commit is contained in:
+2
-1
@@ -1077,7 +1077,8 @@ class UartMonitorWindow(ctk.CTkToplevel):
|
||||
def _bg_open() -> None:
|
||||
try:
|
||||
import serial
|
||||
ser = serial.Serial(self._port, self._baudrate, timeout=1)
|
||||
from serial_monitor import _open_serial
|
||||
ser = _open_serial(self._port, self._baudrate, 1)
|
||||
ser.close()
|
||||
self.after(0, self._on_open_success)
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user