Notifications
Clear all

Can't upload code to ESP32-Cam

18 Posts
5 Users
7 Likes
639 Views
bttorres
(@bttorres)
Active Member
Joined: 4 months ago
Posts: 7
Topic starter  

I have been completely unable to upload any code to my ESP32-Cam. My Arduino Uno has absolutely no issues when I upload code to it.

Some background info on the what I'm using and what I've tried:

  • I'm using an FTDI interface (exact same one Bill used in the tut)
  • I have IO0 tied to GND
  • TX/RX going to the opposite pins on the FTDI
  • I've powered the ESP32-Cam with the FTDI and with a power supply and 9v battery (one at a time of course)
  • I've held the reset button for varying lengths of time
  • I have current drivers for the FTDI board (08-02-22) and it is recognized as COM4 on my PC. I've verified that it appears/disappears as it's plugged/unplugged.
  • I've tried using different board selections in the IDE
  • I've changed the COM port baud rate around in the IDE
  • I've tried different mini USB cables to be sure the cable isn't the issue
  • Using Windows 10
  • Using Arduino IDE 1.8.19
  • Using 240 MHz (Wifi/BT)
  • Tried both 80 and 40 MHz
  • Tried both QIO and DIO
  • Using IDE programmer: Esptool (only option)
  • I currently have my COM port in Windows setup for 115200, 8, N, 1
  • I've tried running the power through the 5V and 3V3 pins (one at a time of course) (NOT the VCC pin)
  • With the IO0 tied to GND, having the serial monitor open, and pressing the reset button, the serial monitor displays the message:

rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))waiting for download

  • When I try to upload code, the console displays this message:

A fatal error occurred: Failed to connect to ESP32: Serial data stream stopped: Possible serial noise or corruption.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
the selected serial port For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
does not exist or your board is not connected

Please please please help. I beg.


   
Quote
Topic Tags
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3464
 

I have no idea what is wrong, I switched to using the following board, it is a 'normal' setup without FTDI. https://amz.run/5pVB "https://amz.run/5pVB"

That is the Canadian amazon so change the .ca to whichever country is correct for you.

"Don't tell people how to do things. Tell them what to do and let them surprise you with their results.” - G.S. Patton, Gen. USA
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon


   
bttorres reacted
ReplyQuote
Inq
 Inq
(@inq)
Noble Member
Joined: 8 months ago
Posts: 967
 

I think @zander is quite expert in this field.  I'm subscribed, to hear his or anyone else's answer as one of these days I'm going to have blow dust off my ESP32-CAMs.

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, Access Point Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
bttorres reacted
ReplyQuote
Inq
 Inq
(@inq)
Noble Member
Joined: 8 months ago
Posts: 967
 

@zander - Well, my Internet is so slow... you already answered since I was able to see this thread. 😣 

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, Access Point Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3464
 

@bttorres You mention pressing the reset button (on the left) but what about the boot button (on the right) that is the one needed to upload a sketch.

"Don't tell people how to do things. Tell them what to do and let them surprise you with their results.” - G.S. Patton, Gen. USA
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon


   
ReplyQuote
Will
 Will
(@will)
Famed Member
Joined: 1 year ago
Posts: 2140
 
Posted by: @inq

@zander - Well, my Internet is so slow... 

Tsk tsk 🙂 Did Ben Franklin or Thomas Edison complain about their bandwidth ? 🙂

Experience is what you get when you don't get what you want.


   
Inq reacted
ReplyQuote
bttorres
(@bttorres)
Active Member
Joined: 4 months ago
Posts: 7
Topic starter  

@zander Unfortunately, I don't have an ESP32-CAM-MB. I only have the ESP32-CAM and the FTDI that Bill uses so there isn't a "boot button (on the right)" to press. There's only the reset button on the ESP32-CAM itself. At this point, I am willing to get another ESP32-CAM with the USB-TTL module though.


   
ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3464
 

@bttorres If you are going to buy another board, get the MB, it's so much easier to work with. What sketch are you trying to upload?

"Don't tell people how to do things. Tell them what to do and let them surprise you with their results.” - G.S. Patton, Gen. USA
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon


   
ReplyQuote
bttorres
(@bttorres)
Active Member
Joined: 4 months ago
Posts: 7
Topic starter  

