I have Platformio IDE 1.10.0 installed on VSCode (WIN10). Platform is espressif32 V1.11.1, building on a lolin_d32_pro board.
Board flashing’s upload_port auto-detect is working correctly. But the serial monitor’s monitor_port does not auto-detect and instead I have to type in the COMx port.
I tried specifying the COM port with a wildcard in platformio.ino. Like this:
monitor_port = COM*
The good news is that this automatically launches the monitor terminal after each flash upload, but it chooses the wrong port for the monitor. For example, the ESP32 board is on COM4, but the monitor_port wildcard is picking COM5.
I have temporarily solved the issue by specifying the exact monitor_port COMx value in platformio.ini. Like this:
monitor_port = COM4
This works great for me. After a flash it automatically opens a monitor terminal for my serial debugging. But specifying a fixed COMx is problematic since port usage can vary with the other project members.
I would like to have monitor_port automatically copy the auto-detected COM port found by upload_port. Is this possible (or is there another solution)?