IDE 2.0.0-rc2 problem with serial monitor and ESP32-CAM

Serial monitor works fine with my ESP32-DEV-KIT-1 MCUs.

But I cannot get it to work with my ESP32-CAM. I decided to modify the pre-loaded sketch to include an option to toggle the build in (rather bright) LED so I could get good images in dark places.

My ESP32-CAM came with the ESP32-CAM-MB board which I use to interface to the Arduino IDE.

I can download sketches OK but if I try to use serial monitor no prints are shown and the sketch does not appear to start. If I close the serial monitor the sketch runs - I see the flashes of the LED that I programmed. Attached image of what I see.


I've probably forgotten something simple, but I've run out of ideas.
Dicky.

Hi @DickyOZ. You mention Arduino IDE 2.0.0-rc2 specifically. Have you tried it with other versions of the Arduino IDE (e.g., 1.8.x)? If so, did you get different results?


If you upload this simple Serial test sketch to your ESP32-CAM, do you get the expected result of "hello" being printed to Serial Monitor at 1 Hz?

void setup() {
  Serial.begin(115200);
}

void loop() {
  Serial.println("hello");
  delay(1000);
}

Same result. I'm wondering if it has something to do with the ESP32-CAM-MB.

Unfortunately, although I do have a standard ESP32 board, I don't own an ESP32-CAM and don't have any experience with them. Maybe one of the other forum members with an ESP32-CAM will comment here with their findings.

I am especially interested in regressions in Arduino IDE 2.x, so it would be very helpful if you would give it a try with the latest release of the classic Arduino IDE (1.8.16 at the moment) and let me know whether the same issue occurs with that IDE's Serial Monitor.

Thanks for the reply. The 1.8.16 version has made two major steps forward.

  1. The board info now has values. (2.0.0 version is blank).
    Untitled2

  2. Serial monitor now has the following output - much closer to what I expected.

All I have to do now is understand what it is actually saying. But it looks like I will be able to debug the new sketch I'm writing for the ESP32-CAM. All the CAM examples in Arduino want to connect to the home network whereas I want to start an access point that my phone can connect to. That is what the CAM did out of the box. But the out of the box sketch had no way of turning on the LED which I will need when I dangle the cam down the back of my car engine to try to find a slight oil leak.
Dicky.

This is expected. The behavior of Tools > Get Board Info has been changed.

In the classic Arduino IDE, it provides information about the port you have selected from the Tools > Port menu. The values shown in the VID and PID fields come from the USB device that generated that port.

In Arduino IDE 2.x, it provides information about the board you have selected from the Tools > Board menu. The values shown in the VID and PID fields come from the platform boards definition. For example, here is the board definition for the Uno:
https://github.com/arduino/ArduinoCore-avr/blob/1.8.4/boards.txt#L61-L102

uno.name=Arduino Uno

uno.vid.0=0x2341
uno.pid.0=0x0043
uno.vid.1=0x2341
uno.pid.1=0x0001
uno.vid.2=0x2A03
uno.pid.2=0x0043
uno.vid.3=0x2341
uno.pid.3=0x0243

[...]

If you select Tools > Board > Arduino AVR Boards > Arduino Uno in Arduino IDE 2.x, Tools > Get Board Info will show VID of 0x2341 and PID of 0x0043 regardless of whether you have a physical board with that VID/PID pair connected to your computer. Kind of questionable whether that is at all valuable, especially when considering that some boards, such as the Uno, have been manufactured with multiple VID/PID pairs.

In the case of the ESP32-CAM, no VID/PID pairs are specified in its definition. The reason is that the ESP32-CAM uses the VID/PID pair supplied the manufacturer of its general purpose USB to serial chip (probably either WCH CH340 or Silicon Labs CP210x), so there is no way to know whether the chip supplying that VID/PID is on an ESP32-CAM or one of the many other products that use the same USB chip. So this is why you see the blank VID and PID fields in the Arduino IDE 2.x's Tools > Get Board Info dialog when you have the ESP32-CAM selected from the Tools > Board menu. This is also why the IDE doesn't identify the port with the board name in the Tools > Port menu or in the dropdown board selector.

Thank you for the update. That is valuable information. Unfortunately, I have not been able to reproduce it with my standard ESP32 board. If anyone else has encountered this problem with the Arduino IDE 2.x Serial Monitor, please let me know.

Thanks again for the response and explanation.

I now think it has to do with the ESP32-CAM-MB which is needed because ESP32-CAM doesn't have a USB connection interface to Arduino. All my other boards have USB connectors and serial monitor works fine with them.

My Access Point is now up and cooking with gas :grinning:
Dicky.

I think I may have spotted the cause of the original problem.

In the Arduino IDE 2.0.0-rc2 screenshot you have COM1 selected from the Tools > Port menu. In your working Serial Monitor screenshot from Arduino IDE 1.8.16 you have COM4 selected.

Alas that was not the problem, sorry about the confusion - I was a bit hasty taking screen shots before selecting the COM port.
Things have taken a change for the worse since downloading 1.8.16
I don't know whether libraries have changed or what. But the LED doesn't now flash at all regardless whether I use 1.8.16 or 2.0.0. I wonder if the GPIO pin mapping for the LED has changed?
Serial monitor still doesn't work on 2.0.0 When the monitor is open the hard resetting of the RTS pin doesn't take effect until I close serial monitor; the sketch then runs.
Attached a couple of screen prints of 1.8.16


@DickyOZ, your topic has been moved to yje dedicated IDE2.0 section of the forum.

There is no 'hard reset' via the COM interface on an ESP32CAM.