@zander I've tried uploading the example sketches: "CameraWebServer" and "Wifi Scan"

This post was modified 4 months ago by bttorres

   
ReplyQuote
DaveE
(@davee)
Prominent Member
Joined: 2 years ago
Posts: 714
 

Hi @bttorres,

 I hesitate to mention this, as it breaks every rule in the book, but if your present ESP card is heading for the bin, you may decide there is nothing to lose.

If so, that is your decision, I am not recommending this course of action, as it 'should' risk damaging the ESP32!

-----------------------

USB power and data are all based on 5V levels ... most, but not all, Arduinos are the same, but ESP32s are 3.3V data logic levels ... in fact the ESP32 processor chip is only designed to see 0 to 3.3V on all of its pins. The ESP32 Cam (and other ESP32 cards) have a 5V to 3.3V power regulator on board, so it is possible to supply 5V from the FTDI card, to the 5V pin of course.

But the ESP32 requires only all data/logic signals, including those from the FTDI board, to be 3.3V. Hence, you should have selected the 3.3V setting on the FTDI board. And it should have worked!!!

When I followed Bill's excellent tutorial, it worked first time and that is with the FTDI jumper set to 3.3V.

---------

However, I had a number of message exchanges with another person on this forum ... including on this topic .... and the only way he got his to program, was with the FTDI card jumpered to 5V. I also saw someone else reporting similar observations on the Web.

As I can't see the cards affected, I can't connect scope probes, etc, so. I have no way of knowing what is going on. It might be one of those 'two wrongs making a right' .... which I was always taught didn't happen!

--------

I might also mention, although the problem could be the ESP32 card, I have a feeling some of the FTDI cards around are responsible for a lot of the problems ... perhaps their 3.3V/5V jumper system doesn't work as expected? But that is only a hunch, not a fact.

-----

Good luck with your project, I hope you can resolve it. Best wishes, Dave


   
bttorres reacted
ReplyQuote
bttorres
(@bttorres)
Active Member
Joined: 4 months ago
Posts: 7
Topic starter  

@davee Before I do anything like that, I'll see if anyone has any remaining advice and I'll also get the ESP32-CAM with the MB. If there isn't any remaining advice and my current card doesn't work with the future MB, I'll try that out before tossing it.


   
DaveE reacted
ReplyQuote
bttorres
(@bttorres)
Active Member
Joined: 4 months ago
Posts: 7
Topic starter  

UPDATE:

I received the new ESP32-CAM-MB and it was plug and play. No issues at all.


   
DaveE reacted
ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3464
 

@bttorres BACKGROUND The sample sketch for the camera web server is broken.

Now you need to choose, either switch to the V4 unofficial version, or backlevel your esp32 boards to 1.0.6.

Let me know your choice and I will give you guidance.

"Don't tell people how to do things. Tell them what to do and let them surprise you with their results.” - G.S. Patton, Gen. USA
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon


   
ReplyQuote
bttorres
(@bttorres)
Active Member
Joined: 4 months ago
Posts: 7
Topic starter  

@zander I'm on esp32 version 2.0.4 and camera web server worked fine.

 

I am having a problem with Bill's "ESP32-CAM Robot Car" code though.

On 1.0.6, I get multiple errors like this:

C:\Users\brand\Documents\Arduino\IDK\app_httpd.cpp.ino:405:18: note: previous declaration 'esp_err_t index_handler'
static esp_err_t index_handler(httpd_req_t *req){
^
C:\Users\brand\Documents\Arduino\IDK\app_httpd.cpp.ino: In function 'void startCameraServer()':
app_httpd.cpp:419:5: error: invalid conversion from 'esp_err_t {aka int}' to 'esp_err_t (*)(httpd_req_t*) {aka int (*)(httpd_req*)}' [-fpermissive]
};

 

On 2.0.4, I get this one error:

fatal error: dl_lib_matrix3d.h: No such file or directory
#include "dl_lib_matrix3d.h"
^~~~~~~~~~~~~~~~~~~
compilation terminated.
exit status 1
dl_lib_matrix3d.h: No such file or directory


   
ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3464
 

@bttorres What sketch are you trying to compile?

"Don't tell people how to do things. Tell them what to do and let them surprise you with their results.” - G.S. Patton, Gen. USA
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon


   
ReplyQuote
Page 1 / 2