diff --git a/port-finder.py b/port-finder.py new file mode 100755 index 0000000..75b2cef --- /dev/null +++ b/port-finder.py @@ -0,0 +1,18 @@ +#! /usr/bin/env python3 + +import serial.tools.list_ports +from serial.tools.list_ports_common import ListPortInfo + +if __name__ == "__main__": + ports = serial.tools.list_ports.comports() + for port in ports: + if port.interface and port.interface.startswith("CircuitPython CDC2"): # CDC2 is the data-port + print(f"Port: {port.device}") + print(f" Description: {port.description}") + print(f" Manufacturer: {port.manufacturer}") + print(f" VID: {port.vid}") + print(f" PID: {port.pid}") + print(f" Serial Number: {port.serial_number}") + print(f" Location: {port.location}") + print(f" Interface: {port.interface}") + print() \ No newline at end of file