[SOLVED] ESP32 Serial monitor not working

Hello,

I can build and upload the programs on my ESP32.
But when I run the Monitor Serial nothing happens and the LED stops blinking (the port and the baudrate are good)
I tried VS Code with PlatformIO and Sublime Text with Deviot same problems. While on the Arduino IDE everything is ok.

If anyone has a solution ? :slight_smile:

Could you reproduce this issue with a simple main.cpp?

#include <Arduino.h>

void setup() {
  Serial.begin(9600);
  Serial.println("Test");
}

void loop () {
}

I just tried nothing, I try on another pc even worries, the problem could come from the ESP32

https://youtu.be/F9Y5JsHHvoc

Does it work with Arduino IDE?

Yes, I have just found the trouble, just put Off DTR & RTS in the settings of the serial monitor.

Zh0nd, how can I do it?

This is documented in Redirecting....

It works for me
adding to platformio.ini monitor_speed = 115200
monitor_rts = 0
monitor_dtr = 0

Thanks a lot!
this solution worked like a charm.

The serial monitor worked on the Arduino IDE, but not on the VC Code IDE.
This change fixed the problem.

I didn’t seem to need the monitor_dtr = 0

Thanks

For anyone else struggling with similar issues when working with custom ESP32-based hardware without an external USB-to-UART bridge, using only the native USB port built into the MCU, the following platformio.ini configuration worked for me.

I am using the ESP32-C3FH4X.


[env:esp32-c3-devkitm-1]
platform = espressif32
board = esp32-c3-devkitm-1
framework = arduino

build_flags =
    -DARDUINO_USB_MODE=1
    -DARDUINO_USB_CDC_ON_BOOT=1

upload_port = COM6
monitor_port = COM6
monitor_speed = 115200