diff --git a/changes/309.bugfix b/changes/309.bugfix new file mode 100644 index 0000000..67dbad9 --- /dev/null +++ b/changes/309.bugfix @@ -0,0 +1 @@ +Better handling of serial ports to allow ports like /dev/ttyACM0 and others diff --git a/changes/310.bugfix b/changes/310.bugfix new file mode 100644 index 0000000..181b71f --- /dev/null +++ b/changes/310.bugfix @@ -0,0 +1 @@ +Add /dev/ttyACM* to the list of serial ports to support radios like Kenwood TH-D74 on Ubuntu 24.04 diff --git a/d_rats/dplatform_unix.py b/d_rats/dplatform_unix.py index 0f0a8d0..02e5bf9 100755 --- a/d_rats/dplatform_unix.py +++ b/d_rats/dplatform_unix.py @@ -21,6 +21,7 @@ import glob import os import subprocess +import serial.tools.list_ports from .dplatform_generic import PlatformGeneric @@ -85,7 +86,7 @@ def list_serial_ports(self): :returns: The serial ports :rtype: list of str ''' - return sorted(glob.glob("/dev/ttyS*") + glob.glob("/dev/ttyUSB*")) + return [port.device for port in serial.tools.list_ports.comports()] def os_version_string(self): '''