Skip to content

Commit d44fca6

Browse files
committed
Merge branch 'change/use_esptool_to_list_ports' into 'master'
change(tools): Use esptool to detect available ports See merge request espressif/esp-idf!42380
2 parents 46def99 + 6437959 commit d44fca6

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

tools/idf_py_actions/tools.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,8 @@ def get_default_serial_port() -> Any:
133133
# ensured that pyserial has been installed
134134
try:
135135
import esptool
136-
import serial.tools.list_ports
137136

138-
ports = list(sorted(p.device for p in serial.tools.list_ports.comports()))
139-
if sys.platform == 'darwin':
140-
ports = [port for port in ports if not port.endswith(('Bluetooth-Incoming-Port', 'wlan-debug'))]
137+
ports = esptool.get_port_list()
141138
# high baud rate could cause the failure of creation of the connection
142139
esp = esptool.get_default_connected_device(
143140
serial_list=ports, port=None, connect_attempts=4, initial_baud=115200

0 commit comments

Comments
 (0)