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

Closes #14058
  • Loading branch information
radimkarnis authored and espressif-bot committed Jul 4, 2024
1 parent 7ccddb8 commit ed9b2d1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/idf_py_actions/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ def get_default_serial_port() -> Any:
import esptool
import serial.tools.list_ports
ports = list(sorted(p.device for p in serial.tools.list_ports.comports()))
if sys.platform == 'darwin':
ports = [
port
for port in ports
if not port.endswith(('Bluetooth-Incoming-Port', 'wlan-debug'))
]
# high baud rate could cause the failure of creation of the connection
esp = esptool.get_default_connected_device(serial_list=ports, port=None, connect_attempts=4,
initial_baud=115200)
Expand Down

0 comments on commit ed9b2d1

Please # to comment.