Skip to content

Commit

Permalink
change(port_detection): Filter out BT and WLAN debug serial ports on …
Browse files Browse the repository at this point in the history
…MacOS

Related to espressif/esp-idf#14058
  • Loading branch information
radimkarnis committed Jun 26, 2024
1 parent 12ffe07 commit a5def1a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion esptool/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,14 @@ def get_port_list():
"Please try to specify the port when running esptool.py or update "
"the pyserial package to the latest version"
)
return sorted(ports.device for ports in list_ports.comports())
port_list = sorted(ports.device for ports in list_ports.comports())
if sys.platform == "darwin":
port_list = [
port
for port in port_list
if not port.endswith(("Bluetooth-Incoming-Port", "wlan-debug"))
]
return port_list


def expand_file_arguments(argv):
Expand Down

0 comments on commit a5def1a

Please sign in to comment.