The setup - esp32-cam connected thru. ftdi board to the pc's usb port.
The ide - Version: 2.1.1, Date: 2023-06-30T16:04:40.277Z. CLI Version: 0.32.3
OS - windows7
When I plug everything to the pc, the device manager (and the ide) recognizes the board connected to com4. I can upload the sketch, but if I open the ide's serial monitor I get an error - "port monitor error: eof: could not connect to com4 serial port"
When using some other software as putty, I can establish communications with the board and the output is displayed as it should, so the problem is neither my hardware nor my sketch, which leaves the ide as the immidiate suspect.
Any ideas?
The Serial Monitor feature of Arduino IDE 2.x is only a graphical user interface. The actual communication with the Arduino board via the computer's serial port is handled by a helper tool named "serial-monitor".
I found that, starting from version 0.14.0, serial-monitor is incompatible with Windows 7. This is the cause of the "Port monitor error: EOF " error when attempting to use the Arduino 2.x Serial Monitor on a Windows 7 machine.
On startup, Arduino IDE checks to see if a new version of serial-monitor is available. If so, it automatically installs it. So for this reason, the incompatible version was automatically installed as soon as serial-monitor version 0.14.0 was released.
There are several possible workarounds for this problem. I'll describe both of them below. You can pick whichever one you prefer.
Use Arduino IDE 1.8.19
Arduino IDE 1.8.19 is fully compatible with Windows 7. This version of Arduino IDE can be downloaded from the links listed here:
Windows 7 was retired 4.5 years ago. Microsoft no longer provides security updates for the operating system. So it is a good idea to update your operating system.
If your computer can't support a newer version of Windows, or if you refuse to use the newer versions, you should consider using the excellent free open source Linux operating system. This operating system performs very well even on older or lower spec computers.
Use Compatible serial-monitor Version
As I mentioned above, the incompatibility was introduced in version 0.14.0 of the serial-monitor tool. This means if we can make Arduino IDE use a version of serial-monitor older than 0.14.0 (i.e., 0.13.0) then the problem will be solved.
As I explained previously, Arduino IDE will automatically update the tool if it discovers that a newer version is available than the one that is currently installed. So we must trick Arduino IDE into thinking the 0.13.0 installation is always newer than the latest version of serial-monitor. It determines the version of the tool from the name of the installation folder. So we only need to rename the serial-monitor 0.13.0 installation folder to a very high version number.
I'll provide instructions you can follow to do that:
Select File > Quit from the Arduino IDE menus if it is running.
All Arduino IDE windows will close.
Rename the 0.13.0 folder at the following path on your hard drive to 999.999.999:
If looking for it with your file manager or command line, note that the 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".
You should now find that you can use Serial Monitor without encountering that "Port monitor error: EOF " error.
Instructions for Those Who Don't Have serial-monitor 0.13.0 Installed
If you installed Arduino IDE recently then Arduino IDE will never have installed version 0.13.0 of serial-monitor and so you will not find the C:\Users\<username>\AppData\Local\Arduino15\packages\builtin\tools\serial-monitor\0.13.0\ when following step (3) of the instructions above. In this case it will be necessary to install that version of serial-monitor. I'll provide instructions for doing that:
Create a folder named 999.999.999 under the following path on your hard drive:
(where <username> is your Windows username) If looking for it with your file manager or command line, note that the 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".
Click the "serial-monitor_v0.13.0_Windows_64bit.zip" link you will see under the "Assets" section of that page.
A download of the ZIP file of the serial-monitor tool will start.
SOLVED...
It was easy, rename the directory 0.13.0 to 999.999.999.
Please when a new version of the serial-monitor comes out that works in my environment, please let me know.
Thanks in advance
Javier Valero