Hello, I’m not exactly new to all this but I am have a heck of a time getting the program to upload. I have an ESP32-CAM and am using a FTDI board. I am on port 5 and I know this is the right port because when I disconnect the cable COM 5 disappears. When I up load I get the error shown in the title. For testing I switched to COM1 and I get …..____ etc but I get the header failure even when pressing the reset button. I checked the wiring and it looks right. I have the port set to 9600 N81. What am I missing?
I’m thinking that board itself is connecting to USB OK. You need to move to the next part. Is the correct driver installed? Try removing/reinstall. Next is “esptool does not exist”. I believe that is installed as part of the board manager. Have you installed the ESP-32 CAM in boards manager? Perhaps try removing/reinstall the Arduino IDE and the board.
Do you have any other program that might be using the ESP32? Close all the other programs that might be using the ESP32.
Do you have an ESP32-CAM selected in Tools>Boards?
What’s the ESP32 boards version that you have installed?
You may need to unninstall and install the ESP32 Boards again (I’m not sure why that errors happens. Some of our readers have reported similar errors, but I’m not sure what’s causing it or what’s the exact solution).
I buzzed out the cable from the computer to the FTDI and it seems RX/TX is missing. I have another on order so we shall see
As Steve mentioned, it seems that your cable is just a power cable (it doesn’t have data wires). So that’s the issue.
OK so I’m getting a bit mad at this whole thig. NEW cable that says it is a data cable. The error is
Arduino: 1.8.13 (Windows 10), Board: “AI Thinker ESP32-CAM, 240MHz (WiFi/BT), DIO, 80MHz”
Sketch uses 2594774 bytes (82%) of program storage space. Maximum is 3145728 bytes.
Global variables use 56256 bytes (17%) of dynamic memory, leaving 271424 bytes for local variables. Maximum is 327680 bytes.
Serial port COM5
Traceback (most recent call last):
File “esptool.py”, line 3682, in <module>
File “esptool.py”, line 3675, in _main
File “esptool.py”, line 3329, in main
File “esptool.py”, line 263, in __init__
File “site-packages\serial\__init__.py”, line 88, in serial_for_url
File “site-packages\serial\serialwin32.py”, line 78, in open
File “site-packages\serial\serialwin32.py”, line 222, in _reconfigure_port
serial.serialutil.SerialException: Cannot configure port, something went wrong. Original message: WindowsError(31, ‘A device attached to the system is not functioning.’)
Failed to execute script esptool
the selected serial port Failed to execute script esptool
does not exist or your board is not connected
The Device manager says the port is there and open. The serial monitor shows non text activity going on without CRLF. I tried swapping RX/TX, no difference. I checked the voltage at the ESP and it is 5.01. What else can be wrong here?
Hello Andrew, I’m honestly not sure what’s going on…
Recently we had a problem with our Windows PC that was displaying multiple ports being used (even if no board was plugged in) and I had to delete all the Ports and re-install the serial drivers for my board.
I’ve re-read your first question and you can’t press the RESET button. When you see the
appearing in the Arduino IDE, you must hold down the BOOT button (not the reset button).
Well that is not the issue. I bought another esp with a programmer. The new one works, the old one works sometimes. Neither program with the ftdi. The old esp will program without any intervention sometimes and sometimes you need to hold down the reset. Anyway it is a hardware problem. Guess I should not be too surprised. Cheap boards, and no esd protection.
I’m sorry for the delay in my response (I’ve been out of the office during this past week).
It seems to be a hardware problem. Maybe there is some problem with the FTDI programmer too? We were always able to program the ESP32-CAM with our FTDI programmer.
We’re using this one: https://makeradvisor.com/tools/ftdi-programmer-board/.
I know this is for an old question, but I found I was having intermittent programing capability over the past month. Sometimes it would program fine, and other times it would do just what Andrew was stating above – fail to program. I eventually found that success was very much related to when the reset button was pushed. If it is pushed while in Arduino IDE is compiling and the green progress bar is about at the end, it will proceed to program (actually hitting it a couple of times). Otherwise it will fail. My guess is that the internal boot code in the ESP32 starts after a reset, but the firmware is poorly designed and doesn’t enable the internal UART properly in time for the IDE to start talking to it. It then hangs at the middle of a packet or something and the IDE times out and calls it a Fail to Program. I’d be interested in knowing if this works for other users.
As an aside, I know the 2 boards I have (labeled ESP32-CAM, just like in the ebook) don’t have a connection on the GND pin at the other end of the row that starts with 3.3v …. weird – it’s open. …. like all the ESP32 boards, the variation in pinnout by various manufacturers amazes me, and here’s yet another example.
Yes, I guess small variations on the hardware by different manufacturers may be responsible for different behaviors when trying to program it.
I just would like to mention that depending on the code that is currently running on the board, it may be busy when you try to upload code (for example, if the board is running a deep sleep code), so you’ll need to press the RST button to restart it right at the same time you’re trying to upload new code.
Thanks for sharing your experience.