From 257dd0b3da86e24b7edce78b3a21a50c5eeaa5d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Joz=C3=ADfek?= Date: Wed, 19 Jul 2023 14:52:26 +0200 Subject: [PATCH] Fix MK2(.5) SN not working on multi-instance images --- ChangeLog | 1 + prusa/link/serial/serial_adapter.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 77d895d1..34252504 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23,6 +23,7 @@ - Hide zero temperatures in telemetry - Add support to be running behind the proxy * Hold the STOPPED and FINISHED state for at least 11s + * Fix MK2(.5)S SN being broken on multi-instance images 0.7.0 (2023-05-19) * Fixed printer sends info about api key change to Connect after change diff --git a/prusa/link/serial/serial_adapter.py b/prusa/link/serial/serial_adapter.py index 4bb6473a..f85f4027 100644 --- a/prusa/link/serial/serial_adapter.py +++ b/prusa/link/serial/serial_adapter.py @@ -195,7 +195,9 @@ def _reopen(self) -> bool: paths.extend(glob.glob("/dev/ttyACM*")) paths.extend(glob.glob("/dev/ttyUSB*")) else: - paths = [self.configured_port] + # Follow symlinks to the real device file + device_path = os.path.relpath(self.configured_port) + paths = [device_path] # Pair the usb printer paths with their serial numbers usb_printers = {