I see there are previous reports of the problem here:
As I mentioned there, I don't own one of these ESP32-CAM boards and haven't been able to reproduce the problem with any of the many other boards I do have.
I think the best way to proceed with the investigation is bisecting the origin of the problem.
The Arduino IDE 2.x code base is mostly only for the GUI components. Most of the non-GUI capabilities are provided by other tools. The next level down under the Arduino IDE 2.x is the "Arduino CLI" command line tool. This tool actually uses another command line tool named "serial-monitor", which translates the serial communication with the board and TCP/IP communication with the Arduino IDE 2.x. However, it can be a little tricky to use the serial-monitor tool directly, so I think using Arduino CLI will be the most convenient.
I'll provide instructions:
Use the Arduino IDE to upload a sketch to your board that produces periodic serial output. The one you showed in your screenshot is perfect, but I'll provide another example here for the sake of others who might later follow this and find it useful to have some text formatted code to copy/paste:
Unzip the downloaded file to any convenient location.
If it is not already open, start Windows "File Explorer".
Open the folder where you unzipped the Arduino CLI download.
In that folder listing, hold the Shift key while clicking the right hand button on the mouse.
From the context menu, click "Open PowerShell window here".
"PowerShell" will now open with the current directory set to the folder containing Arduino CLI.
Type the following command:
./arduino-cli monitor --port <port name>
Replace <port name> with the name of the port of your board.
Press the Enter key.
After a small delay, you should see something like this printed:
Connected to <port name>! Press CTRL-C to exit.
If the serial communication is working as expected, that should be followed by the expected output from the board.
Plug USB the LED blinks
start the command ./arduino-cli.exe monitor -p COM5
The led is dark and the message is Connected to COM5! Press CTRL-C to exit.
no output is logged.
after pull USB arduino-cli.exe ends
starting the command with unplugged USB
and plug USB few seconds after the message is
Connected to COM5! Press CTRL-C to exit.
��f������`���
Since you were able to reproduce the problem when using the same version of Arduino CLI and serial-monitor used by Arduino IDE 2.x, we now know that it is not caused by anything in the Arduino IDE code base. That eliminates a huge amount of complexity from the equation.
The next thing to determine is whether the issue still occurs when using the latest version of Arduino CLI and serial-monitor. This will tell us one of two things:
If it no longer occurs
The bug has been fixed by the development work done on those projects since the release versions used by Arduino IDE 2.x.
In this case, the developers will only need to update the Arduino IDE 2.x dependencies and the problem will be solved.
If it still occurs
There is still a bug in serial-monitor (or maybe in Arduino CLI, but that is less likely). The developers will need to investigate and fix the issue.
Instructions
I'll provide the instructions you can follow to run this new test:
Set up board
Use the Arduino IDE to upload a sketch to your board that produces periodic serial output. The one you shared in your last reply perfect.
Take note of which port your board is on (as selected in the Tools > Port menu of the Arduino IDE).
Close the Arduino IDE so we can make sure it isn't using the serial port.
(where <user name> is your Windows user name) ⓘ If looking for it with your file browser or command line, note that the C:\Users\<user name>\AppData folder is hidden by default. On Windows "File Explorer", you can make it visible by opening the "View" menu, then checking the box next to "☐ Hidden items".
Sign in to your GitHub account.
(GitHub only allows downloads of the tester builds of serial-monitor when you are signed in)
From the "Artifacts" section of the page, click the "Windows_X86-64" link.
A file named Windows_X86-64.zip will be downloaded.
Unzip the downloaded file.
Unzip the serial-monitor_test-a7951e03266934f0793f86df2c92522f52aa3f48-git-snapshot_Windows_64bit.zip file from the unzipped folder.
(yes, there is a ZIP inside of a ZIP )
Move the serial-monitor.exe file from the unzipped folder to the 0.9.2-beta.1 folder you created in step (1). The final location should be:
Unzip the downloaded file to any convenient location.
Run test
If it is not already open, start Windows "File Explorer".
Open the folder where you unzipped the Arduino CLI nightly build download.
In that folder listing, hold the Shift key while clicking the right hand button on the mouse.
From the context menu, click "Open PowerShell window here".
"PowerShell" will now open with the current directory set to the folder containing Arduino CLI.
Type the following command:
./arduino-cli monitor --port <port name>
Replace <port name> with the name of the port of your board.
Press the Enter key.
After a small delay, you should see something like this printed:
Connected to <port name>! Press CTRL-C to exit.
If the serial communication is working as expected, that should be followed by the expected output from the board.
Please let me know if you have any questions or problems while following those instructions.
It seems, that the behavior is the same
start the command ./arduino-cli.exe monitor -p COM5
The led is dark and the message is Connected to COM5! Press CTRL-C to exit.
no output is logged.
after pull USB arduino-cli.exe ends
starting the command with unplugged USB
and plug USB few seconds after the message is
Connected to COM5! Press CTRL-C to exit.
��f������`���
I'd like to send you a small terminal program written in golang to try out, to further reduce the possible causes. May you compile a golang program in case?
Otherwise I can post here a prebuild executable if you're ok with that.
It would be great to see if we can move forward towards a resolution for this issue.
Still the same problem with the final version 2.0.
The ESP32-CAM-MB board (MB = Mother Board) must have a problem.
A solution has been found by PlatformIO: in file platformio.ini, you have to add the lines:
monitor_rts = 0
monitor_dtr = 0
it works perfectly.
Too bad that the solution having been found, the Arduino developers were not inspired by it, because it makes their IDE unusable with the ESP32-CAM-MB which is a great progress in the use of the ESP32-CAM.
Hi @68tjs. I don't know what you mean by "inspired by it". In fact, more likely it was PlatformIO that was "inspired" by the addition of such a configuration capability in the Arduino IDE 5 years ago:
If you look at the bug report linked above, the developers have been working on adding this capability to the modern tooling. It was originally implemented in the Java codebase of Arduino IDE 1.x. Since that time, the Serial Monitor system has been completely reworked, using a flexible and powerful "pluggable monitor" approach that allows the monitoring of any communications channel rather than assuming Arduino boards will only ever communicate with the tooling via serial or network ports. This was a lot of work that was done in stages. The support for the control signal properties simply hadn't been added yet.
We do not and will not track development tasks on arduino.cc. We do that using the efficient infrastructure present in the GitHub repositories where the work happens. If you want to find the list of known bugs, feature requests, deficiencies, etc., you must go to the GitHub repositories of the relevant projects.
When I see users who still have problems with the ESP32-CAM-MB board when a simple solution exists, I share what I learned.
I never advised to use such or such IDE, I make an answer among others which can exist.
You choose to use GitHub, it's your responsibility, other competitors maintain easily accessible sites: platformIo, rp2040, Espressif.
Assume that your choices do not suit all users.
This discussion has become fruitless.
As far as I remember, the "so-called" Arduino IDE is that of Processing taken over by E Barragan. Arduino is an unfriendly fork of Wiring.
The first card I bought, an UNO R2, had a bootloader that only worked under XP. Cannot use it under Vista or Linux. I bought it in June 2011, the solution was known since February 2011. There was indeed an indication of the bug, but well hidden at the bottom of the Arduino site and inaccessible. It was very difficult for me to obtain the explanation and the solution, given by an independent reseller, different from the one where I had bought my card. You now understand why I am sensitive to non-information.
I don't spit in the soup, as we say in France. I recognize the eminent role of the company Arduino SA, Swiss law based in Lugano, in the popularization of microcontrollers and help to make them accessible to as many people as possible.
It's only those who do nothing that don't make mistakes.
But when there are mistakes, you shouldn't be outraged when they're pointed out. Acknowledging mistakes is the basis for improvement.
??? That is a forum post. How does that in any way back up your claim:
Arduino also has a forum. The bug and fix is also discussed in a forum post. So what exactly is it you think those competitors are doing differently?
Arduino IDE 2.x is a complete rewrite of the IDE. It doesn't share any DNA with Processing or Wiring.
ehry pointed out the mistake. There was no outrage. Instead there was an investigation and a lot of work to prepare a very high quality fix that doesn't involve users having to mess with unfriendly configuration files.
Surely. We use public issue trackers to clearly document all known bugs in the Arduino IDE and associated tools.
I didn't take it out on you personally, calm down.
You refuse information from the PlatformIo forum oK .
Give the same information in less than 10 lines on the arduino forum instead of sending read several github sites.
I think users, especially beginners, will find this alternative method more user-friendly.