Skip to content

Commit a5def1a

Browse files
committed
change(port_detection): Filter out BT and WLAN debug serial ports on MacOS
Related to espressif/esp-idf#14058
1 parent 12ffe07 commit a5def1a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

esptool/__init__.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,14 @@ def get_port_list():
10061006
"Please try to specify the port when running esptool.py or update "
10071007
"the pyserial package to the latest version"
10081008
)
1009-
return sorted(ports.device for ports in list_ports.comports())
1009+
port_list = sorted(ports.device for ports in list_ports.comports())
1010+
if sys.platform == "darwin":
1011+
port_list = [
1012+
port
1013+
for port in port_list
1014+
if not port.endswith(("Bluetooth-Incoming-Port", "wlan-debug"))
1015+
]
1016+
return port_list
10101017

10111018

10121019
def expand_file_arguments(argv):

0 commit comments

Comments
 (0)