After releasing some projects with the ESP32-CAM, some readers reported issues when trying to use the ESP32-CAM. This guide is a compilation with the most common errors when using the ESP32-CAM and how to fix them.
We’ve released the following projects with the ESP32-CAM:
- Video Streaming, Face Detection and Face Recognition
- ESP32 IP CAM – Video Streaming (Home Assistant and Node-RED)
- Take Photo and Save to MicroSD Card
- PIR Motion Detector with Photo Capture
- Take Photo, Save to SPIFFS and Display in Web Server
Note: some of our readers reported errors when trying to follow the ESP32-CAM project with Home Assistant. We’ve modified some lines on the code, so most of the problems related with that project should be fixed.
Please note that we couldn’t reproduce some of the errors on our end. However, we’ve gathered all the information given by our readers to get answers to the most common issues.
If you have a different problem or a different solution to these issues, you can share your tips by writing a comment below.
Most common errors:
- Failed to connect to ESP32: Timed out waiting for packet header
- Camera init failed with error 0x20001 or similar
- Brownout detector or Guru meditation error
- Sketch too big error – Wrong partition scheme selected
- Board at COMX is not available – COM Port Not Selected
- Psram error: GPIO isr service is not installed
- Weak Wi-Fi Signal
- No IP Address in Arduino IDE Serial Monitor
- Can’t open web server
- The image lags/shows lots of latency
- esp_camera_fb_get(): Failed to get the frame on time!
1. Failed to connect to ESP32: Timed out waiting for packet header
This error means that the ESP32-CAM is not in flashing mode or it is not connected properly to the FTDI programmer.
Double-check the steps to upload code
Double-check that you’ve followed the exact steps to put your ESP32-CAM in flashing mode. Failing to complete one of the steps may result in that error. Here’s the steps you need to follow:
Connect the ESP32-CAM board to your computer using an FTDI programmer. Follow the next schematic diagram:
Important: GPIO 0 needs to be connected to GND so that you’re able to upload code.
Many FTDI programmers have a jumper that allows you to select 3.3V or 5V. Make sure the jumper is in the right place to select 5V.
Important: GPIO 0 needs to be connected to GND so that you’re able to upload code.
ESP32-CAM | FTDI Programmer |
GND | GND |
5V | VCC (5V) |
U0R | TX |
U0T | RX |
GPIO 0 | GND |
To upload the code, follow the next steps:
1) Go to Tools > Board and select AI-Thinker ESP32-CAM.
2) Go to Tools > Port and select the COM port the ESP32 is connected to.
3) Then, click the upload button to upload the code.
4) When you start to see these dots on the debugging window as shown below, press the ESP32-CAM on-board RST button.
After a few seconds, the code should be successfully uploaded to your board.
GPIO 0 must be connected to GND
Important: if you can’t upload the code, double-check that GPIO 0 is connected to GND and that you selected the right settings in the Tools menu. You should also press the on-board Reset button to restart your ESP32 in flashing mode. Also, check that you have the FTDI programmer jumper cap set to 5V.
Check the FTDI programmer you are using
One of our readers reported the following: “found out that you can program the board with a USB-to-TTL module model CP2102 and that the CH340 model does NOT work“. This is the FTDI programmer we’re using.
Power the ESP32-CAM with 5V
Some of our readers reported that they could only upload code when the ESP32 was powered with 5V. So, power the ESP32-CAM with 5V.
FTDI Programmer 5V
Measure the output voltage of your FTDI programmer (VCC and GND) using a Multimeter to ensure it’s providing 5V to your ESP32-CAM.
2. Camera init failed with error 0x20001 or similar
If you get this exact error, it means that your camera OVX is not connected properly to your ESP32 board or you have the wrong pin assignment in the code.
Sometimes, unplugging and plugging the FTDI programmer multiple times or restart the board multiple times, might solve the issue.
Camera not connected properly
The camera has a tiny connector and you must ensure it’s connected in the the right away and with a secure fit, otherwise it will fail to establish a connection.
Wrong pin assignment in the code
When you get this error, it might also mean that you didn’t select the right board in the define section or the pin definition is wrong for your board.
Make sure you select the right camera module in your projects. You just need to uncomment the right camera module and comment all the others:
//#define CAMERA_MODEL_WROVER_KIT
//#define CAMERA_MODEL_M5STACK_PSRAM
#define CAMERA_MODEL_AI_THINKER
In this example, we’re using the CAMERA_MODEL_AI_THINKER, so it’s the one that is enabled. Otherwise, it will fail the pin assignment and the camera will fail to init.
There are many esp32-cam boards being released (“fake boards”) that the wiring between the ESP32 and the OV camera might be different, so selecting the camera module, might not be enough. You might need to check each gpio declaration with your board pinout.
For example, M5Stack board without PSRAM has a different pin assignment than the M5STACK with PSRAM (defined on the code by default). So, you need to change the pin definition in the code accordingly to the board pinout.
Not enough power through USB source
If you’re powering your ESP32 through a USB port on your computer, it might not be supplying enough power.
Faulty FTDI programmer
Some readers also reported this problem was solved by replacing their actual FTDI programmer with this one.
The camera/connector is broken
If you get this error, it might also mean that your camera or the camera ribbon is broken. If that is the case, you may get a new OV2640 camera probe.
3. Brownout detector or Guru meditation error
When you open your Arduino IDE Serial monitor and the error message “Brownout detector was triggered” is constantly being printed over and over again. It means that there’s some sort of hardware problem.
It’s often related to one of the following issues:
- Poor quality USB cable;
- USB cable is too long;
- Board with some defect (bad solder joints);
- Bad computer USB port;
- Or not enough power provided by the computer USB port.
Solution:
- try a different shorter USB cable (with data wires)
- use a different computer USB port or use a USB hub with an external power supply
- some readers reported that when powering the ESP32-CAM with 5V, the issue was fixed.
Also, follow the suggestions described in issue 2.
4. Sketch too big error – Wrong partition scheme selected
When you get the following error:
Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it.
Error compiling for board ESP32 Dev Module.
It means that you haven’t selected the right partition scheme. Make sure you select the right partition scheme. In your Arduino IDE, go to Tools > Partition Scheme, select “Huge APP (3MB No OTA)“.
5. Board at COMX is not available – COM Port Not Selected
If you get the following error or similar:
serial.serialutil.SerialException: could not open port 'COM8': WindowsError(2, 'The system cannot find the file specified.')
Failed to execute script esptool
the selected serial port Failed to execute script esptool
does not exist or your board is not connected
Board at COM8 is not available
It means that you haven’t selected the COM port in the Tools menu. In your Arduino IDE, go to Tools > Port and select the COM port the ESP32 is connected to.
It might also mean that the ESP32-CAM is not establishing a serial connection with your computer or it is not properly connected to the USB connector.
6. Psram error: GPIO isr service is not installed
You are using a board without PSRAM and you get the following error or similar:
E (161) gpio: gpio_isr_handler_remove(380): GPIO isr service is not installed, call gpio_install_isr_service() first
Camera init failed with error 0x101
when the board was initialized with the following settings:
config.frame_size = FRAMESIZE_UXGA;
config.jpeg_quality = 10;
config.fb_count = 2;
Adding the following fixes the issues (it lowers the image resolution so it won’t need so much space to store images. However, as a result, you cannot get some high resolution formats due to the limited memory):
if(psramFound()){
config.frame_size = FRAMESIZE_UXGA;
config.jpeg_quality = 10;
config.fb_count = 2;
} else {
config.frame_size = FRAMESIZE_SVGA;
config.jpeg_quality = 12;
config.fb_count = 1;
}
Note: face recognition and detection doesn’t work with boards without PSRAM. However, you can still use all the other functionalities of the board. For example, although you can’t use the face recognition and detection features of this project (ESP32-CAM Video Streaming and Face Recognition with Arduino IDE), you can still play with the example and explore the board features as long as you have the right pin assignment in the code.
7. Weak Wi-Fi Signal
Some readers reported that after powering the ESP32-CAM with 5V, they’ve gotten a more stable Wi-Fi signal. You can read this dedicated guide to learn how to connect an external antenna to the ESP32-CAM and extend Wi-Fi coverage.
The ESP32-CAM has the option to use either the built-in antenna or an external antenna. If your ESP32-CAM AI-Thinker has no Wi-Fi connection or poor connection, it might have the external antenna enabled. If you connect an external antenna to the connector, it should work fine.
Check if the jumper 0K resistor by the antenna connector is in the proper position for the desired antenna. There are 3 little white squares laid out like a “<” with the middle position being common.
The following photo shows a closer look at that area. You can clearly see a small 0K resistor connecting to the built-in antenna.
With board turned so the the PCB antenna is up:
- To use the PCB antenna, the resistor must be on the top position, like this: /
- For the antenna connector, the resistor must be on the bottom position, like this: \
So, to enable the on-board antenna:
- Unsolder the resistor that goes to the antenna, it’s in this position \
- And solder together the two connections to enable the on-board antenna.
8. No IP Address in Arduino IDE Serial Monitor
f you just see dots printed in the serial monitor (……), it means that your ESP32-CAM is not establishing a Wi-Fi connection with your router.
Double-check your network credentials
You need to make sure that you’ve typed your exact network credentials (SSID and password) in the following variables:
const char* ssid = "REPLACE_WITH_YOUR_SSID";
const char* password = "REPLACE_WITH_YOUR_PASSWORD";
Select the right baud rate in the Arduino IDE Serial Monitor
If you don’t select the right baud rate in the Arduino IDE Serial Monitor, you won’t get your board IP address or you’ll just get garbage on the screen.
Make sure you select the right baud rate. In our examples with the ESP32-CAM, we use 115200 baud rate.
Reset the board multiple times
You might also need to press the ESP32-CAM on-board RESET button multiple times to restart your ESP and print the IP address during boot.
RX and TX swapped
Double-check the connections between your ESP32 board and the FTDI programmer. RX goes to TX and TX goes to RX. If these connections are swapped, the ESP32-CAM is not able to establish a serial communication with your computer.
Wi-Fi Range
If the router is far away from your ESP32 board, it might not be able to catch the Wi-Fi signal. Ensure that your ESP32-CAM is fairly close to your router.
9. Can’t open web server
If the ESP32-CAM is printing the IP address in your Arduino IDE Serial Monitor, but when you try to open the web server in your web browser you see a blank screen, it usually means that you are trying to access the ESP32-CAM web server with multiple web browser tabs.
At the moment, these ESP32-CAM sketches only work with one client connected at a time.
10. The image lags/shows lots of latency
Having some latency is normal for such a small and cheap camera. Some readers have suggested the following to reduce latency:
- Power the ESP32-CAM with a standalone 5V power supply
- Reduce the frame size with the following in your code:
config.frame_size = FRAMESIZE_SVGA or config.frame_size = FRAMESIZE_VGA - Use an external antenna.
11. esp_camera_fb_get(): Failed to get the frame on time!
We’ve personally never faced this issue. However, many readers are getting this error with their ESP32-CAM boards.
One of our readers (Fibula) suggested the following to solve this issue:
“Im using the ESP32-CAM Module 2MP OV2640 Camera sensor Module Type-C USB module from Aliexpress. Although not mentioned, It doesn’t have the extra PSRAM the other M5 models do, and the camera has one changed IO pin.
See here: https://github.com/m5stack/m5stack-cam-psram/blob/master/README.md and scroll down to Interface Comparison.
The CameraWebServer Arduino example we’re probably all using doesn’t have this ESP32-CAM model defined.
You need to add it yourself in the main tab add:
#define CAMERA_MODEL_M5STACK_NO_PSRAM
And in the camera_pins.h tab add the following:
#elif defined(CAMERA_MODEL_M5STACK_NO_PSRAM)
#define PWDN_GPIO_NUM -1
#define RESET_GPIO_NUM 15
#define XCLK_GPIO_NUM 27
#define SIOD_GPIO_NUM 25
#define SIOC_GPIO_NUM 23
#define Y9_GPIO_NUM 19
#define Y8_GPIO_NUM 36
#define Y7_GPIO_NUM 18
#define Y6_GPIO_NUM 39
#define Y5_GPIO_NUM 5
#define Y4_GPIO_NUM 34
#define Y3_GPIO_NUM 35
#define Y2_GPIO_NUM 17
#define VSYNC_GPIO_NUM 22
#define HREF_GPIO_NUM 26
#define PCLK_GPIO_NUM 21
And you’re good to go.
Also note that the max resolution of the bare ESP32-CAM Module is XGA 1024×768, I assume also because of the lack of PSRAM. “
We hope this suggestion solves your issue. Let us know in the comments section.
Using larger microSD card sizes
According to he datasheet, the ESP32-CAM should only supports 4GB microSD cards.
However, we’ve tested with 16GB microSD card and it works well.
You might not be able to store more than 4GB, even though you have 16GB. We haven’t tested storing more than 4GB, so we’re not sure about this.
Are these projects compatible with M5Stack board?
Yes, the M5Stack ESP32 board is compatible with out projects. However, you must check your camera pinout to ensure you have the right assignment in the code.
You can check the M5Stack camera connections here.
How to set a fixed the IP Address
To set a static/fixed IP address, you can follow the next tutorial:
Setting ESP32-CAM as Access Point (AP)
You can set your ESP32-CAM as an Access Point (AP). This means you are able to connect to your ESP32-CAM directly without having to connect to your router. You can use the following code to set your video streaming web server as an Access Point:
/*********
Rui Santos
Complete project details at https://RandomNerdTutorials.com/esp32-cam-video-streaming-web-server-camera-home-assistant/
IMPORTANT!!!
- Select Board "AI Thinker ESP32-CAM"
- GPIO 0 must be connected to GND to upload a sketch
- After connecting GPIO 0 to GND, press the ESP32-CAM on-board RESET button to put your board in flashing mode
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
*********/
#include "esp_camera.h"
#include <WiFi.h>
#include "esp_timer.h"
#include "img_converters.h"
#include "Arduino.h"
#include "fb_gfx.h"
#include "soc/soc.h" //disable brownout problems
#include "soc/rtc_cntl_reg.h" //disable brownout problems
#include "esp_http_server.h"
// Replace with your network credentials
const char* ssid = "ESP32-Access-Point";
const char* password = "123456789";
#define PART_BOUNDARY "123456789000000000000987654321"
// This project was tested with the AI Thinker Model, M5STACK PSRAM Model and M5STACK WITHOUT PSRAM
#define CAMERA_MODEL_AI_THINKER
//#define CAMERA_MODEL_M5STACK_PSRAM
//#define CAMERA_MODEL_M5STACK_WITHOUT_PSRAM
//#define CAMERA_MODEL_M5STACK_WIDE
// Not tested with this model
//#define CAMERA_MODEL_WROVER_KIT
#if defined(CAMERA_MODEL_WROVER_KIT)
#define PWDN_GPIO_NUM -1
#define RESET_GPIO_NUM -1
#define XCLK_GPIO_NUM 21
#define SIOD_GPIO_NUM 26
#define SIOC_GPIO_NUM 27
#define Y9_GPIO_NUM 35
#define Y8_GPIO_NUM 34
#define Y7_GPIO_NUM 39
#define Y6_GPIO_NUM 36
#define Y5_GPIO_NUM 19
#define Y4_GPIO_NUM 18
#define Y3_GPIO_NUM 5
#define Y2_GPIO_NUM 4
#define VSYNC_GPIO_NUM 25
#define HREF_GPIO_NUM 23
#define PCLK_GPIO_NUM 22
#elif defined(CAMERA_MODEL_M5STACK_WIDE)
#define PWDN_GPIO_NUM -1
#define RESET_GPIO_NUM 15
#define XCLK_GPIO_NUM 27
#define SIOD_GPIO_NUM 22
#define SIOC_GPIO_NUM 23
#define Y9_GPIO_NUM 19
#define Y8_GPIO_NUM 36
#define Y7_GPIO_NUM 18
#define Y6_GPIO_NUM 39
#define Y5_GPIO_NUM 5
#define Y4_GPIO_NUM 34
#define Y3_GPIO_NUM 35
#define Y2_GPIO_NUM 32
#define VSYNC_GPIO_NUM 25
#define HREF_GPIO_NUM 26
#define PCLK_GPIO_NUM 21
#elif defined(CAMERA_MODEL_M5STACK_PSRAM)
#define PWDN_GPIO_NUM -1
#define RESET_GPIO_NUM 15
#define XCLK_GPIO_NUM 27
#define SIOD_GPIO_NUM 25
#define SIOC_GPIO_NUM 23
#define Y9_GPIO_NUM 19
#define Y8_GPIO_NUM 36
#define Y7_GPIO_NUM 18
#define Y6_GPIO_NUM 39
#define Y5_GPIO_NUM 5
#define Y4_GPIO_NUM 34
#define Y3_GPIO_NUM 35
#define Y2_GPIO_NUM 32
#define VSYNC_GPIO_NUM 22
#define HREF_GPIO_NUM 26
#define PCLK_GPIO_NUM 21
#elif defined(CAMERA_MODEL_M5STACK_WITHOUT_PSRAM)
#define PWDN_GPIO_NUM -1
#define RESET_GPIO_NUM 15
#define XCLK_GPIO_NUM 27
#define SIOD_GPIO_NUM 25
#define SIOC_GPIO_NUM 23
#define Y9_GPIO_NUM 19
#define Y8_GPIO_NUM 36
#define Y7_GPIO_NUM 18
#define Y6_GPIO_NUM 39
#define Y5_GPIO_NUM 5
#define Y4_GPIO_NUM 34
#define Y3_GPIO_NUM 35
#define Y2_GPIO_NUM 17
#define VSYNC_GPIO_NUM 22
#define HREF_GPIO_NUM 26
#define PCLK_GPIO_NUM 21
#elif defined(CAMERA_MODEL_AI_THINKER)
#define PWDN_GPIO_NUM 32
#define RESET_GPIO_NUM -1
#define XCLK_GPIO_NUM 0
#define SIOD_GPIO_NUM 26
#define SIOC_GPIO_NUM 27
#define Y9_GPIO_NUM 35
#define Y8_GPIO_NUM 34
#define Y7_GPIO_NUM 39
#define Y6_GPIO_NUM 36
#define Y5_GPIO_NUM 21
#define Y4_GPIO_NUM 19
#define Y3_GPIO_NUM 18
#define Y2_GPIO_NUM 5
#define VSYNC_GPIO_NUM 25
#define HREF_GPIO_NUM 23
#define PCLK_GPIO_NUM 22
#else
#error "Camera model not selected"
#endif
static const char* _STREAM_CONTENT_TYPE = "multipart/x-mixed-replace;boundary=" PART_BOUNDARY;
static const char* _STREAM_BOUNDARY = "\r\n--" PART_BOUNDARY "\r\n";
static const char* _STREAM_PART = "Content-Type: image/jpeg\r\nContent-Length: %u\r\n\r\n";
httpd_handle_t stream_httpd = NULL;
static esp_err_t stream_handler(httpd_req_t *req){
camera_fb_t * fb = NULL;
esp_err_t res = ESP_OK;
size_t _jpg_buf_len = 0;
uint8_t * _jpg_buf = NULL;
char * part_buf[64];
res = httpd_resp_set_type(req, _STREAM_CONTENT_TYPE);
if(res != ESP_OK){
return res;
}
while(true){
fb = esp_camera_fb_get();
if (!fb) {
Serial.println("Camera capture failed");
res = ESP_FAIL;
} else {
if(fb->width > 400){
if(fb->format != PIXFORMAT_JPEG){
bool jpeg_converted = frame2jpg(fb, 80, &_jpg_buf, &_jpg_buf_len);
esp_camera_fb_return(fb);
fb = NULL;
if(!jpeg_converted){
Serial.println("JPEG compression failed");
res = ESP_FAIL;
}
} else {
_jpg_buf_len = fb->len;
_jpg_buf = fb->buf;
}
}
}
if(res == ESP_OK){
size_t hlen = snprintf((char *)part_buf, 64, _STREAM_PART, _jpg_buf_len);
res = httpd_resp_send_chunk(req, (const char *)part_buf, hlen);
}
if(res == ESP_OK){
res = httpd_resp_send_chunk(req, (const char *)_jpg_buf, _jpg_buf_len);
}
if(res == ESP_OK){
res = httpd_resp_send_chunk(req, _STREAM_BOUNDARY, strlen(_STREAM_BOUNDARY));
}
if(fb){
esp_camera_fb_return(fb);
fb = NULL;
_jpg_buf = NULL;
} else if(_jpg_buf){
free(_jpg_buf);
_jpg_buf = NULL;
}
if(res != ESP_OK){
break;
}
//Serial.printf("MJPG: %uB\n",(uint32_t)(_jpg_buf_len));
}
return res;
}
void startCameraServer(){
httpd_config_t config = HTTPD_DEFAULT_CONFIG();
config.server_port = 80;
httpd_uri_t index_uri = {
.uri = "/",
.method = HTTP_GET,
.handler = stream_handler,
.user_ctx = NULL
};
//Serial.printf("Starting web server on port: '%d'\n", config.server_port);
if (httpd_start(&stream_httpd, &config) == ESP_OK) {
httpd_register_uri_handler(stream_httpd, &index_uri);
}
}
void setup() {
WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); //disable brownout detector
Serial.begin(115200);
Serial.setDebugOutput(false);
camera_config_t config;
config.ledc_channel = LEDC_CHANNEL_0;
config.ledc_timer = LEDC_TIMER_0;
config.pin_d0 = Y2_GPIO_NUM;
config.pin_d1 = Y3_GPIO_NUM;
config.pin_d2 = Y4_GPIO_NUM;
config.pin_d3 = Y5_GPIO_NUM;
config.pin_d4 = Y6_GPIO_NUM;
config.pin_d5 = Y7_GPIO_NUM;
config.pin_d6 = Y8_GPIO_NUM;
config.pin_d7 = Y9_GPIO_NUM;
config.pin_xclk = XCLK_GPIO_NUM;
config.pin_pclk = PCLK_GPIO_NUM;
config.pin_vsync = VSYNC_GPIO_NUM;
config.pin_href = HREF_GPIO_NUM;
config.pin_sccb_sda = SIOD_GPIO_NUM;
config.pin_sccb_scl = SIOC_GPIO_NUM;
config.pin_pwdn = PWDN_GPIO_NUM;
config.pin_reset = RESET_GPIO_NUM;
config.xclk_freq_hz = 20000000;
config.pixel_format = PIXFORMAT_JPEG;
if(psramFound()){
config.frame_size = FRAMESIZE_UXGA;
config.jpeg_quality = 10;
config.fb_count = 2;
} else {
config.frame_size = FRAMESIZE_SVGA;
config.jpeg_quality = 12;
config.fb_count = 1;
}
// Camera init
esp_err_t err = esp_camera_init(&config);
if (err != ESP_OK) {
Serial.printf("Camera init failed with error 0x%x", err);
return;
}
// Connect to Wi-Fi network with SSID and password
Serial.print("Setting AP (Access Point)…");
// Remove the password parameter, if you want the AP (Access Point) to be open
WiFi.softAP(ssid, password);
IPAddress IP = WiFi.softAPIP();
Serial.print("Camera Stream Ready! Connect to the ESP32 AP and go to: http://");
Serial.println(IP);
// Start streaming web server
startCameraServer();
}
void loop() {
delay(1);
}
To better understand how it works, you can read the next tutorial:
Wrapping Up
We hope you’ve found this troubleshooting guide useful and you were able to make your ESP32-CAM work with our projects.
If you have any other issues or suggestions on how to fix them, please post a comment below.
If you like this project, you may also like other projects with the ESP32-CAM:
- ESP32-CAM AI-Thinker Pinout Guide: GPIOs Usage Explained
- Video Streaming, Face Detection and Face Recognition
- Build ESP32-CAM Projects (eBook)
- Read all our ESP32-CAM Projects, Tutorials and Guides
Thank you for reading.
P.S. It is very difficult to understand what’s wrong with your project when we can’t reproduce the error on our end. However, if you post the error, there might be other readers with the same issue/solution, so we encourage you to interact in the comment’s section.
Sara. I keep getting an error while compiling with dl_lib.h.
I am also unable to find that file on the web. Can you please enlighten me
on how to find that file.
Regards
Stuart Megson
just comment the line
#include “dl_lib.h”
in app_httpd.c
can you check if video streaming function well , changing the port .
Yes, you can change the Port and it will work. I’ve tried it
Mine runs for a few minutes and then starts showing fragmented frames and then dies.
I had find next behaviour. If ESP and “client” connected to the network same way (both WiFi) all works fine. But when ESP connected to WiFi and “client” via cable – stream dies. Could somebody help to solve this behavior?
I followed the direction correctly and the code gives me an IP address. When I enter the IP address I get the web page but no image. I am using 5v power as 3.3 v would not work. I have seen other people with this problem but no answers on what causes this or how to fix it.
Got mine working using an external 3.3V supply (brownout if I tried to use USB power) and using Firefox on Win10 to connect. If I try to connect from a mobile device (Android phone or old iPad) I see the webcam menu but I don’t see the image. Troubleshooting guide suggests no image with multiple web clients, but this was single client connection.
I experienced the same problem of no image until I discovered down at the bottom of the cam controls is a button labeled “Start Stream”. As soon as I clicked on it, Vwallah! I had live stream.
I also get an error “dl_lib.h: No such file or directory”
Then i have downloaded the file “dl_lib.h” from :
https://github.com/denizyuret/dlib/blob/master/dlib.h
.. but then i got another error :
In file included from C:\Users\Johan\Documents\_ESP_EYE\esp32_video_streaming_webserver\esp32_video_streaming_webserver.ino:26:0:
C:\Users\Johan\AppData\Local\Temp\arduino_build_292130\sketch\dl_lib.h: In function ‘char* dstrdup(str_t)’:
dl_lib.h:234:9: error: expected unqualified-id before ‘new’
str_t new = dalloc (len);
^
dl_lib.h:235:29: error: expected type-specifier before ‘,’ token
return (str_t) memcpy (new, s, len);
^
Meerdere bibliotheken gevonden voor “WiFi.h”
Gebruikt: C:\Users\Johan\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.3-rc1\libraries\WiFi
Niet gebruikt: C:\Program Files (x86)\Arduino\libraries\WiFi
Bibliotheek WiFi op versie 1.0 in map: C:\Users\Johan\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.3-rc1\libraries\WiFi wordt gebruikt
exit status 1
expected unqualified-id before ‘new’
…any ideas?
I’m also trying with an esp-eye and add this to the code :
#define CAMERA_MODEL_ESP_EYE
#elif defined(CAMERA_MODEL_ESP_EYE)
#define PWDN_GPIO_NUM -1
#define RESET_GPIO_NUM -1
#define XCLK_GPIO_NUM 4
#define SIOD_GPIO_NUM 18
#define SIOC_GPIO_NUM 23
#define Y9_GPIO_NUM 36
#define Y8_GPIO_NUM 37
#define Y7_GPIO_NUM 38
#define Y6_GPIO_NUM 39
#define Y5_GPIO_NUM 35
#define Y4_GPIO_NUM 14
#define Y3_GPIO_NUM 13
#define Y2_GPIO_NUM 34
#define VSYNC_GPIO_NUM 5
#define HREF_GPIO_NUM 27
#define PCLK_GPIO_NUM 25
just comment the line
#include “dl_lib.h”
in app_httpd.c
Hello you missed that the most common reason for brown outs are to thin cables
That can also be the issue.
Thanks for sharing 🙂
WEAK SIGNAL is also cause by the jumper that is solded for use the external antenna. Just change it to use the internal antenna
Hi Mario.
Thanks for pointing that out.
We’ll update the guide with that information.
You also need to put information on the page about setting the jumper on the FTDI board.
The other thing I see is and especially people that pay for your projects that you do not provide the help you should.
Kevin,
I find just the opposite. Rui and Sara help extensively. I do not get why you would think that at all? You do have to take some initiative to solve your own problems, but the computer systems, browsers, board possibilities and mis-understandings abound, so I find they do a very good job of support whenever possible.
Sorry you don’t think so.
Dave
Hi Sara/Rui
While trying to run the esp32 camera sketch using the FTDI device to interface the ESP32-CAM module to my PC I get the following error despite using the correct COM port using the Arduino IDE.
esptool.py v2.6
Serial port COM3
Traceback (most recent call last):
File “esptool.py”, line 2959, in
File “esptool.py”, line 2952, in _main
File “esptool.py”, line 2652, in main
File “esptool.py”, line 222, in __init__
File “site-packages\serial\__init__.py”, line 88, in serial_for_url
File “site-packages\serial\serialwin32.py”, line 62, in open
serial.serialutil.SerialException: could not open port ‘COM3’: WindowsError(121, ‘The semaphore timeout period has expired.’)
Failed to execute script esptool
the selected serial port Failed to execute script esptool
does not exist or your board is not connected
Error opening serial port ‘COM3’. (Port busy)
do you have a solution to this problem as I have followed your advice on the esp32-cam-troubeshooting-guide.
Thank you.
It looks like your COM port is open or being used in another program. Make sure you close all the programs that use COM ports (you might also need to close the Arduino IDE serial monitor).
Also, have the same issue, the port option is grayed out for me.
I get the same error.
Were you able to resolve it?
Were you able to resolve it?
I run into this problem too…
I guess replacing the FTDI programmer can help.
I will update if this was the problem, good luck people!
No matter what I do, every time I try to connect to the server, I get the following message in the browser:
“Header fields are too long for server to interpret”
I have tried several sketches, several fixes, several apparent workarounds, but it just keeps coming up. It compiles and uploads without a problem. But this issue is stopping any further progress.
Any ideas would be greatly appreciated.
J.
Any luck?
I get the same error: “Header fields are too long for server to interpret”
It seams that the browser sends too many headers that cannot be processed by ESP32.
From the internet (not the local network) this happens with chrome, but it shows OK if I choose incognito mode.
It shows OK in LAN.
I’m using ARDUINO IDE.
I read this but could not solve the issue: github.com/espressif/arduino-esp32/issues/2983
I’ve the same problem with android webview to display the webserver.
I’ve change the user agent in android studio and the problem’s solved
String newUA= “Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.4) Gecko/20100101 Firefox/4.0”;
C
thanks,,, working
Does ESP32-CAM work with OTA Update?
I haven’t tried it, but it will depend if your sketch that is running has enough memory left to use OTA…
Thank you for publishing this informative and very helpful troubleshooting guide. Specifically for the TTGO T-Camera w/Microphone v1.6, courtesy of github.com/lewisxhe/esp32-camera-series we learned you MUST set PinMode on GPIO 13 and 14:
pinMode(13, INPUT_PULLUP);
pinMode(14, INPUT_PULLUP);
to prevent crashes.
Thanks for the info, I’ve never used that board, but it’s good to know.
Hi,
I get the following in monitor
ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:9232
load:0x40080400,len:6400
entry 0x400806a8
But thats it. No …. for Wifi or any further info.
I note the difference is I have entry 0x400806a8 whilst your example shows 0x400806a4. Is this significant?
Thanks for any help.
Hello,
That doesn’t look like an error. It simply looks like the debugging information that is printed in your serial monitor after restarting your board.
Hello,
I am experiencing the same error with the person that you’ve gave this reply. I can upload the cameraeserver example code to ESP32Cam without a problem. My network credentials are correct, but when i go to the serial monitor i only view the debugging information :
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:9720
ho 0 tail 12 room 4
load:0x40080400,len:6352
entry 0x400806b8
I cannot see the three dots and the server information, the debugging info keeps looping in the serial monitor. Can you please help me ?
CH340 and FT232 work well with the ESP32_CAM.
It seems you need to have a small network for your ESP32_CAM, like a wifi_router at least, unlike the ESP32 or the ESP8266 that they give them regardless:
.
WiFi connected
Starting web server on port: ’80’
Starting stream server on port: ’81’
Camera Ready! Use ‘http://xxx.xxx.x.xxx’ to connect
I am experiencing the exact same situation. Have you find any solutions ?
Yes! Finally got it to work. What worked for me was first flashing at 3V3 and then running the ESP32 at 5V. However, one thing I missed, even in the troubleshooting guide (and did wrong myself) was that after switching to 5V, you will also have to connect the Vcc line (now carrying 5V) to the 5V pin on the ESP32 board in stead of the 3V3 pin that is only used for flashing. This may be obvious for experienced ESP32 users, but it isn’t for everyone 😉
Hi Pierre.
I’m happy that you finally made it work!
Thank you for sharing your mistakes. It may be helpful for some of our readers.
Now you can have fun experimenting our ESP32-CAM projects 😀
Regards,
Sara
That worked for me!
Thank you Pierre!
Hi. I did not understand the solution. I have the esp32cam, with AI thinker camera. In programming mode I put gnd with io0. With camera and wifi it doesn’t throw errors, but if I add a PIR am312, with “attachInterrupt” it returns an error: rst: 0x1 (POWERON_RESET), boot: 0x13 (SPI_FAST_FLASH_BOOT). It gave you this error and how did you solve it? Thank you.
I have tried it with 5v, with 3v. but something is missing right?
Hi.
With the ESP32-CAM you can’t use the attachInterrupt() function when using the camera.
You must set the interrupt as follows:
err = gpio_isr_handler_add(GPIO_NUM_13, &detectsMovement, (void *) 13);
if (err != ESP_OK) {
Serial.printf(“handler add failed with error 0x%x \r\n”, err);
}
err = gpio_set_intr_type(GPIO_NUM_13, GPIO_INTR_POSEDGE);
if (err != ESP_OK) {
Serial.printf(“set intr type failed with error 0x%x \r\n”, err);
}
Don’t forget to create the callback function:
static void IRAM_ATTR detectsMovement(void * arg) {
motionDetected = true;
}
I hope this helps.
Regards,
Sara
I can connect to web page get everything but no video, l am monitoring the output of the board an it is sending packets. Tried several browsers with same result also tried several esp boards and cameras.H E L P!!!
Frustrated
Hi.
I understand your frustration.
However, without any additional details, it is very difficult to understand what is causing the issue…
camera streams fine on my android chrome browser, however in Microsoft edge its just an x but it will capture a still. one thing I notice is when the button start stream is depressed looking in serial monitor nothing happens. its like the start stream button has no functionality . could be a flash issue or some other html issue.
Hi.
I think it’s a problem with the HTML. I think some features are not supported on Edge.
Regards,
Sara
Rui
The camera I have is the one that seems to be on most of the ebay sites ie ESP32-S FCCID 2AHMR. I haven’t been able to buy an AI Thinker esp32cam.
Sketch downloads for mine but when you go to serial monitor it says camera not supported.
Do you know if there is any camera model you can select for the sketch that will make this work?
I always bought my ESP32-CAM from Banggood and they all worked for me…
Mine is the same as yours but the AI Thinker works fine anyway. You have probably figured this by now but maybe will help others.
Sara, please help, I have the esp32 cam programed ,I can connect to it with 4 different browsers, powered it with both 3.3 and 5 volts on the respected pins, I see packets being transmitted but no video image . I see this on two different boards and cameras ,do you have any ideas?
Hi.
Are you powering the ESP32-CAM with 5V and 3.3V simultaneously? You should only use one power source.
Were you able to see the streaming when just one web browser tab with the streaming is open? (just one client at a time)?
Regards,
Sara
Only one voltage source at a time not both, and only one session at at time one on each browser at a time no multi sessions. Each session was monitored from the esp. I have tried several video modes from the web page configuration and restarted the session. If I could send you an image it would be worth a thousand words.
Hi Frank.
What web browser are you using?
You can upload your photo to imgur, google drive or other, and then share the link.
Regards,
Sara
Dear Rui/Sara
Forget my previous comment. Finally got it to work by
1. Getting hold of AIThinker ESP32 -S
2. Getting a secure camera connection (previous camera/ESP32 did not connect securely and camera kept falling out.
3.Using a CP2102 and connecting ESP32-S to 5v
Regards
Neil Austen
Hi Neil.
I’m glad that your problem is now fixed.
Thank you for sharing.
Regards,
Sara
Hi,
thanks for the fine tutorial and this troubleshooting guide!
I followed the steps and everything compiled, uploaded, started. The Serial monitor notifies that webserver at port 80 and stream server at port 81 have started and the Camera ready – however, I can only see the settings and get a black rectangle instead of the video. 2 or 3 other posters may have the same problem.
The hardware was bought from and is described at:
aliexpress.com/item/33038740493.html?spm=a2g0s.9042311.0.0.4cfd4c4d39A7TQ
Is there anything I can contribute to research the problem?
Hi Danyel.
Thank you for sharing your problem.
Some readers have reported same problem as you. However, if you already followed all our suggestion in our troubleshooting guide, I don’t know what else can be the problem.
Some people reported that after powering the ESP32 with 5V, everything started working fine.
Regards,
Sara
Danyel, Sara,
I did have the same problem with one of my modules. The module seemed to work, but was showing just an empty black frame with the red cross in the upper right corner.
After some investigation with a magnifier glass, I found that Pins GND, GPIO23 and GPIO22 of the WROOM module (the pins close to the antenna connector) did have no solder or better said, not enough solder to bridge a connection. After resoldering these three, the module worked.
Hope this is of help to anyone.
Regards
Frank
Thanks for sharing that.
I didn’t know that was an issue.
Regards,
Sara
Hi,
I have programed mine with both sketches (not at the same time). After using 5v for programing all seemed to go well.
However, regardless of which sketch (server or other) the images is full of horizontal lines. I have also noticed that the EPS32 module AND camera module get very hot after just a few minutes.
This is regardless of 5v or 3.3volts.
I have tried running off a battery in case the lines are generated by noise from a USB supply, but there is no difference.
Has anyone else had this or do you have any ideas.
Thanks.
Hi Martin.
For what you describe it seems that your camera may be defective or broken.
Do you get any errors in the Serial Monitor regarding the camera initialization?
Regards,
Sara
I have same issue, bought two modules twice from two different sellers and tested with both sketches and with both camera modules straight and with interchanged boards along with all available 5V, 1.5Amp & 2Amp chargers (even used filter capacitor as well), with programmable power supply and even directly with 2200mA battery but unable to remove the colored horizontal lines overlapping video. Now there are only two possibilities, either it is a design fault from the manufacturer’s end or there is something required to be modified in sketch code!
Hello, the problem is related to wifi power transmission (interference?). If the power transmission is reduced the lines disappear.
brownout and camera init failed whatever I tried every camera model and every troubleshooting guide as above.. Then I found someone said esp32 should connect 5v rather than 3.3v. Finally it works after I connect to 5v to eps32!
ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:9232
load:0x40080400,len:6400
entry 0x400806a8
[D][esp32-hal-psram.c:47] psramInit(): PSRAM enabled
Thats as far as mine gets, any ideas?
I’ve tried to connected the ESP32-CAM to Homeassiatnt without success.
Streaming to web app (ie ,chrom,saphari) works fine.
I’ve done clean install of homeassistant on my Ubuntu laptop.
No other devices expect the camera. Still with no results. Working with 5V coming from the USB slot to power the camera.
I suspect the camera code , although full success is reported at HA forums.
Looking for an advice.
Have the same problem: dl_lib.h not found. Cant find the library. Can you tell us where to find it?
Kind regards and greetings from Switzerland
delf
I got my camera working perfectly but face recognition will not work. There have been some comments floating around that the problem is with version 1.0.2 of the library. Can you confirm this is the cause of the problem.
Cheers
Neil Austen
Hi, Neil, happy new year! I have encountered the same problem as you. Now my online video stream works normally, but when I clicked the “Face recognition” and “Face Detection”, nothing happened and there is no colorful box displayed.
Besides, my board has also PSRAM. I still don’t know how to solve it? Do you have any progress on this problem?
Team,
I spent a lot of time trying to fix the issue #3 (Brownout… and Guru Meditation –> Amiga style) and the problem was on the Chinese USB-to-RS323 TTL module. I think those does not work well at high baud data communication, failing to transmit data to ESP32. I did change to a new module (original FTDI) and works perfectly.
Hope it helps,
AH
Hi Alvaro,
Thanks for sharing that.
Regards,
Sara
THANK YOU SO MUCH
I had this problem for so long and you helped me
first of all congratulations for these wonderful tutorials of esp32-cam..really high quality stuff..
after 1-2 hours with Brownout detector error..and after trying change to another cable or usb port or try usb hub nothing worked..
a test i suggest to other users is to upload an easy sketch like:
void setup(){ Serial.begin(115200);} void loop(){Serial.println(“i’m working”);}
if you open serial..you MUST see the message..
BUT when i tried some “heavy” sketch like WiFi scan example..or the CameraWebServer i had the Brownout detector error..
The only solution i found until now is to use a good power supply with 5v. Then i disconnected 5v (or 3.3v) pin that connects ESP and FTDI and connect the 5v ESP pin to the power supply, and the ground with the ground of ESP (i left the ESP32-FTDI ground because i guess everything has to be grounded).
After that reupload camera sketch and everything worked perfect..
So, i guess Wifi is very hungry for power to run with a USB..
btw..i have a question that nowhere have found good solid answer:
on ESP32-CAM there is 5v, 3.3v and VCC pins..
5v and 3.3v is only for INPUT to esp? can also work as OUTPUT?
what is VCC and what if i want to power ESP with a 9V battery?
Sorry..for the ultra long post..
First, thanks for providing so much great info about the ESP32 camera :-). To chime in regarding my experiences.
1. using the FTDI adaptor VCC pin to provide power produces brownouts, so I use a good 5V supply to the 5V pin on the module. The Vcc pin on the module is “not” connected to external power, and shows 3.3V.
2. I bought modules from 2 different ebay vendors, the first would not flash, no matter what, but the 2nd works fine, with both Rui’s code and the ESP32/camera example in the Arduino IDE.
3. it always pays to try a simple program first, like toggling an I/O pin, just to see if the module will flash ok.
my problem is esp32 was working correctly i was de bugging codes one time message came esp32 wroom is not recognised,after that whole day i was trying but no luck , i re installed arduino ide esspressif, no luck no error message, it says Hash data varified , Compressed 3072 bytes to 144… , writing at 0x00008000…..(100%)
wrote 3072 bytes(144 compressed)at 0x00008000 in 0.0 seconds(effective 910.2 kbits/s)… , Hash of data verified Leaving Hard resetting via RTS pin… but application does not start, i have 4 boards same thing ,please let me know what is wrong , THANKS
Hi.
That message means that the code was successfully uploaded to your board.
After seeing that message, press the on-board RST button to start the program.
Regards,
Sara
I have the same problem. After remove the jumper between IO0 and GND , I pressed the RST button, in the serial monitor it came out like this.
!⸮t4⸮8⸮⸮⸮⸮⸮s⸮⸮KG
Hi.
Please double-check that your serial monitor is set at a baud rate of 115200 and that you have the right RX and TX connections.
Regards,
Sara
Small adjustment to Sara’s reply.
…..
After seeing that message, REMOVE the jumper/link between IO0 and GND and THEN press the RST (reset) button. 🙂
By the way, was the jumper/link connected between IO0 and GND before sketch upload?
Regards
Hey, I have been eating my heart out in finding the solution to this error. I have also looked into other forums for this answer if anyone faced the same issue but none seem to be giving any solid way to correct this problem.
I have also installed cp210x driver that did not work either.
Even did the pip installation of pyserial as was given in one of the forums
Please, I would really appreciate if you could help me in on this.
esptool.py v2.6
Serial port COM4
Traceback (most recent call last):
File “esptool.py”, line 2959, in
File “esptool.py”, line 2952, in _main
File “esptool.py”, line 2652, in main
File “esptool.py”, line 222, in __init__
File “site-packages\serial\__init__.py”, line 88, in serial_for_url
File “site-packages\serial\serialwin32.py”, line 62, in open
serial.serialutil.SerialException: could not open port ‘COM4’: WindowsError(2, ‘The system cannot find the file specified.’)
Failed to execute script esptool
the selected serial port Failed to execute script esptool
does not exist or your board is not connected
Hi Sanil.
I think that error means that your computer is not able to find your ESP32-CAM.
It may not be properly connected to your FTDI programmer, or you may not be using a proper data cable.
Your computer may not be able to provide enough current, or you might need to power the ESP32-CAM with 5V.
Which FTDI programmer are you using?
Take a look at this, it may also help: https://github.com/espressif/arduino-esp32/issues/1137#issuecomment-367960948
Regards,
Sara
I can not get an IP address in the monitor window. I get all other info except the ip address. I have made sure my ssid and password for my wifi is correct. Is there suppose to be any info come up in the monitor window to tell me if something is wrong?
Any suggestions?
There are a few posts here with no answers to the issue of “dl_lib.h: No such file or directory” when compiling. Some have said just commenting it out will allow you to compile, which is true, but I’m not getting an image. Is there no answer to the issue of the missing library file? The other example tutorial for streaming works fine.
Hi.
At the moment, we still haven’t figured out what the problem is :/
If anyone knows how to solve this, please share.
Regards,
Sara
dl_lib.h: No such file or directory
For dl_lib.h: No such file or directory is because ESP32 Board Version 1.03 does’nt seem to include this anymore. Downgrade your ESP32 Board Version down to 1.02 in Andruino IDE and it should be fine. Worked for me.
Thanks for sharing 😀
This did it for me too!
You have to use new example file from 1.04 – there is a change in a program code.
for those who are facing the compilation error: dl_lib.h: No such file or directory, just comment out the #include”dl_lib.h” and it should get compiled. (ESP32 code 1.03).
Good morning
Even if I press the button RST on the ESP32_CAM I get the message:
“A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header”
What can I do?
Either: 1] Change the COM port or
2] Change the Baud rate down to 115200
I picked up a couple of boards at Microcenter that were under the Inland brand and after struggling for hours trying to get it to upload, I discovered that the GND next to UOT on my boards were not connected. The resistor that connects that bin (and VIN) was not soldered in place. Switching to a different GND on the board solved it for me.
After a while i got how to do it:
Open Serial Monotor,
Press reset button as many as to exact bellow message in Serial Monitor
rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download
Then you’re good to go 🙂
Hi, open the webserver, but I press the “start stream” button and the failure to open the image, this message appears in serial ,, …… already tried in 3 browsers, can anyone help me?
[E][camera.c:1344] esp_camera_fb_get(): Failed to get the frame on time!
Camera capture failed
Now it seems to write the code but then it complains that it was unable to do it, and it doesn’t write anything to the serial monitor, after disconnecting IO0 from ground and press RST:
“Arduino: 1.8.10 (Linux), Board: “ESP32 Wrover Module, Huge APP (3MB No OTA), QIO, 80MHz, 921600, None”
Sketch uses 405876 bytes (12%) of program storage space. Maximum is 3145728 bytes.
Global variables use 17624 bytes (5%) of dynamic memory, leaving 310056 bytes for local variables. Maximum is 327680 bytes.
esptool.py v2.6
Serial port /dev/ttyUSB0
Connecting…..
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC: a4:cf:12:6d:1c:e8
Uploading stub…
Running stub…
Stub running…
Changing baud rate to 921600
Changed.
Configuring flash size…
Warning: Could not auto-detect Flash size (FlashID=0x0, SizeID=0x0), defaulting to 4MB
Compressed 8192 bytes to 47…
Writing at 0x0000e000… (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 1944.2 kbit/s)…
A fatal error occurred: Timed out waiting for packet header
A fatal error occurred: Timed out waiting for packet header
Try lowering the upload speed in the Arduino IDE.. Tools.. Upload Speed – I had this issue until I dropped the speed to 115200.
Hello, someone knows how to fix the “Connection reset by peer” error? I’m working in a Control Access with face Recognition and when I try to access the IP adress this message shows up in the Monitor Serial, so I can’t use the camera or add faces in the flash. Please, I need help, it’s for my conclusion work.
Hi.
I’m sorry, but I don’t know what might be wrong.
I’ve never “heard” of that error with the ESP32-CAM.
Regards,
Sara
… or, select DIO as Flash Mode. That worked for me.
Regard
Selecting DIO also worked for me in one CAM
I bought 2 chinese ESP32 CAM. One worked as default flashing with QIO but the other one keeps reseting untill selecting DIO.
I used the small USB ESP-01 programmer at 3.3V and worked just fine.
I get the dl_lib.h error when compiling. Comment out as suggested and it compiles. I get the menu after inputting IP and can get a still photo but will not stream.
@Rafhael, I’m having the same error.
“[E][camera.c:1344] esp_camera_fb_get(): Failed to get the frame on time!
Camera capture failed”
Did you find a solution?
@Rafhael, I’m having the same error.
[E][camera.c:1344] esp_camera_fb_get(): Failed to get the frame on time!
Camera capture failed
if you have solved this with you, please post solution here; thanks
Hi Guys,
Have any1 of you found solution for this problem ?
[E][camera.c:1344] esp_camera_fb_get(): Failed to get the frame on time!
hey Vladimir,
i got the same error, please let me know if you got the solution for that, regards Mike
Hi Michael.
We’ve updated the guide with a possible solution for that issue.
Regards,
Sara
Hi Michael.
We’ve updated the guide with a possible solution for that issue.
Regards,
Sara
Hi Michael.
We’ve updated the guide with a possible solution for that issue.
Regards,
Sara
I am using the latest version of Arduino IDE 1.8. 10., to address Error #4, above.
When I go to Tools > Partition Scheme, select “Huge APP (3MB No OTA)“, there is no such Tool.
Where is the Partition Scheme Tool?
Hi Joel.
You need to select your board first.
Select the board first, and then check that you have that option.
Regards,
Sara
“Failed to connect to ESP32: Timed out waiting for packet header”. Add me to the people who failed to download the ESP32-CAM sketch when I connected the FTDI 3.3v output to 3v3 on the ESP32-CAM, using a genuine FTDI FT232RL-based USB serial adapter.
I resolved by switching the FTDI adapter to 5v mode, and connecting from the Vcc output on FTDI to the 5v input on the ESP32.
I note that you show the connection made this way in your PIR project blog post. https://i2.wp.com/randomnerdtutorials.com/wp-content/uploads/2019/08/ESP32-CAM-FTDI-programmer-5V-supply.png
Hi Rob.
Yes, you are right.
We can get our ESP32-CAM working with 3.3V.
However, after so many issues reported by ours readers, we now recommend powering with 5V on our most recent projects.
We still need to update some of our previous ESP32-CAM projects to use 5V instead of 3.3V.
Thanks for sharing.
Regards,
Sara
@Rob Jordan
Great catch, Rob!
hey guys, maybe anyone has found the solution for this error:
[E][camera.c:1344] esp_camera_fb_get(): Failed to get the frame on time!
Camera capture failed
regards, Mike
esp_camera_fb_get(): Failed to get the frame on time!
Yep, i’m in the same boat… Anyone overcome this yet?
A solution to the “esp_camera_fb_get(): Failed to get the frame on time!” message….
Im using the ESP32-CAM Module 2MP OV2640 Camera sensor Module Type-C USB module from Aliexpress. Although not mentioned It doesn’t have the extra PSRAM the other M5 models do AND the camera has one changed IO pin. See here… https://github.com/m5stack/m5stack-cam-psram/blob/master/README.md and scroll down to Interface Comparison. The CameraWebServer Arduino example we’re probably all using doesnt have this ESP32-CAM model defined. You need to add it yourself eg in the main tab add #define CAMERA_MODEL_M5STACK_NO_PSRAM , and in the camera_pins.h tab add…
#elif defined(CAMERA_MODEL_M5STACK_NO_PSRAM)
#define PWDN_GPIO_NUM -1
#define RESET_GPIO_NUM 15
#define XCLK_GPIO_NUM 27
#define SIOD_GPIO_NUM 25
#define SIOC_GPIO_NUM 23
#define Y9_GPIO_NUM 19
#define Y8_GPIO_NUM 36
#define Y7_GPIO_NUM 18
#define Y6_GPIO_NUM 39
#define Y5_GPIO_NUM 5
#define Y4_GPIO_NUM 34
#define Y3_GPIO_NUM 35
#define Y2_GPIO_NUM 17
#define VSYNC_GPIO_NUM 22
#define HREF_GPIO_NUM 26
#define PCLK_GPIO_NUM 21
And you’re good to go.
Also note that the max resolution of the bare ESP32-CAM Module is XGA1024x768 i assume also because of the lack of PSRAM.
Hi.
Thanks for sharing.
I’ll add this to our troubleshooting guide.
I’ve never faced this issue though. However, many people are complaining about this error.
Regards,
Sara
Fibula, thanks for the info, although I am not using the M5STACK module. Therefore, this info does not apply and does not resolve the issue for me. I still get this error. Based on your information, the likely cause is similar and likely caused by a pin change. The search continues!
New ESP32 Arduino version (v 1.03) remove this file “dl_lib.h” (and some others). Depending the sketch, probabily you can just remove this line because this library is beeing included but no method or function from this files is used.
In trouble with the WiFi.h you can try this hint:
https://github.com/1amchris/WiFi32.h
Hi.
Thanks for sharing. That can be useful for many of our readers.
Regards,
Sara
Hi Sara,
I’m getting
Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: “ESP32 Wrover Module, Huge APP (3MB No OTA/1MB SPIFFS), QIO, 80MHz, 921600, None”
Sketch uses 2100663 bytes (66%) of program storage space. Maximum is 3145728 bytes.
Global variables use 53544 bytes (16%) of dynamic memory, leaving 274136 bytes for local variables. Maximum is 327680 bytes.
esptool.py v2.6
Serial port COM8
Connecting…….._____….._____….._____….._____….._____….._____….._____
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.
Haven’t been able to find the solution.
I have used 2 FTDI’s, 3 different wire sets, 2 different ESP32S-CAM boards and all get the same fault…
Please help I’m loosing my mind!
Hi Adrian.
That means that your ESP32-CAM is not in flashing mode when you try to upload code.
Please make sure that GPIO 0 is connected to GND and that you press the RST button before clicking the upload button.
Try powering the ESP32-CAM with 5V as well as set the FTDI programmer to 5V.
Regards,
Sara
So after months of trying, I tried Flashing a new ESP32Cam and I have finally managed to flash a ESP32Cam.
The issue was that I needed to press and release the RST button after the
……_____……_____ started,
Then it flashed fine.
However I tried this on the 1st ESP32Cam which I had tried flashing time and time again before today and no luck.
I tried with the new method and still no luck!
Regards Adrian
Hello Sara/Adrian, thank you very much for your helpful troubleshooting guide. We had a lot of trouble finding a solution for the error “timed out waiting for packet header” on the ESP32-cam. We use now the 5V pin.
We first tried to follow your instructions:
“When you start to see these dots on the debugging window as shown below, press the ESP32-CAM on-board RST button.”
However we finally succeeded when we pressed de RST button UNTIL we saw the dots on the debugging window.
Great!
I’m glad you found a solution.
Regards,
Sara
Hi,
I detected the same issue. Root cause is lacking of sufficient 3.3 V power via the USB – serial FTDIs. External 5 V supply to the ESP32 solved the problem.
In that case there is no need to connect 3.3, GND, TX and RX are sufficient (and IO 0 to GND).
DEAR SARA,
i have been encountering the following problem
“Board ESP32wrover (platform esp32, package esp32) is unknown”
“Error compiling for ESP32 Wrover Module”
in the Arduino IDE
PLEASE ANY HELP AS TO THE WAY FORWARD?
Hi.
I’ve found some poeple with similar issues. They were able to solve their problem as described here: https://github.com/espressif/arduino-esp32/issues/2388
I hope this helps.
Regards,
Sara
Hi,
Thank you for a great tutorial.
Another approach to solve a problem.
My ESP32-Camera module is 2AHMR .
Upload of sketch working fine as described above.
But after reset, Camera was not recognized.
Tried with separate 5V power supply and different camera definitions in sketch – no luck.
Went back to AI-Thinker definition in sketch and uploaded the sketch with different Flash Mode. Instead of QIO, I used DIO.
That was the magic key for me. 🙂
I am keeping the external 5V power supply on 5V pin and using the USB2Seriel on 3.3V connected to 3.3V on the ESP.
I have experienced the Flash Mode issue before with other ESP32’s…
Regards.
got this error after press reset button on esp32…
23:23:21.525 -> ets Jun 8 2016 00:22:57
23:23:21.525 ->
23:23:21.525 -> rst:0x7 (TG0WDT_SYS_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
23:23:21.525 -> configsip: 0, SPIWP:0xee
23:23:21.525 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
23:23:21.525 -> mode:DIO, clock div:1
23:23:21.525 -> load:0x3fff0018,len:4
23:23:21.525 -> load:0x0f3f0004,len:448
23:23:21.869 -> ets Jun 8 2016 00:22:57
23:23:21.869 ->
23:23:21.869 -> rst:0x7 (TG0WDT_SYS_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
23:23:21.869 -> configsip: 0, SPIWP:0xee
23:23:21.869 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
23:23:21.869 -> mode:DIO, clock div:1
23:23:21.869 -> load:0x3fff0018,len:4
23:23:21.869 -> load:0x0f3f0004,len:192
23:23:22.166 -> ets Jun 8 2016 00:22:57
23:23:22.166 ->
23:23:22.166 -> rst:0x7 (TG0WDT_SYS_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
23:23:22.166 -> configsip: 0, SPIWP:0xee
23:23:22.166 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
23:23:22.166 -> mode:DIO, clock div:1
23:23:22.166 -> load:0x3fff0018,len:4
23:23:22.166 -> load:0x0f3f0004,len:448
what should i do??
Hi Eric.
It seems that the ESP32 is cosntantly rebooting.
Try powering the ESP32 using 5V power source.
Regards,
Sara
Hello, how is this message? Can you help me, please?
[E][camera.c:1049] camera_probe(): Detected camera not supported.
[E][camera.c:1249] esp_camera_init(): Camera probe failed with error 0x20004
Hi Mary.
The 0x2004 error means the camera is not supported.
On your camera ribbon, which label do you have? Ours is LA AF2569 0927XA
What label do you have in your camera model?
Regards,
Sara
Mine is LA AF2569 0927XB. How to make it work?
Hi.
It’s the same as mine. It should work straight away with our examples.
Regards,
Sara
It say [e][camera.c:1049] camera_probe(): detected camera not supported. [e][camera.c:1249] esp_camera_init(): camera probe failed with error 0x20004
What code are you trying to run?
Are you sure you’ve selected the right camera board in the code or that you’ve inserted the right pinout?
Regards,
Sara
I used from camerawebserver in the arduino. I already selected the right camera board. When I used the coding from you, it said camera init failed with error 0x20004
Are you powering the ESP32-CAM with 5V?
Yes. I used 5V.
Make sure that the camera probe is well connected.
I don’t know what can be causing the issue :/
Our cameras always work out of the box.
Regards,
Sara
problem is that it doesnt supply camera with enough power – mA. Connect it to desktop pc or add another power supply to test it. IT WORKS..
if it is esp32-wrover-cam from aliexpress then the problem is wrongly soldered LDO 1.2v and 2.8v. By switching places, everything starts to work. factory failure!!!
I had the 0x20004 error exactly.
I had two camera definition lines uncommented in the example sketch. Once I commented out the wrong one, things worked.
Thanks Blake! You are right, I needed to comment this out:
// Select camera model
//#define CAMERA_MODEL_WROVER_KIT // Has PSRAM
and uncomment this:
#define CAMERA_MODEL_AI_THINKER // Has PSRAM
and it started working!
That cured the camera not supported error for me. Thanks.
Regarding “Failed to connect to ESP32: Timed out waiting for packet header”
Your schematic photo misled me:
https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2019/03/ESP32-CAM-wiring-FTDI1.png?w=750&ssl=1
The FTDI has another pin layout as shown. Please consider to replace the image with something like this one:
https://buyhere22.com/components/usb-ttl-ft232rl-pinout.png
Also, I had the brownout issue using 3V. The 5V jumper settings in the FTDI needs also another counterpart pin on the ESP32! Something which wasn’t obvious for me.
Now, although I downloaded the latest arduino, the example code works great, I am unable to use the face recognition feature. Is there any further documentation on that?
Hi Markus.
What board are you using?
ESP32-CAM models without PSRAM don’t work with face recognition.
Regards,
Sara
Hello Sara, happy new year!
Finally got back to the project. Added a line to the setup-code: Yes, my board has PSRAM. I bought this board: “KeeYees WiFi + Bluetooth Modul Kit 4M PSRAM ESP32-CAM Dual-Core 32 Bit CPU” (smile.amazon.de/gp/product/B07S83X9NM/)
Alas, enrolling faces seems to have no effect at all. No fancy yellow rectangle, no text displayed. I tried different light environments.
Will debug the code…
Hi, Markus, happy new year! I have encountered the same problem as you. Now my online video stream works normally, but when I clicked the “Face recognition” and “Face Detection”, nothing happened and there is no colorful box displayed.
Besides, my board has also PSRAM. I still don’t know how to solve it? Do you have any progress on this problem?
I was constantly getting
A fatal error occurred: Timed out waiting for packet content
when uploading but the initial communication was working fine (esptool.py displayed the device details just fine).
The solution was to set the baud rate down to 115200. Maybe it’s the cheap CH341 USB-to-TTL module I’m using that cannot cope with higher baud rates.
Maybe this is helpful to others.
Thanks for sharing.
Regards,
Sara
hello world, could someone help me? I managed to view 3 esp32-cam inside my house … but when I tried to access from the outside I can only view 1 esp32-cam … the question is: has anyone tried to add more than one camera by accessing it from the external?
Hi Rui/Sara,
Thanks for you excellent tutorials on the ESP32-CAM boards. I have it setup now with the cam-web-server-camera-home-assistant sketch, which works very well when used with Chrome/Firefox. I run into problems though when running it into VLC (just doesn’t connect) and into my VMS, which reports “Camera error – HTTP mulitpart stream header missing Content-Length’. Any ideas why VLC & the VMS are throwing an error?
Best regards
Andy
Hi Andy.
I don’t know why that happens – I never tried using VLC to check ESP32-CAM video.
Please note that the ESP32-CAM can only stream to one client at a time.
I’m sorry that I can’t help much.
Regards,
Sara
Could you help me pls I can’t find on any website pinout for fake camera. I checked all this stuf like voltage itd. but it didn’t help me. I will be vey grateful if you help me
Hi.
What is exactly the camera board you’re using and the error you’re getting?
Regards,
Sara
Leaving…
Hard resetting via RTS pin…
Hi.
That means the code was successfully uploaded.
Disconnect GPIO 0 from GND, open the Serial Monitor and press the ESP32-CAM on-board RESET button to get its IP address.
Then, you just need to open a browser and type the ESP32-CAM IP address.
Regards,
Sara
thanks for sharing amazing projects
i upload code to the board and everythings work fine but when i turn off wifi and then turn it on again, web server not work again and it need manual restart to work again.
how can i fix this?
Hi, I tried following the tutorial and managed to get everything working up to the point of obtaining the IP address from the serial monitor. I bought an ESP32-S from Bangood (the only difference to the one in the tutorial is that mine doesn’t have the words AI-Thinker imprinted underneath ESP32-S). https://www.banggood.com/ESP32-CAM-WiFi-bluetooth-Development-Board-ESP32-with-FT232RL-FTDI-USB-to-TTL-Serial-Converter-40-Pin-Jumper-p-1605463.html?rmmds=detail-left-hotproducts__5&cur_warehouse=UK
I get an endless loop of the same message and have no idea how to fix this:
ets Jun 8 2016 00:22:57
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:9720
ho 0 tail 12 room 4
load:0x40080400,len:6352
entry 0x400806b8
Guru Meditation Error: Core 0 panic’ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x400db308: ffffffff ffffffff ffffffff
Core 0 register dump:
PC : 0x400db30c PS : 0x00060e30 A0 : 0x800d776c A1 : 0x3ffbb9f0
A2 : 0x00000001 A3 : 0x00000001 A4 : 0x3ffc2900 A5 : 0x00000000
A6 : 0x00000080 A7 : 0x00000000 A8 : 0x800852c1 A9 : 0x3ffbb9d0
A10 : 0x3ffc2900 A11 : 0x00c86016 A12 : 0x3ff49060 A13 : 0x00000000
A14 : 0x00000000 A15 : 0x00000000 SAR : 0x00000017 EXCCAUSE: 0x00000000
EXCVADDR: 0x00000000 LBEG : 0x4000c46c LEND : 0x4000c477 LCOUNT : 0x00000000
Backtrace: 0x400db30c:0x3ffbb9f0 0x400d7769:0x3ffbba20 0x400d34c8:0x3ffbba40 0x400d3441:0x3ffbba60 0x400d3db3:0x3ffbba80 0x400d73ae:0x3ffbbab0 0x4008db91:0x3ffbbad0
Rebooting…
Hi.
Take a look at bullet number 3.
Also, double-check that the ESP32-CAM is being powered with 5V. Check that with a multimeter.
Regards,
Sara
Hi,
I tried suggestions from bullet 3 but these don’t work. Checked the voltage input with a multiemeter and it was recieving 5V. I tried the ESP32 – WiFiScan Example and this worked fine however trying the ESP32-CAM Video Streaming and Face Recognition with Arduino IDE runs into the error mentioned in my above post. I don’t know if the WiFiScan uses PSRAM but if it doesn’t maybe this is the problem and my board is faulty?
Hi Andrew.
Did you select the right board on the code? So, that it uses the right pins for the camera?
Regards,
Sara
Hi Sara,
Yes I tried all of the above and rebuilt the circuit many times. I believe my board might be faulty as it is not detecting PSRAM, which it should be. I will let you know if the tutorials still fail to work upon receiving a new ESP32 board unless there is anything else you can think of that might help?
With best regards,
Andrew
Hello Sara,
Im using the AI Thinker module which includes psram and though face the Failed to get the frame on time-issue.
Perhaps someone knows a way to face this.
Having put together a soldered solution, your “How Too’s” are so good and then, I followed the Can’t get it to program, Point “1”!!!!
No Luck.
I then got another FTDI, and ESP-Cam module and, cobbled together, patched it. WORKED: Thanks sort of happy now.
nevermind, it was my fault, I was connecting to my network guest ssid, so when I tried from the main net I wasn’t reaching…!
Hello Shara,
I’m having this problem, repeat on my serial monitor, could you help me please …
16:42:39.376 -> rst:0x3 (SW_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
16:42:39.376 -> configsip: 0, SPIWP:0xee
16:42:39.376 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
16:42:39.376 -> mode:DIO, clock div:1
16:42:39.376 -> load:0x3fff0018,len:4
16:42:39.376 -> load:0x3fff001c,len:1100
16:42:39.376 -> load:0x40078000,len:9232
16:42:39.376 -> load:0x40080400,len:6400
16:42:39.376 -> entry 0x400806a8
16:42:39.895 -> ets Jun 8 2016 00:22:57
Hi.
For that problem, take a look at the suggestions at bullet 2 and 3. Usually, it is related to power supply. Make sure the ESP32-CAM is being powered with 5V on the 5V pin (not VCC pin).
Regards,
Sara
I’m getting a similar (slightly different) repeating Serial Monitor Output (see below). We’re on a Mac connected via USB/TTL cable which is putting out 5VDC (confirmed with multi-meter)
Tech specs:
MCU: AI Thinker ESP32Cam (that has worked just fine in the past)
Computer: MacBook Pro using on OS 10.15.4 (latest)
Arduino IDE: v1.8.12 (latest)
SiLabs Driver: v5.3.5 (latest)
ESP32 board package version 1.0.4 (latest)
Tools > Board > “AI Thinker ESP32-Cam” (This may be a change from prior successful attempts, so we might try other some other boards)
Repeating Serial Monitor Output:
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:9720
ho 0 tail 12 room 4
load:0x40080400,len:6352
entry 0x400806b8
Ammending the previous post. I get a little farther along if, instead of hitting the ESP32Cam’s “Reset” button after flashing, simply unplugging and re-plugging in the power. That takes care of the looping, but I get a camera error:
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:9720
ho 0 tail 12 room 4
load:0x40080400,len:6352
entry 0x400806b8
[E][camera.c:1049] camera_probe(): Detected camera not supported.
[E][camera.c:1249] esp_camera_init(): Camera probe failed with error 0x20004
Hey i thought i d share.Had the same problem, tried everything,wanted to toss it in the garbage.But than i looked at the camer ribbon cable and it looked assymetric up close.The plastic near the last right contact looked a bit wider than on the other side.Wich would mean it would be displaced in the slot. I sanded off just a fraction of milimeter, so it looked the same as on the other side. Put the camera in the slot, powered up the module and.. TADAAA, immediately i got IP with webcam working.
Great!
Thanks for sharing.
Regards,
Sara
Hi.
The connections have already been revised, but the problem persists, I have even tried to put an external power supply, however nothing has resolved so far, I have also followed resolutions 2 and 3, and nothing too. Any more ideas? Thankful for the return.
had the same error, what fixed it was lowering flash frequency to 40Mhz and flash mode to DIO
I let my problem going until I had to get rif of it to go further : pictures are with artefacts above resolution SVGA.
Downgrade the frequency to 10MHz solved my problem : config.xclk_freq_hz = 10000000;
I get now very nice picture for all resolutions (I do not need framerate at all)
I was looking for that for a while… I do not beleive I’m the only one !!!
Hope it will help many makers.
Maybe I got too cheap cameras ^^ !
Hi.
Thanks for sharing that.
Regards,
Sara
I have this error compile everything right, when I change to the correct model of the camera it does not work.
[E] [camera.c: 1344] esp_camera_fb_get (): Failed to get the frame on time!
00: 20: 59.513 -> Camera capture failed
I tried all the solutions above and it didn’t work, can someone help me?
Hi.
What is the code that you’re trying to run?
Regards,
Sara
Good morning Sara, the same code as the topic with this model,
produto.mercadolivre.com.br/MLB-1209327508-modulo-esp32-cam-c-camera-ov2640-2mp-_JM?quantity=1
I noticed that the model I bought is not Ai Thinker, is there any difference?
The camera is Ov2640 …
can you help me ?
Hi.
The camera should work with that board.
Are you following the exact steps we show?
How are you powering your board?
Regards,
Sara
Yes, I tried all of the above corrections, and continued with camera initialization error and capture failure, I’m using the notebook’s own power, 5v on the FTD converter output, the code loads beauty, opens the perfect web interface, but when it goes start the camera, it returns on the monitor
[E] [camera.c: 1344] esp_camera_fb_get (): Failed to get the frame on time!
00: 20: 59.513 -> Camera capture failed
Thanks for listening.
Same question:”Camera capture failed”.
With solution , code is fine ,Chrome open the website,
Perfect Views
Just can’t show the picture.
If you got something new to fix this bug ,please let me know it.
Thank you very much~
Hello,
I fell into all the traps without getting out of it, suddenly I changed my rifle
and I started on the Time Lapse proposed by the bitluni laboratory: https://bitluni.net/esp32camtimelapse
On the one hand, it works well, and seems more stable ;
and on the other hand, I was able to add the use of the GPIO0 port to use the ESP32 as a sound detector (via the FFT) and trigger a reboot that takes the photo.
I think your instructions should mention dropping the upload speed to 115200.
Until I did that, I couldn’t upload the sketch. I had to read the instructions on ‘instructables circuits’ to find that out. Others had the same issue, judging by the comments here.
The suggested upload speed is 115200. However, the speed of 962100 is also workable. A reliable upload speed varies from project to project. Even, the placement of the TX and RX wires can affect the upload speed.
Hi ,
I used esp32-cam in some dark scene, so added LEDC module for LIGHTING. I tried GPIO 4 ,14, 15, LEDs worked well. But the camera could not started up(camera can’t work with LEDC together?).
error messages:
E][sccb.c:154] SCCB_Write(): SCCB_Write Failed addr:0x30, reg:0xff, data:0x0
Hi.
It can.
But you probably need to use a different PWM channel.
The OV2640 camera uses PWM channel 0 when working with the ESP32-CAM. So, if you’re using PWM with the ESP32 and the camera at the same time, select a different channel for the PWM that is controlling the LED.
I hope this helps.
Regards,
Sara
yes, it does work!
Thx
Hello, it has allowed me to load the code but without reaction. The serial monitor does not print when I load it, when I reset it I get the following message:
20: 13: 08.908 -> ets Jun 8 2016 00:22:57
20: 13: 08.908 ->
20: 13: 08.908 -> rst: 0x1 (POWERON_RESET), boot: 0x3 (DOWNLOAD_BOOT (UART0 / UART1 / SDIO_REI_REO_V2))
20: 13: 08.908 -> waiting for download
I am using a Ttl Pl2303 Rs232 series programmer, will this have to do?
I can’t believe I did! GPIO 0 is real important!
Thank you It’s a big help.
I have this one,
https://fr.aliexpress.com/item/33031193519.html?spm=a2g0s.9042311.0.0.27426c37f5xS3l
Is it mapped in camera pins.h ?
I test the “motion detector photo email”. I found the followings in serial monitor.No gmail sending.
23:11:27.766 -> The picture has been saved in /photo.jpg – Size: 12048 bytes
23:11:27.766 -> Sending email…
23:11:27.766 -> Connecting to SMTP server…
23:11:29.869 -> SMTP server connected, wait for response…
23:11:30.073 -> Identification…
23:11:30.311 -> Authentication…
23:11:30.617 -> Sign in…
23:11:31.227 -> Error, login password is not valid
23:11:31.260 -> Error sending Email, login password is not valid
23:11:31.260 -> Going to sleep now
Hi.
Make sure that you allow less secure apps to access your sender gmail account.
Regards,
Sara
thank a lot
Google disabled less secure apps in September 2024… You need to enable two factor authentication, create a password app and use it in the config instead of your email’s password
Hello I am getting this error while compiling. Can someone kindly help me resolve the issue.
camera_pins.h: No such file or directory
Hi.
Which project are you following?
That means that you don’t have the camera_pins.h file on the sketch folder.
If you’re following this tutorial: https://randomnerdtutorials.com/esp32-cam-video-streaming-face-recognition-arduino-ide/
Make sure you have a tab in your Arduino IDE, called camera_pins.h
If you’re following that particular project, in your Arduino IDE, go to File > Examples > ESP32 > Camera and open the CameraWebServer example.
It should have several tabs, and one of them is called camera_pins.h
Regards,
Sara
hi, i am having a problem uploading the code… i had already checked the wiring and they are all good. Besides, i had changed the 3v to 5v and it still doesn’t work… i pressed the reset button too while uploading. what should i do?
Hi, if the serial monitor print out “waiting for download”, does it means my network connection is too weak?
Hi.
That means you forgot to disconnect GPIO 0 from GND. That means the ESP32 is in flashing mode.
Disconnect GPIO 0 from GND and you won’t have that issue. The ESP32 will run the code.
Regards,
Sara
Hi Sara,
perfect hint! Thank’s a lot.
Best regards
Michael
Hello, congratulations on the excellent work you are doing. Let’s see if you can orient me, my ESP CAM, goes well but in browser you only see image, does not load configuration menu. What am I doing wrong? What’s the matter?.
Best regards.
Hello, problem solved, I have been playing with different sketches and I had one modified by Rui loaded that did not have the configuration menu
Regards.
As a newbie, working with ESP32_CAM, I found I have almost all the issues mentioned above and in the guide. I never take a compilation failure as true unless I have: 1) powered off the project; 2) reset the wires on the breadboad; 3) checked the camera; 4) checked the wires on my TTL comms board. Then if I get the error three times in a row I assume something has changed in my code, maybe an accidental key press or even an intentional change that is incorrect.
Then I check google and github for the details of the error, then I might ask for help. Sometimes it is just a lack of information in a fast changing world; sometimes it is my pure ignorance because I am not a programmer and I do not know the compiler language. I hope I am learning along the way!!
I can’t connect ESP32-CAM to my routers Fritzbox 7390, TL-WR841-dd-wrt or GalaxyS10 Hotspot.
Setting ESP32-CAM to Access Point is ok (Here i can connect and see camera!)
Password: xxxxxxxx
Channel 1, 6 or 11
WPA2(CCMP)
Programming ok, then disconnect flash-cable and press reset
distance to router <2m with internal antenna
Double-checked network credentials
Output Monitor after pushing Reset-Button:
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:9720
ho 0 tail 12 room 4
load:0x40080400,len:6352
entry 0x400806b8
…………………………………………………………………………………………………………………………….
I don’t get an IP-Adress
My Fritzbox-router shows under “unsuccessful login attempts” the correct MAC-Adress from ESP32-CAM-Module
I Resetted the board multiple times
What can i do?
I have solved the problem with the Wifi-connection!
You have to use the code from this web-site here, but not the code in Arduino/File/Examples/ESP32/Camera/CameraWebServer!
So i could connect to my Wifi. After this i tried again Arduino/File/Examples/ESP32/Camera/CameraWebServer and i could also connect!
Now everything works fine. Don’t ask me why…
Hi Horst. Which website are you referring to when you say “You have to use the code from this web-site here”? Where is here? Thanks
I refer to: ESP32-CAM Video Streaming Web Server
https://randomnerdtutorials.com/esp32-cam-video-streaming-web-server-camera-home-assistant/
I cannot get an IP address in the serial monitor.
I have :
1) Checked my TX and RX connections to and from the FTDI to the ESP32-Cam
2) Checked the baud rate as 115200 in the serial Monitor
3) Moved my router within 2 feet of the ESP32-Cam
4) Checked and rechecked my SSID and Password
My router shows that 2.4 and 5 GIG are activated
Can you help me solve this problem ?
Hi.
After uploading the code disconnect GPIO 0 from GND and with the Serial Monitor opened, press the RST button.
Regards,
Sara
I’ve done all that is suggested on section 8 of the Tutorial. Cannot connect.
Tom:
If you tried a simple sketch and still cannot connect then you may have a bad board. If you would like me to look into it, please let me know what you have. Where you got it.
Regards,
I use the following sketch to test any ESP board that I got to make sure I am able to talk with the ESP serially: download and upload before I work with any sketch. This makes sure that the basic communication is working. Hope this helps!
int i;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);Serial.println();
Serial.printnl(“Power UP!”);
}
void loop() {
// put your main code here, to run repeatedly:
serial.print(“Loop: “); Serial.println(i);
delay(1000); i++;
}
My esp32 cam is working both for streaming and snapshots. However, the picture quality is nowhere near as good as I see on this and other tutorials. Some details:
I am using the camerawebserver example included with the library
I’ve tried quality settings in the code from 0 down to 20. Doesnt really help. Camera crashes at a quality setting of about 4.
The camera model is an OV2640-v2.0. AI-thinker
Powered at 5V
Wifi signal is fine. The board is 3 feet away from the wireless router.
I have searched extensively online and I’ve seen only one discussion on this point. The recommendation there (although without resolution) was to take a look at the compression settings in the code, which I don’t see how to change.
Any ideas would be appreciated.
My esp32cam is working just fine using the board setting – AI thinker ESP32-cam. But the video is poor and low fps. Then I found some tips on improving the fps on the internet by using the board setting – ESP32 Wrover Module and and partition scheme : HUGE App(3MB No OTA/1MB SPIFFS), right after I uploaded the sketch I got errors saying
[E][camera.c:1049] camera_probe(): Detected camera not supported.
[E][camera.c:1249] esp_camera_init(): Camera probe failed with error 0x20004
Any solutions? Thanks!
Hello,
For those having the : “esp_camera_fb_get(): Failed to get the frame on time!” error.
Just got it on 2 new cheap Esp32 CAM clone.
I resoldered/reflowed the ESP32-S and CAM connector connections using flux + bit of solder on iron tip and work like a charm now
Please note, there are two different camera types available when you order the esp32cam module either the “landscape” the “portrait” camera is available on the market. The one with: 8225N V2.0 171026 gives the image in the same direction as the text the chip “ESP32-CAM” the one with: TY-OV2 6400V2.0″ gives the image rotated 90 degrees.
Mine has DCX-OV2 640-V2 on the ribbon, don’t know which way round it is yet as I haven’t managed to get an image out yet.
I have the same camera, and I haven’t mange to get an image out either.
Have you found a solution?
Svein
Hi.
Can you better describe your issue?
Regards,
Sara
I have problem #4. When I look at the tools menu, there is no Partition Scheme option. Am I correct that the boards.txt file has to be updated to contain ESP32? What are the options for ESP32? Where do I find the boards.txt file on Windows 10? I have found one in Program Files (x86) > Arduino > hardware > arduino > avr. Is this the right one?
Thank you, I appreciate your help.
Hi.
You need to select ESP32 Wrover Module in the Boards menu to have the partition scheme option.
Regards,
Sara
Hi! I can’t find the ‘Partition scheme’ option in my arduino IDE whenever i select AI THINKER Esp32cam.
Hi.
The partition scheme only shows up if you select “ESP32 Wrover Module”.
Regards,
Sara
Hi,
I´m using the FTD1232 with the ESP32 module, can upload the code without issues. I remove GND and do a reset but do not get any output in the serial monitor (set to 115200 Baud). Rx Tx cabling is correct. Do I have a bad board or are there any tricks/settings to get the serial monitor working?
Thanks in advance.
Hi.
There are no tricks.
After resetting the board, you should get something on the serial monitor.
Regards,
Sara
Tom:
Sarah is right – there are no “tricks”. However, there are steps to troubleshoot problems. Below is step 1.
Before you run the camera sketch, please try the following to make sure the ESP32 can “talk” to your PC.
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println();
Serial.println(“Power Up!”);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.print(“*”);
delay(1000);
}
我的错误是:
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
和
找到无效库在 C:\Program Files (x86)\Arduino\hardware\espressif\esp32\libraries\AzureIoT: no headers files (.h) found in C:\Program Files (x86)\Arduino\hardware\espressif\esp32\libraries\AzureIoT
我找到这个目录,它是空的。
Hi.
Please read bullet number 1.
Regards,
Sara
Hi Martin (and Sara)
It is only almost18 months since you wrote this comment, but I too have found this (ESP and transistor, AND PIR getting hot in my case)
I found that increasing the delay to 10 seconds killed that issue. Clearly a lesser time should also be fine but the coded delay as supplied was too short.
Neither my camera nor ESP nor PIR are faulty (currently)
Hi
Please help me on the below issue. As soon as I upload the sketch and restart by pressing the reset button, after removing the GPIO and ground short (for upload purposes), it throws the below error continuously and doesn’t go beyond this forever.
00:11:26.474 -> rst:0x3 (SW_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)
00:11:26.474 -> configsip: 0, SPIWP:0xee
00:11:26.474 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
00:11:26.520 -> mode:DIO, clock div:1
00:11:26.520 -> load:0x3fff0018,len:4
00:11:26.520 -> load:0x3fff001c,len:1216
00:11:26.520 -> ho 0 tail 12 room 4
00:11:26.520 -> load:0x40078000,len:9720
00:11:26.520 -> ho 0 tail 12 room 4
00:11:26.520 -> load:0x40080400,len:6352
00:11:26.520 -> entry 0x400806b8
00:11:26.520 -> ets Jun 8 2016 00:22:57
Hi.
That means that is some sort of hardware problem.
Check bullets 1, 2 and 3.
Regards,
Sara
Hi,
I’m having trouble while the ESP32-CAM is connected only to the power supply. It doesn’t connect to the Wifi network and I’m not able to open the web server of it and it doesn’t show in the IP scanner. With FTDI (serial monitor) and power from it, it works fine.
The power supply is powerful enough and it shows current draw around 170 mA.
Any ideas what can be wrong?
Hi.
After powering the board, press the RST button.
Regards,
Sara
psramFound() is returning false, but I can see the pSRAM chip on my board.
I have tried two board, both chips are labeled ESP32-S and are suppose to be AI Thinker modules. Almost everything else seems to work, I just can’t get the pSRAM to work.
On the brownout issue. For programming the 3V setting on the ftdi with 3V power connections to ESP worked best. Running the ESP32CAM on 3V gave the brownout error. Running on 5v connection(jumper move on FTDI) eliminates the brownout error.
My take, programming requires no WiFi power. Wifi power consumption on my board may not be to spec. (very in-expensive board)
i had terrible brownout issues. struggled for days – tried everything on the forums.
Solution – just connect the desktop power to the esp32-cam and all my troubles disapeared.
seems the esp32-cam runs so close to the 5v power limit, that 5v from a desktop power supply is required when connected to the computer’s usb port. not quite enough power and that makes all the difference.
Project all works fine – much better with a good external antenna and separate PSU.
However, the video stream to the web page on the stated IP address stops after about 5 minutes and I have to reload the web page and restart the camera stream. Any ideas what might be causing this?
This is my first ESP32, I choose this ESP32-CAM-MB because it seems to be easy to start.
But, I am getting the message
“Leaving…
Hard resetting via RTS pin…”
At the end of upload.
There is a RST button on the esp32-cam, and the same RST button on the esp32-cam-mb. There is a second button on the esp32-cam-mb named IO0.
FULL LOG:
esptool.py v2.6
Serial port COM6
Connecting……
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC: ac:67:b2:38:ca:14
Uploading stub…
Running stub…
Stub running…
Changing baud rate to 460800
Changed.
Configuring flash size…
Auto-detected Flash size: 4MB
Compressed 8192 bytes to 47…
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 16384.2 kbit/s)…
Hash of data verified.
Compressed 17392 bytes to 11186…
Wrote 17392 bytes (11186 compressed) at 0x00001000 in 0.3 seconds (effective 547.8 kbit/s)…
Hash of data verified.
Compressed 259248 bytes to 121846…
Wrote 259248 bytes (121846 compressed) at 0x00010000 in 3.0 seconds (effective 690.6 kbit/s)…
Hash of data verified.
Compressed 3072 bytes to 119…
Wrote 3072 bytes (119 compressed) at 0x00008000 in 0.0 seconds (effective 4915.3 kbit/s)…
Hash of data verified.
Leaving…
Hard resetting via RTS pin…
=============================
Is there a way to fix this ?
Thanks,
Carlos
Hi.
The “Hard resetting via RST pin” is a normal message that you get after a code is uploaded successfully.
After that message, you just need to press the on-board RST button so that the board starts running the program.
Regards,
Sara
Hi Sara,
Yes, you are right. The upload was ok. I just realize that I can monitor the serial comunication to see the controler messages.
Thanks a lot.
Hello,
I am using a esp32-S cam board connected to a Arduino Uno. I do not have a FTDI. I am trying to upload CameraWebServer example code. If I press “RST” button as soon as click on “Upload” button.. I am seeing following error.
/Users/konduru/Library/Arduino15/packages/esp32/tools/esptool_py/3.0.0/esptool –chip esp32 –port /dev/cu.usbmodem2201 –baud 460800 –before default_reset –after hard_reset write_flash -z –flash_mode dio –flash_freq 40m –flash_size detect 0xe000 /Users/konduru/Library/Arduino15/packages/esp32/hardware/esp32/1.0.5/tools/partitions/boot_app0.bin 0x1000 /Users/konduru/Library/Arduino15/packages/esp32/hardware/esp32/1.0.5/tools/sdk/bin/bootloader_qio_40m.bin 0x10000 /var/folders/bx/hn5m2c3x1kj5r4z74tf94y5m0000gn/T/arduino_build_419447/CameraWebServer1.ino.bin 0x8000 /var/folders/bx/hn5m2c3x1kj5r4z74tf94y5m0000gn/T/arduino_build_419447/CameraWebServer1.ino.partitions.bin
esptool.py v3.0-dev
Serial port /dev/cu.usbmodem2201
Connecting…..Traceback (most recent call last):
File “esptool.py”, line 3969, in
File “esptool.py”, line 3962, in _main
File “esptool.py”, line 3552, in main
File “esptool.py”, line 519, in connect
File “esptool.py”, line 499, in _connect_attempt
File “esptool.py”, line 438, in sync
File “esptool.py”, line 386, in command
File “esptool.py”, line 331, in read
File “esptool.py”, line 2632, in slip_reader
File “serial/serialposix.py”, line 501, in read
serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
Failed to execute script esptool
An error occurred while uploading the sketch
Hi everyone !
I can upload the code, I solved all the problems with the troubleshotting done by Randomnerdtutorials. The website is great!
But esp32-cam keeps crashing. I turn it off and on again and it works again. I have seen some saying that I would decide to put an electrolytic capacitor in the DC 5v supply. I put it on and it continued to generate the same problem. I really don’t know what else to do.
If someone there managed to solve the problem, please tell me what was done!
Thank you all !
Hi, it seems to be a dirty the electric contact with the 5v and GND pin’s. Try to inforce it or sorder it.
Hi!
I cleaned the contacts. I re-soldered the wires. It didn’t. I will buy 2 more cards and see if this same defect happens to them. Thanks for the answer.
Hello,
I have a SP32cam AI Thinker and I have programmed with the software ESP32-CAM_MJPEG2SD from github.
It should provide a setup with a static IP/address. It did not.
I´ve tried several changes until I decided to choose the setup from this https://randomnerdtutorials.com/esp32-cam-static-fixed-ip-address-arduino/ site and it works well.
That aside, the camera allways powered up and loaded the code, until now.
I fail to see where the code for a static IP/address can influence the boot process.
I got even back to the original code to control that possiblity but with the same result, no boot.
It is vital that by applying power, the camera starts.
Why is it that until now the camera allways has start and all of a sudden no more.
Pressing the reset switch on the cameraboard let it boot, but that is not a practical solution for obvious reasons. One of the pins should activate a reset but pin -1 (minus 1). But I see no pin -1.
So, connecting a switch between pin -1 and 0V is troublesome for there is no hardwired one.
What can I do?
I can confirm getting “Brownout detector was triggered” when using FT232RL in 3.3V to the 3.3V pin on the ESP32-CAM. Setting jumper to 5V and connecting VCC to 5V pin fixed it.
Used 3.3V for programming because i was warned not to put 5V on RX, so in my case programming worked ok on 3.3V power+rx.
hi Sara,
i’m beginner in Arduino, but i try to made one thermometer (DS18B20 ) using ESP32-CAM and display on the OLED (0.96″ I2C IIC Serial 128*64). I don’t find one example for this. where i connect SDA and SLA? on the serial monitor work.
Hi.
You can connect the SDA and SCL to any available pins that are not being used yet by other peripherals.
Then, you must specify the pins you are using in the code. It may be useful to take a look at this tutorial about I2C: https://randomnerdtutorials.com/esp32-i2c-communication-arduino-ide/
Regards,
Sara
thk . will try.
Hi
I ve an issue that is not reflected in the guide. I am using the ai-thinker cam with arduino nano as programmer. If I do everything as the guide says, the serial monitor takes forever to give an IP. It’s all dots. But i know that the wifi funcitions are working, since the soft AP mode works perfectly.
How can I solve it? and is there any way to connect openCV in python to a softAP?
Hi.
Usually, when you receive a lot of dots on the debugging window it is one of the following issues:
– wrong SSID/password;
– weak wi-fi signal: the ESP32 can’t get wi-fi signal from your network;
Regards,
Sara
Hello,
For wifi communications, or lack thereof, check the 0 ohm resister on the back side of the board by the brass/copper connector. If you’re using the built in wifi antenna, the resistor has to be “this way” and if you’re using the external antenna, it has to be “that way”. See this link, https://randomnerdtutorials.com/esp32-cam-connect-external-antenna/
That is if the coding, SSID/password are all correct.
Eric
Dang good idea.. I have however got my little toy working well now.. But your idea is a good one and I will remember that.. thanks brother for your advice.. I am just learning electronics and at almost 70 it is a lot harder then when I was 20.. But we were still riding carts and banging rocks together..😏
Hey guys
No matter what I do I keep getting: “time out waiting for packet header” While I am trying to get my 32 cam working.. I have tried arduinos one FTDI board. three different esp32 cams changed wires 3.3 & 5 vdc tries.. It is all wired good but no dice. I see where you say you have tried to recreate some of these faults but couldn’t.. I am willing to pack up this whole mess arduino, wires esp32 cam and send it off to you.. all wired like I have it now for you to play with if your interested.. I have my arduino IDE update with the correct library and sketch. If you write to my email address I can copy and paste the sketch but it is the downloaded one with the change in the camera and my wifi name and password changed.. I just do not know what to do about this silly thing.. Now you must understand that I turn 70 this year so it maybe that I just do not “see” something simple.. but as many times as I have been over this. Plus the many days I have left it set to go back with a clear mind.. I just can’t get it right.. Love you site by the way.. let me know if you want this thing and where to send it.. thanks for all your help on this site..
Hi George.
You are probably doing something wrong with the wiring or selecting the board… It is very unlikely that all boards are faulty.
We already have plenty of ESP32-CAM boards. I’m sure any other people will benefit more from your offer. But, thanks anyway.
Regards,
Sara
Yeah that is what I thought at first.. But I have been over it about 15 different times from 4 or 5 different sites.. and the set up is always the same the only difference is weather I use 5 or 3.3 vdc..So I do not think that is the problem.. I mean all you have is text and receive ground and voltage then ground out gpio 0 pin and that is it.. Not to difficult.. Thanks a lot for trying to help Sara.. it could be anything so let me know if something else pops to mind.
I also push the reset button on the esp32 cam before the program downloads My next move I think might be to use my 357 wrench on it.. thanks again for your help..
G,
Not sure where you’re seeing the “packet header” message. Did you try the ESP32-Cam example? What I found out is that I can only “access” the streaming video from one device. I had a web browser on my laptop connected to the ESP32-Cam on port 80 and tried to connect my iPhone to port 81. It did not work until I closed the browser on the laptop. I am new to this stuff also so I am sure it is something simple. The board I selected is AI Thinker ESP32-CAM and the line in the code is #define CAMERA_MODEL_AI_THINKER
Eric. I figured it out.. or should I say it started to work for mt. I think it might have been some defective wires I was using.. But got it loaded then it went into brownout but once I changed from 3.3 to 5 vdc it all worked fine… But these little sucker seem to run hot.. I wanted to set up a small backyard wildlife camera set up.. But I think these will over heat after a while and I need to figure out how to turn the power on and off remotely. and ideas my brother? thanks for you help..
Good morning! I’m new to this also so I may be wrong, I believe that the WiFi chip does run very warm if it’s running 24×7. Some ideas off the top of my head is to put it into deep sleep at night because the cam isn’t infrared. Use a PIR sensor to turn on WiFi when it detects motion. Or a RCWL 0516 microwave Doppler radar module. I don’t know how sensitive those are with small animals so it may not work. If it’s a bird feeder or something, a HC-SRO4 ultrasonic module might work. As far as turning power on and off, I’m not sure but I think LORA (Long Range) and light/deep sleep feature would do the trick as far as power consumption. LORA can be used to wake it up. If you want to turn WiFi on remotely, try the LORA ESP32’s. Videos and Pictures do not go over LORA very well so you’ll need WiFi. You could have LORA send you or Node-Red a message and you/Node-Red can send WiFi activation command or something. Might miss out on some of the image capture while WiFi is staring up though.
Hi,
I made the project: ESP32-CAM PIR Motion Detector with Photo Capture (saves to microSD card). Working well, but sometimes freezing with the following errors:
[E][camera.c:1113] camera_probe(): Detected camera not supported.
[E][camera.c:1379] esp_camera_init(): Camera probe failed with error 0x20004
Only reset can help and works well till the next same error.
Can somebody help me?
Many Thanks!
Hi guys,
Firstly, I would like to thank you for your tutorials and help.
My esp32cam is working just fine using your example – it is an AI thinker module ESP32-cam.
That meaning i get a stream on my firefox web browser. During this time the serial port in my arduino IDE reports the mjpg stream and everything looks good.
However after 3-8 minutes streaming stops for no apparent reason, both in the IDE serial port and web browser (with a broken frame). At the beginning I thought that this could be a wifi issue but it isn’t as the esp is still connected (just in case i added some code for wifi re connection in the loop). Also I have added mqtt functionality.
Is there an explanation for this behavior or any suggestions as to what to look for? Thanks!
I think that this erratic behavior was due to overheating. I rewired the setup, took it out of the breadboard and now it works for 2-3 hours without interruption. Now I will have to find a way to cool it down, especially if I put it in an enclosure.
Hi everyone
ESP32 CAM with ft232rl converter here is my test code
void setup() {
Serial.begin(115200);
Serial.println(“Test”);}
void loop () {
Serial.println(“loop is here”);
delay(500);}
Problem is void setup function codes are not working………
Serial monitor only show “loop is here”
I tried esp32dev ,esp32wrover,Al thinker cam modules nothing changed 🙁
Hi.
When you say it is not working, what happens?
Regards,
Sara
I ordered 2 of these modules and could not get them programmed: time-out.
The solution in my case was use a separate 5V1A supply connected to the 5V pin and the ground next to it, connect IO0 to the ground next to the 5Vpin (via a small breadboard) and connect the ground from the FT232 to the ground pin next to the IO0, not use the GND pin next to UOT.
I hope this might be of help to someone.
I had the same problem and solved this as follows:
– use a powered usb hub to connect your FTDI set at 3.3 V
– power your esp32-cam from a separate power source, I used a breadboard power adapter and select also 3.3V
– interconnect the negative rail from both supplies
After this setup I was able to upload the demo sketch.
Of course make sure your wiring is correct and you have installed your FTDI driver and using the correct COM port.
Hope this helps
Problem: Timed out waiting for packet header!!
I own several ESP32 cams and they all work fine.
I only have problems with one CAM when I want to upload a sketch on the cam. I use an FTDI and the GND-GPIO connection as described above. I followed the instructions above step by step. Nothing makes the board save the program. I also checked the tension. Everything OK. I’ve also used an MB Borad. Does not work too.
Is there anything else I can try? Maybe a specific program?
Many greetings, ULLI
Hi.
When you start to see these dots on the debugging window as shown below, press the ESP32-CAM on-board RST button. Did you tried this?
As for the MB programmer, you can try this:“Try holding the IO0 button on the programmer when you start seeing the dots on the debugging window and then press and release the ESP32-CAM on-board RESET button (not the programmer RST button).”
I hope this helps.
Regards,
Sara
Hi Sara,
I now have some ESP32 cams. Only one of them causes trouble. I’ve already tried all of your tips from the Troubleshooting guide. The cam does not want to load a sketch. Neither with MB nor with the FTDI.
I can’t find anything optically when I compare two examples. I have already selected other boards in the settings. Without success.
Many greetings Ulli
Hello,
Your website is superbe.
Currently, I am making a weather station with ESP32-Cam and PIC microcontroller.
Weirdly, when I mount the SD card module, the wifi stops working.
Everything works fine until I mount the module.
I don’t know why. I tried with another ESP, but it behaves the same.
I searched a lot on the internet, but I can’t find any example using wifi, camera and SD card all at the same time.
Is it normal we can’t use wifi and SD card on ESP32-cam at the same time?
Many thanks.
Min
Hi.
You should be able to use the SD card with Wi-Fi.
We created projects that use the SD card, Wi-Fi, and the camera simultaneously.
Maybe there’s something wrong with your code?
Regards,
Sara
Hi (Thanks for all tutorials and help about this board !!!)
i have bought 2 esp32 cam modules from one vendor and 5 other with MICRO USB ESP32 Serial to WiFi ESP32 CAM Development Board CH340G from an other vendor
The 2 from the first vendor i could upload the web server cam code (with static ip) with FTDI adapter and with the MICRO USB ESP32 Serial to WiFi ESP32 CAM Development Board CH340G (tried both options). After that i could use them without any problem just power them with a mobile phone charger (5v) to the gnd and 5v pin. every each time i was powering them off and then power them on they connected fine.
The 5 of the second vendor that come with the usb esp32 development board i could upload the program very easy. but when i connect them to program them with FTDI , cant see them. (try it with 3v and 5v pins)
After i have program them with the usb module if i try to power them with with GND and 5v pins nothing happend..can log in to webserver cam.
if i connect them back to usb module and power them through usb – pc they are working fine each time i connect/disconnect them.
if i power them through usb module but connect usb to mobile power charger then some times in order to make them work have to press reset button
any suggestions?
i have measured the AMS1117 regulator :
(one probe of multi-meter to GND pin of the board and the other to regulator output) and gives 3.8v dc
if i measure regulators input voltage shows = 5.01 v dc
(one probe of multi-meter to regulators GND and the other to regulator output) and gives 3.3v dc
if i measure regulators input voltage shows = 4.5 v dc
Ok i find the solution.
To the boards that seem not working properly i had to power them (both GND and 5v) to one side (where the 5v pin input and Gnd pin are next to each other)
i used to have connected the GND always to the side where is the 3v pin.
for some reason to these specific boards from the second vendor working only this way.
Howdy every one. Thanks to the Santo’s for their fine contributions. I recently started playing with the ESP32-CAM and was having difficulty pressing the reset button when plugged into a 830 point solderless breadboard. The solution turned out to be, first install two 8 pin female tall headers on the breadboard where the ESP32-CAM is going to go, then install the cam module.
Now I can easily press the reset button with my index finger. Of course, mount the module at the very end of the breadboard strip. Have fun !
Parts: ebay search for “8 Pin 2.54 mm Stackable Long Legs Femal Header For Arduino Shield”
Thanks for the tip 🙂
Hello, I don’t get my ESP32-cam up and running in Home-Assistant ESP-Home. It works in a browser when I put in the IP-adres but not in Home Assistant. What I’m donig wrong.
Hi.
You can only have one web browser window opened with the ESP32-CAM streaming.
Close all windows that have a connection to the ESP32-CAM IP address.
Then, go back to home assistant to check if the problem is fixed.
Regards,
Sara
Hello!!
I’m still having trouble with opening the web server. I have copied and pasted the IP address but still nothing shows up.
Maram
Hi.
Do you get any errors?
Regards,
Sara
Hi Thanks for your tutorials – they are brilliant!
I have deployed a couple of AI Thinker ESP32CAM’s doing nothing more than web cam/server with a static IP address and low res (VGA – just need them for monitoring a laser cutter) as per your tutorials – however after a few days they stop working – unresponsive in a browser – I get error “This site can’t be reached” – “ERR_CONNECTION_TIMED_OUT”.
How do I debug them? Is there a way of logging info – as i cannot replicate the issue when connected to my laptop – so need to leave them running.
Any suggestions would be much appreciated.
Thanks
Tim
Just a guess but you could be getting fragmentation of your heap after a few days so that the camera cannot malloc enough memory when attempting to take a picture. The solution might be to implement a watchdog timer that is continually reset/fed in your loop(). If the ESP32 runs out of memory and freezes the watchdog will no longer be getting fed and eventually it will time out and reboot the device.
Hello everyone,
Concerning the ESP32 CAM (DM-ESP32 S version) I get an error:
“E (25829) wifi:AP has neither DSSS parameter nor HT Information, drop it”
when launching the Web server program. The “scanner” sketch works perfectly, but returns this error on only one server. Do you have any idea about this error?
Thank you in advance for your help.
Hi,
thanks a lot for the sample code. I have 2 cameras, both do work in principle, capturing stills usually has a decent quality, but no matter the setting nor the video resolution, there seem to be colored horizontal lines across the image deteriorating the image quality. However, these appear on both cameras. I use 5V, measured during operation 4.6V on the pin. The sample images I find on the web look better than mine. Any ideas? Thanks a lot!
Best regards,
Alex
I have tested 3 and they all give a decent picture so you might have been unlucky with poor hardware. NB If you want a better picture you could try getting an OV3660 camera module that appears to be compatible with ESP32-CAM. It should just connect in place of the usual OV2640. There is already specific provision in the example webserver code to detect it. There is an Aliexpress vendor selling them for just over £5 at present. I have 4 on order.
Correction. I’m getting horizontal lines on my cameras but only in low light conditions. If the subject is adequately lit the image quality is ok.
I’ve just spent hours battling the following error when I try to upload code to my ESP32-CAM:
esptool.py v3.0-dev
Serial port COM5
Traceback (most recent call last):
File “esptool.py”, line 3682, in
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 62, in open
serial.serialutil.SerialException: could not open port ‘COM5’: WindowsError(5, ‘Access is denied.’)
Failed to execute script esptool
the selected serial port Failed to execute script esptool
does not exist or your board is not connected
Eventually I installed a Serial Port Monitor from https://serial-port-monitor.org which showed that my MalwareBytes Antimalware was interfering when esptool tried to open the COM port. If I disable Ransomware Protection in MBAM it all works just fine. You may not be using MBAM but the Serial Port Monitor will show what other app may be unexpectedly using your ESP32 COM port.
Hola, descargue el programa pero no estoy sabiendo usarlo. Sabrias de algun tutorial que explique como detectar este problema en particular?
Hi.
can you better describe your issue?
Regards,
Sara
If it helps here is a link to my discussion on the Malwarebytes forum where they acknowledge it is a problem with MBAM:
https://forums.malwarebytes.com/topic/282576-esptool_py-from-the-esp32-arduino-toolset-being-blocked/
I used Serial Port Monitor to run a trace while attempting to download to an ESP32 with Ransomware both switched on and switched off. The traces show the difference. I didn’t have any difficulty using SPM: choose Session | Start Session and then select the appropriate COM port.
Dear Sara,
I found the reason for below issue.
1. Failed to connect to ESP32: Timed out waiting for packet header
In order to solve this issue, you have to use the GND pin next to the 5V supply pin of the ESP32 CAM module when connecting to the FTDI Programmer. Using this method, it does not even required to press the RST button when uploading the sketch to the board. It will upload the code automatically when clicking UPLOAD button of the Arduino IDE.
Hello! Thanks for the detailed instructions for the controller! I have ESP32-Cam + USB-UART based on PL2303HX. And I could get it flashed on my old Macbook with USB2.0, and I have no success on the new Macbook M1 with Type C + type C to USB converter. The serial communication is working, I can see the output from the controller in the Serial Monitor. It even looks like that it’s connected during the flashing process (see Arduino’s output below), but doesn’t flash.
Connecting…..
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
WARNING: Detected crystal freq 41.01MHz is quite different to normalized freq 40MHz. Unsupported crystal in use?
Crystal is 40MHz
MAC: 8c:aa:b5:86:4f:30
Uploading stub…
Running stub…
Stub running…
Changing baud rate to 460800
Changed.
Configuring flash size…
A fatal error occurred: Timed out waiting for packet header
A fatal error occurred: Timed out waiting for packet header
Hi guys
I have been trying to get my ESPCam working, I have followed your instructions and the boards flashers perfectly, when opening the serial window it shows me the website address to goto, I enter this into the browser ( I have tried chrome, firefox and Edge ) the controls come up and when I hit still it shows that a picture is taken in the serial window the same as when I hit stream it shows in the serial window requests but no pictures will show on the screen, just a black screen with a very small square. Please see screen shot, using windows 10, chrome, firefox, edge, esp32 A1 Thinker board, Arduino windows store 1.8.57.0
(sorry cant seem to atach a screenshot )
Cheers
Dave
Hi.
Make sure the ESP32-CAM has a good wi-fi signal.
Also double-check if it needs an external antenna – read that in the troubleshooting guide. Some boards come configured to use the external antenna, in that case, the wi-fi signal will be extremely low without the antenna, and it won’t be able to stream video or display a picture.
Check that you’re powering the ESP32-CAM properly.
Regards,
Sara
Hi Sara,
Thanks for the quick reply, I have checked the wifi and the Antenna is set up for internal with a good signal. I have powered this via a USB as well as 5V from my bench supply. The unit flashed no problem and I could update OTA as well, I just get no picture either still or streaming on any browser ( firefox, chrome, Edge ) nor on the two networks I have tried this with.
I am thinking it could be a faulty board, I have ordered another couple of boards to try and see if this will fix the situation.
I get the web server site and controls but when I try to stream or take a still I just get a little square box in the upper left by the controls, nothing more.
Thanks for the great sites, I will try re-flashing the code onto the new board when they arrive.
Cheers
Dave
Hi Rui,
I have an ESP32-CAM that stops working after 1 to 3 days of operation. The error I get is:
This page isn’t working
192.168.1.228 didn’t send any data
ERR_EMPTY_RESPONSE
I’m using the example code with all the camera controls.
Cycling the power restores operation for a few more days, then it fails again.
Do I need to add timeout code?
Thanks
Mike
I have an ESP-12K (8) Ai Thinker, I want to use the same system as the ESP32-CAM because the one I have has an OTG connection through the pins and I can use several USB cameras, the way I want it: endoscopic. Stream via local IP.
It seems a simple task, but as I haven’t found anyone with programming knowledge to help with a Sketch for this purpose for the ESP-12K board (8), I humbly ask for your help.
I have the ESP32-CAM with OV2640 Camera.
I can flash (using with 5V or 3.3V, same result) without problems, however I’m not sure which camera model I should select.
When I use the CAMERA_MODEL_AI_THINKER and use an external power of 5V, the camera gets really hot after a few seconds.
Any thoughts on this?
Hi.
That’s the right camera.
Depending on the sketch you’re running, the camera might get hot.
For example, if you’re continuously streaming…
Regards,
Sara
Hello,
i’m french, excuse me for my English.
I use platformio vscode, spiffs…
I would like to have my html page in an uncompressed data directory (index_Cam.html) and not in the “camera_index.h” file
what should I modify in the “app_httpd.cpp” file?
My ESP32 CAM from https://shopee.com.my/ESP32-CAM-ESP-32S-WiFi-Module-ESP32-serial-to-WiFi-ESP32-CAM-Development-Board-5V-Bluetooth-with-OV2640-Camera-Module-i.251321623.6532740387
DCX-OV2640-V2 is written on the camera ribbon cable.
i tried to run the camerawebserver sample code while the ESP32 CAM is connected to ESP32 CAM MB. The second method is through arduino UNO, the third method is also through arduino UNO but with MB102 as power supply. i have tried supplying 5V or 3.3V to either from arduino or the MB102. All the method I tried doesn’t work.
As for the program, I have uncomment #define CAMERA_MODEL_AI_THINKER. Tools setting, I tried ESP32 Dev Module, ESP32 Wrover Module and AI Thinker ES32-CAM. and the partition scheme is Huge APP (3MB No OTA/1MB SPIFFS).
The error code i got from serial monitor when ESP32 Wrover Module or AI Thinker ES32-CAM is selected as the board in the tools setting.
E (79) psram: PSRAM ID read error: 0xffffffff
[E][sccb.c:115] SCCB_Write(): SCCB_Write Failed addr:0x30, reg:0x2e, data:0xdf, ret:-1
[E][sccb.c:115] SCCB_Write(): SCCB_Write Failed addr:0x30, reg:0x44, data:0x0c, ret:-1
[E][sccb.c:115] SCCB_Write(): SCCB_Write Failed addr:0x30, reg:0x05, data:0x01, ret:-1
[E][camera.c:1344] camera_init(): Failed to set frame size
[E][camera.c:1406] esp_camera_init(): Camera init failed with error 0x20002
The error code i got from serial monitor when ESP32 Dev Module is selected as the board in the tools setting.
[E][sccb.c:115] SCCB_Write(): SCCB_Write Failed addr:0x30, reg:0x2e, data:0xdf, ret:-1
[E][sccb.c:115] SCCB_Write(): SCCB_Write Failed addr:0x30, reg:0x44, data:0x0c, ret:-1
[E][sccb.c:115] SCCB_Write(): SCCB_Write Failed addr:0x30, reg:0x05, data:0x01, ret:-1
[E][camera.c:1344] camera_init(): Failed to set frame size
[E][camera.c:1406] esp_camera_init(): Camera init failed with error 0x20002
Hi, I just tested ESP32-CAM following instruction from some pages. Everything went OK, just Stream doesn’t started. I suppose due to this error “E (324) psram: PSRAM ID read error: 0xffffffff”.
I am using AI Thinker ES32-CAM and also board in IDE was set to this board.
When I changed board in IDE from AI Thinker ES32-CAM to ESP32 DEV Module error disappear and stream started to work.
Hello, i am Riemer,
i have some troubles with programming my esp32 cam board. I used the recommended connections to the FT232RL board and flashing failed.
I find out that the ground-pin beside the UOT pin is not really GND !! there is a resistant of 7k Ohms between that pin and the other ground pins on the board.
i do not know what the reason is for that.
I have two boards with the same issue.
I moved the that ground wire from the FT232RL board to the ground-pin near the 5V power pin and the programming succeeds. The board was powered with an external 5V and the RX and TX signals are 3V set by the jumper on the FT232RL board.
I finally got it to stream video. However, I cannot get face detection to work. It never draws the box around a face. I tried the using enroll face, but that did not seem to do anything. Should it detect a face before the training? Is there something that needs to be setup separately?
Hi.
Face detection should work automatically.
For face recognition, you should enroll a face first.
Make sure your board is being powered properly and that it is relatively close to your router.
Regards,
Sara
Hello Sara.
I can’t activate facial recognition. When I click register face nothing happens. when I put myself in front of the camera nothing happens either.
could you tell me how this works? thanks
Hi.
What version of the ESP32 boards’ installation are you using?~Boards > Boards Manager, search for ESP32 and check the version.
I found that some more recent versions have issues with that example.
Hi I have done everything in order and my cam works fine but after turning the cam on the psram starts to overheat. Is it normal or something went wrong?
Hey hi…can anyone help me out… I’m not getting anything displayed on the serial monitor… it’s empty…n no ip address is coming….how to resolve this problem??…
Please suggest me for my mini project.
Hi.
Did you press the RST button after uploading the code?
Did you insert the right network credentials?
Does the ESP32 have a good wi-fi strength? Make sure your board is relatively close to your router.
Regards,
Sara
Ai-Thinker ESP32-CAM brown out issues facebook.com/rodyeo/posts/10159410752322663
Cause of the problem due to low rated tantalum capacitor on old version using 100A as opposed to 107A revised new version Ai-Thinker ESP32-CAM board
facebook.com/rodyeo/posts/10159410966187663
Ai-Thinker ESP32-CAM horizontal lines issues https://www.facebook.com/rodyeo/posts/10159410966187663
and brown out issues.
facebook.com/rodyeo/posts/10159410752322663
Arduino: 1.8.19 (Mac OS X), Board: “ESP32 Wrover Module, Huge APP (3MB No OTA/1MB SPIFFS), QIO, 80MHz, 115200, None”
Sketch uses 219425 bytes (6%) of program storage space. Maximum is 3145728 bytes.
Global variables use 16080 bytes (4%) of dynamic memory, leaving 311600 bytes for local variables. Maximum is 327680 bytes.
esptool.py v3.3
Serial port /dev/cu.usbserial-A50285BI
Connecting……………………………….An error occurred while uploading the sketch
.
A fatal error occurred: Failed to connect to ESP32: No serial data received.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
can you please help me. I checked my connections . I downloaded the drivers on both mac and windows and I still get this error.
I’m hitting the same problem.
I’ve programmed plenty of ESP8266 devices using the same method but these ESP32s are not behaving.
I am using an Arduino mega as a passthrough for the FTDI interfacea nd get no love.
What I find interesting is that the AIThinker-ESP32 CAM board, when selected doesn’t allow me to specify a port speed.
The tutorials say to set the port speed to 115200, but the baud rate set by the driver itself seems to be 460800, and there’s no way to change it without modifying the configuration of the actual driver.
The connections on my side are fine, I’ve got all the wires in the right places, I’m pressing the reset button when needed, but the ESP32 never established a serial connection.
Arduino: 1.8.19 (Mac OS X), Board: “ESP32 Wrover Module, Huge APP (3MB No OTA/1MB SPIFFS), QIO, 80MHz, 115200, None”
Sketch uses 219425 bytes (6%) of program storage space. Maximum is 3145728 bytes.
Global variables use 16080 bytes (4%) of dynamic memory, leaving 311600 bytes for local variables. Maximum is 327680 bytes.
esptool.py v3.3
Serial port /dev/cu.usbserial-A50285BI
Connecting……………………………….An error occurred while uploading the sketch
.
A fatal error occurred: Failed to connect to ESP32: No serial data received.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.
Hi.
Please check the ESP32-CAM troubleshooting guide: https://randomnerdtutorials.com/esp32-cam-troubleshooting-guide/
Regards,
Sara
Hi, can anyone help me out … I have done everything in order and I’m getting this in loop :
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1184
load:0x40078000,len:12812
load:0x40080400,len:3032
entry 0x400805e4
The board seems to loop reset. After some research, some suggested the power was not enough, some suggested changing the IDE flash mode from QIO to DIO. I tried everything but it didn’t work. Can you help me please ?
Hi.
What code were you trying to run on the ESP32-CAM?
Regards,
Sara
Hi.
Thanks for your quick response
I tried both :
– The code in File->Examples->…->CameraWebServer
– and the code on this page : Setting ESP32-CAM as Access Point (AP)
and the result was the same
Hi.
I tried both :
– The code in File->Examples->…->CameraWebServer
– and the code on this page : Setting ESP32-CAM as Access Point (AP)
and the result was the same
sketch\app_httpd.cpp.o:(.bss.stream_httpd+0x0): multiple definition of
stream_httpd'
startCameraServer()’:sketch\ESP32CAM_Car.ino.cpp.o:(.bss.stream_httpd+0x0): first defined here
sketch\app_httpd.cpp.o: In function
app_httpd.cpp:(.text._Z17startCameraServerv+0x0): multiple definition of `startCameraServer()’
sketch\ESP32CAM_Car.ino.cpp.o:ESP32CAM_Car.ino.cpp:(.text._Z17startCameraServerv+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
Multiple libraries were found for “WiFi.h”
Used: C:\Users\Mohini Chavan\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\WiFi
Not used: C:\New folder\Arduino\libraries\WiFi
exit status 1
Error compiling for board ESP32 Wrover Module.
I am getting this error ca any one help mi out
What’s the ESP32 boards version you have installed?
Hi I need,
My problem is that I can take photos, but the streaming only works sometimes. I tried changing devices, on three differents phones and on a computer, but on the computer it works sometimes and on mobiles only works if before it had work on the computer so I dont understand what is happening. Please the last two times I try it do not work on computer :(.
Don’t see anyone having this problem but here it is, I have a ESP32-CAM board connected to a MB board that supplies boot/reset buttons and USB support. I ran the Web Server example and it worked perfectly. When I run the example that writes to SD card. Everything seems to work but the image on the card is very very dark. At first I didn’t think it was a picture until I made out the reflection off my glasses. I looked at pin definitions and didn’t see a difference. Running off USB power could this be a problem?
Hello. The app has grayed out my port selector thing but my esp cam is plugged in!
Hi.
You may need to install the USB port drivers.
Go to this article: https://randomnerdtutorials.com/esp32-troubleshooting-guide/
Go to the section “6. COM Port not found/not available”. And see if that helps.
Regards,
Sara
Everything works fine until I try to paste the IP address to open the web server. The web server doesn’t show up and the browser page says, “The connection has timed out. The server at 192.168.0.101 is taking too long to respond.” Please help.
Hi.
What web server project are you trying to follow?
Regards,
Sara
Sara,
The OP didn’t respond, but I’m stuck at the same point, and I will respond if you answer.
I’ve been working through ESP32_CAM_Projects_eBook_V1_3.pdf, Unit 3 Camera Web Server.
I get as far as page 55: “Camera Ready! Use ‘http://xx.xx.xx.xx’ to connect”
When I enter the actual displayed IP address into a browser address bar, the connection times out and I get an unable to connect message.
So far I have tried Raspbery Pi 4 with RPi OS and a laptop with Windows 11, on Firefox and Chromium browsers. I have set the browsers not to force https.
I’m at a loss as to what to do next to figure out where I’m stuck. The board? A browser setting? The wifi router? Something else?
Any suggestions on the next step?
Thanks.
Hi.
Are your browsers on the same network that the eSP32-CAM?
Does the ESP32-CAM have a good wi-fi connection? It seems an issue with the Wi-Fi connection.
Can you run the WiFiScan sketch that in the the Arduino IDE examples on your board and see if the board can “see” your network and how strong it is…
Regards,
Sara
The RPi and Windows 11 laptop are on the same subnet. Wifi signal is strong. I’ve tried another test. Pinging the ESP32-CAM board from my wifi router UI gets responses with good ping times, while trying to ping from my laptop gives “Destination host unreachable”. I think that means that my router is blocking the connection, so the next step I’ll take is figuring out which rule is doing that.
To make sure this is clear, the RPi and Windows 11 laptop are on the same subnet as the ESP32-CAM board.
I set up the ESP32-CAM as access point per
https://randomnerdtutorials.com/esp32-cam-access-point-ap-web-server/.
After uploading the modified CameraWebServer code and copying the IP address into a browser per those instructions, I am able to view the server page and start streaming, so it does look like the board and wifi signal are OK, and the problem I have to solve is that my wifi router is blocking the connection.
Hi.
Yes, indeed. It seems something related to your router/network…
If you find out what it is, please share it here.
Regards,
Sara
Making progress. I am able to access the server and see the stream in some cases, not in others. Definitely related to router configuration, might also be related to browser settings. Problems are not with my board, my camera or the web server.
Able to access server and see stream
– Win 10 laptop on the same network as the ESP32-CAM board. Connected via ethernet (haven’t yet tried RPi via ethernet.)
Still cannot access server
– Win 10 laptop and RPi4, same network, via wifi (they time out)
I temporarily added a port forwarding rule to my router to see if I could access the server from a device outside my network.
Able to access server but cannot see stream (yet)
– Smart phone using mobile data, and Linux desktop computer (same router, different VLAN, inter VLAN routing disabled, via VPN so my desktop appears to be accessing the web server externally.)
Next step: figure out why I can’t see the stream when accessing the server this way.
I tried one more thing today, with no changes (so port forwarding still enabled on my router): from a device outside of my network, I connected to the server and clicked on “Get Still”, and was able to capture a still on screen (even at highest Quality and Resolution UXGA 1600×1200), and save it as a jpg,however, I’m still not able to able to see a stream.
So while my ESP32-CAM’s wifi signal appears strong, I have it connected to an MB programmer. It has been noted that (apparently) with the weaker wifi signal when the MB programmer is connected, streaming might be unreliable or absent, so when I get a chance, I will either connect it via FTDI programmer or connect the antenna, and see if I can see a stream then.
I’m going to call this resolved, because the original problem that I reported is fixed, even though others remain.
I was eventually able to stream, both to a device on the same network and to an external device, after I reduced the resolution to something lower than UXGA 1600×1200.
Today I tried to connect via FTDI rather than MBDI (two different ones, actually) and wasn’t able to connect to the server, either wired or wirelessly, with either FTDI. Another problem for another day.
I switched back to the MBDI programmer, moved it close to my wifi router, and confirmed on my router that the wifi signal was very strong. Still able to stream only when my device is connected to my router by wire and not when connecting wirelessly. I still think that’s something to do with my router settings, but also a problem for another day.
I’ve been away from this for awhile. In response to this:
Sara: Yes, indeed. It seems something related to your router/network… If you find out what it is, please share it here.
On my wifi router, I set up one VLAN for just the ESP32-CAM and the laptops & RPis I want to connect to it. It turns out I had enabled layer 2 isolation (and forgotten about it) on the wifi SSID associated with that VLAN, which was preventing devices on that wifi network from seeing each other, but not preventing a laptop or RPi connected by wire on that VLAN from connecting to the ESP32-CAM.
I disabled layer 2 isolation and now am able to view the server page and stream the video, with both laptop or RPi and ESP32-CAM connected by wifi.
Now I can finally call this fully resolved.
Great.
Thanks for the follow-up.
Regards,
Sara
I am trying to program my esp32 with arduino uno and whenever it try uploading the sketch it shows an error “A fatal error occurred: Failed to connect to ESP32: No serial data received.”
tried pressing the reset button but nothing works . any solution?
Why would you use an Arduino to program the ESP32?
What ESP32 board model are you using?
Regards,
Sara
Hi, I am new to ESP32 CAM and I am facing an issue where my esp32 cam Led which connected to GPIO4 is lighting dimly/ partially on. I am not able to flash the code and the original webserver code I flashed previously into the esp32 cam is not working. May I know what is the issue and is there any way I could solved this?
The error I got during flashing is this:
A fatal error occurred: Failed to connect to ESP32: No serial data received.
Thank you and hope to hear from you soon. Really need help for this.
Hi I have a ESP 32 cam , when I get my code, and upload it with programmer, the uploading is going like forever, when I go to serial monitor, it give’s me a demo IP and I don’t have the menu with the settings in the web server.
What to do?
Hi.
What do you get?
Any errors?
Can you provide more details about your issue?
Regards,
Sara
hi error I got during flashing is this:
A fatal error occurred: Failed to connect to ESP32: No serial data received.
Thank you and hope to hear from you soon. Really need help for this.
Hi.
Check your USB cable.
Press the board BOOT button right after clicking the Upload button.
Make sure you don’t have any peripherals connected to your board.
Regards,
Sara
Hi.
I am using Esp32-Cam (AI Thinker) and I have some error occurred during web,like
[E][camera.c:1483] esp_camera_fb_get(): Failed to get the frame on time!
Camera capture failed
I am able to connect the server but I can’t get the photo or video ,help me
Regards,
Nirmal
When I press the reset button to get its IP on the serial monitor I get this error:
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13836
load:0x40080400,len:3608
entry 0x400805f0
E (487) camera: Camera probe failed with error 0x105(ESP_ERR_NOT_FOUND)
Camera init failed with error 0x105
Hi, I just tested ESP32-CAM following instruction from some pages. Everything went OK, just Stream doesn’t started. I suppose due to this error “E (324) psram: PSRAM ID read error: 0xffffffff”.
I am using AI Thinker ES32-CAM and also board in IDE was set to this board.
When I changed board from AI Thinker ES32-CAM to ESP32 DEV Module error disappear and stream started to work.
Maybe it will help to somebody with the same problem.
Serial print:
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13864
load:0x40080400,len:3608
entry 0x400805f0
E (324) psram: PSRAM ID read error: 0xffffffff
Hey,
I have image displaying like this:
https://imgur.com/a/n3CUNG8
What may be the problem? I’m with a 5V USB charger connected to 5V and GND
Hi there, i got a problem with port. I can’t see port choices even tho i already connect ESP32 camera using USB cable. May i have a suggestion for this?
Hi.
You may need to install the USB drivers for your FTDI programmer.
Regards,
Sara
to reduce the power related issues, I would like to suggest you to connect a 100mfd/10 or 25v capacitor on the vcc and ground pin of the board.
it solves most power related issues
Thanks
Arduino: 1.8.10 (Windows 10), Board: “ESP32 Wrover Module, Huge APP (3MB No OTA/1MB SPIFFS), DIO, 40MHz, 230400, None”
Sketch uses 2594790 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.
esptool.py v3.0-dev
Serial port COM8
Connecting…….._____….._____….._
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 24:62:ab:f9:dc:3c
Uploading stub…
Running stub…
Stub running…
Changing baud rate to 230400
Changed.
Configuring flash size…
Warning: Could not auto-detect Flash size (FlashID=0xffffff, SizeID=0xff), defaulting to 4MB
Compressed 8192 bytes to 47…
A fatal error occurred: Timed out waiting for packet content
A fatal error occurred: Timed out waiting for packet content
This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.
Hi all,
Any ideas about this type of error in serial port:
E (487) camera: Camera probe failed with error 0x105(ESP_ERR_NOT_FOUND)
Camera init failed with error 0x105
also this:
E (467) camera: Camera probe failed with error 0x105(ESP_ERR_NOT_FOUND)
Camera init failed with error 0x105
and this:
E (499) camera: Camera probe failed with error 0x105(ESP_ERR_NOT_FOUND)
Camera init failed with error 0x105
Does it mean that the camera module is dead?
Thanks
Aleks
Hi.
It can be cause by one of the following:
– The camera might be broken;
– The camera is not connected properly;
– You’re not using an OV2640 camera;
– You don’t have the right pinout on the code for the board you’re using.
I hope this helps troubleshoot the issue.
REgards,
Sara
Has anyone received this error?
A fatal error occurred: Failed to connect to ESP32: Packet content transfer stopped (received 10 bytes) For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
Failed uploading: uploading error: exit status 2
I have seen so many people complain about this same error and they were given a multitude of answers to help with this error, but nothing so far has worked for me.
Everything was working fine until I upgraded to Win 11 and the latest version of VS Code. After the upgrade, things worked intermittently, and now nothing. I also attempted uploading with the Arduino IDE and no success. I’m at the point of throwing the ESP32 boards into a box, and moving onto an alternative until someone comes up with a different solution.
This is my failed punch list gathered from the many postings about this error:
Followed these instructions: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html without success.
Removed and Re-installed the CP210x & CH340 (ESP32-CAM Programming Board) Windows Drivers
Tried both VS Code & Arduino IDE with Ubuntu on two different computers.
For Ubuntu, I added “User” to dialout.
Pressed IO0 & RST to force the ESP32 into Boot Mode.
Verified USB cables were data cables.
Tested 6 ESP32 Dev Kit boards to make sure I didn’t have a bad one.
Soldered a 10 uF capacitor across the EN pin and GND
Added: monitor_dtr = 0 & monitor_rts = 0 to platformio.ini
The two different Boards ESP32 DEV Kit & ESP32-CAM Boards, both appear in Device Manager.
Attempted to upload the code in Win 10, and had the same results.
Loaded the previous CH340 windows driver version.
I’m a beginner with this technology, so please keep this in mind when you answer my question. Thanks,in advance, to anyone who can help me.
am getting the error as…Sketch uses 2668738 bytes (84%) of program storage space. Maximum is 3145728 bytes.
Global variables use 56832 bytes (17%) of dynamic memory, leaving 270848 bytes for local variables. Maximum is 327680 bytes.
esptool.py v3.0-dev
Serial port COM4
Connecting…….._____….._____….._____….._____….._____….._____….._____
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
Failed uploading: uploading error: exit status 2
I already switched from 3.3v to 5v
Installed all the libraries.
Switched from ESP32 WROVER MODULE to AI THINKER-ESP32 CAM
But still getting the same error.
as a partition scheme, did you use “huge”?
I was getting the same timeout error. What solved it for me was changing the GND pin I was using.
On my ESP32-CAM the GND pin that is next to the I0T pin is marked as GND/R. This is ‘the pin’ that most wiring diagrams show to connect the GND from the FTDI to.
I simply swapped from using the GND/R pin on the ESP32-CAM to a GND pin (I used the one next to the 5V pin) and it all worked.
I also use DIO flash mode (not the default QIO), Huge APP Partition Schema and AI Thinker ESP32-CAM board.
.)
After upload (working normaly) ,i receive this message in serial monitor
rst:0x3 (SW_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13192
load:0x40080400,len:3028
entry 0x400805e4
ets Jun 8 2016 00:22:57
only this , every half second.
my camera is CAMERA_MODEL_AI_THINKER
I have select
CPU FREQ 160MHZ
FLASH FREQ 40MHZ
FLASH MODE DIO
REGULAR WITH 4MB SPIFS
can you help me???
flashed succesfully, web server coming up, I can see the stream. Face recognition seems to work, there is this yellow frame appearing around my face. BUT when I hit the enroll face button, nothing happens. Literally nothing. any hint on how I can manage to get the enrollment to work?
Hi.
Currently, due to an update on the ESP32 core, the face recognition and enrolling face is only enabled for ESP32-S3 boards.
Regards,
Sara
Hi,
I’ve been using the ESP32-CAM AI THINKER model for a few weeks now. I have the ESP32-CAM-MB USB Programmer that I use to program the board. I then disconnect the MB development board and power the ESP32-CAM with an external 5V power supply. The reason I do this is because I need to use some of the GPIOS (12,13,14,15) for inputs and outputs, so I can’t use the MB development board to power it.
This has been working completely fine up until a few days ago. I can program and connect to my wifi and my web server when the ESP32-CAM is connected to the MB USB development board. But then when I disconnected it from the MB development board and power it using the 5V power supply, the red led (GPIO 33) but turns on (constant) and I can’t connect to my wifi or web server. I’m not sure what went wrong but I’ve tried many fixed (disabling all of my gpis, going back to working code, trying example codes) but I get the same outcome.
Any help would be greatly appreciated! Thanks!
esp_camera_fb_get(): Failed to get the frame on time!
Camera capture failed.
Hey Everyone, if all the solutions you’ve tried doesn’t seem to work. it’s an hardware problem which i have solved by opening the zinc behind the ESP32CAM to inspect thoroughly the main ESP32 IC and unfortunately, both esp32 cameras i newly bought were having some bridges(short-circuited terminals) in the ESP32 IC terminals then I isolated them and they both worked fine.
Note: These terminals are very tiny to work on (to de-solder the short-circuited point) so you shoud be very carefull and have a good soldering skill to handle this.
Both of my ESP32 CAM are now survived.
Im trying to run the CameraWebServer example code and it compiles and uploads fine but when I start the esp32-cam it shows this in the serial monitor:
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13924
ho 0 tail 12 room 4
load:0x40080400,len:3600
entry 0x400805f0
E (494) esp_core_dump_f⸮f⸮⸮⸮ No core dump partition found!
E (494) esp_core_dump_flash: No core dump partition found!
………………………………………………………………………………………………………………………….
And never gets past the little dots. What does this mean?
TIA for any help!
Hi.
Which board are you selecting in Tools > Boards?
Which model of the ESP32 CAM do you have?
Regards,
Sara
Hi Sara,
I’m choosing the wrover board in the ide. I got my board from Amazon and it says it’s an esp32 – cam. I think it’s a clone/knock off.
When I modify the camera web server sketch to included wifi manager it uploads and seems to work. I can join different wifi networks and load the camera web server page but now am getting a sccb write failed error.
Hi.
What is exactly the error that you’re getting?
Regards,
Sara
In the serial monitor this is what it shows after connecting to the ip address.
WiFi connected
Camera Ready! Use ‘http://192.168.0.140’ to connect
E (24534) sccb: SCCB_Write Failed addr:0x30, reg:0xff, data:0x01, ret:-1
Everything else seems to work correctly. I can trigger the flash, change which wifi I’m connected to, the only issue is I cant activate the camera.
Thank you!
What is the camera model and board that you’re usinh?
I bought it on Amazon and all it says is ESP32 -CAM with camera module OV2640.
Thanks
That seems the correct board.
What board are you selecting in Tools > Board?
Regards,
Sara
I figured it out!
I was using the on demand feature of wifi manager and had a push button hooked up to pin 0 which is also used by the camera. As soon as I switched the push button to a different pin everything worked as it should!
Thanks!
Great!
I’m glad you make it work.
Regards,
Sara
Buenas noches tengo una duda debido a que he intentado hacer que funcione, pero me ha salido esto en el monitor serie “�2�M�z�”��ǘ1&[2uR�|\” me aparecen solo simbolos asi, crei que podria ser un error mio o alguna mala conexion, probe con uno totalmente nuevo y esto me sigue apareciendo no se muy bien a que se deba, debido a que me aseguro de que todo este correctamente
Hi.
Double-check that you’re selecting the right baud rate in the Serial Monitor.
Regards,
Sara
Compilation error:text section exceeds avaliable space in board
Hi.
Make sure you’re selecting the right board in Tools > Board.
Regards,
Sara
I solved the Error message:
“E (494) esp_core_dump_flash: No core dump partition found!”
Edit the partitions.csv in project directory:
Add a new coredump line and edit previous fr line you get like this:
Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x3d0000,
fr, data, , 0x3e0000, 0x1ff00,
coredump, data, coredump, 0x3fff00, 0x100
Thanks for sharing.
Hello. I want to program esp32cam and first use ftdi and second use arduino uno r3 and in both I have a error in arduino :
A fatal error occurred: Failed to connect to ESP32: No serial data received. For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html Failed uploading: uploading error: exit status 2
I checked a driver and test reset button in connecting but in all the time have same problem.
hello. need help
board: esp32-cam( ESP32_D0WD_V3_CAM)
E (292) esp_core_dump_f��͡� No core dump partition found!
E (292) esp_core_dump_flash: No core dump partition found!
E (197) psram: PSRAM ID read error: 0xffffffff
E (335) cam_hal: cam_dma_config(300): frame buffer malloc failed
E (335) cam_hal: cam_config(384): cam_dma_config failed
E (335) camera: Camera config failed with error 0xffffffff
Camera init failed with error 0xffffffff
Dear, many thanks for your work, is very appreciates, I’ve a problem with ESP32CAM and ESP32 CAM MB, I’m using this platform from many month, without problem, but from yesterday, if try to upload code, the result is :
Connecting………………………………..
A fatal error occurred: Failed to connect to ESP32: Wrong boot mode detected (0xb)! The chip needs to be in download mode.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
Failed uploading: uploading error: exit status 2
I’ve read all and try with different ESP32CAM, PC, USB link, download mode etc…, but nothing todo, can you help me? Thanks
Hi.
Do you have GND connected to GPIO 0 when uploading the code?
Regards,
Sara
I’ve the same problem, for manu month isnall ok, now Nottingham to do!!!I’ve buy a ftdi adatterà, I hope to resolve.
Hello, I have programmed several esp32-cam with their tutorials but I have two that give me this error, I have reviewed all their solutions step by step and nothing, I can’t get them to work.
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13964
load:0x40080400,len:3600
entry 0x400805f0
E (304) sccb: SCCB_Write Failed addr:0x30, reg:0x35, data:0xda, ret:-1
E (304) camera: Camera probe failed with error 0xffffffff(ESP_FAIL)
Camera init failed with error 0xffffffffets Jul 29 2019 12:21:46
Beginner here, trying to program an ESP32-cam with the “Blink” example..I am getting the following error and have NO idea how to fix it, can someone point me in the right direction please??
C:\Users\garre\Documents\Arduino\sketch_jun27b\sketch_jun27b.ino:2:1: error: ‘dTutorials’ does not name a type
2 | dTutorials.com/vs-code-platformio-ide-esp32-esp8266-arduino/
| ^~~~~~~~~~
C:\Users\garre\Documents\Arduino\sketch_jun27b\sketch_jun27b.ino: In function ‘void setup()’:
C:\Users\garre\Documents\Arduino\sketch_jun27b\sketch_jun27b.ino:18:11: error: ‘ledPin’ was not declared in this scope
18 | pinMode(ledPin, OUTPUT);
| ^~~~~~
C:\Users\garre\Documents\Arduino\sketch_jun27b\sketch_jun27b.ino: In function ‘void loop()’:
C:\Users\garre\Documents\Arduino\sketch_jun27b\sketch_jun27b.ino:22:16: error: ‘ledPin’ was not declared in this scope
22 | digitalWrite(ledPin, HIGH);
| ^~~~~~
C:\Users\garre\Documents\Arduino\sketch_jun27b\sketch_jun27b.ino:25:24: error: ‘Arduino’ was not declared in this scope; did you mean ‘Arduino_h’?
25 | delay(2000);include <Arduino.h>void setup() {
| ^~~~~~~
| Arduino_h
C:\Users\garre\Documents\Arduino\sketch_jun27b\sketch_jun27b.ino:25:15: error: ‘include’ was not declared in this scope
25 | delay(2000);include <Arduino.h>void setup() {
| ^~~~~~~
C:\Users\garre\Documents\Arduino\sketch_jun27b\sketch_jun27b.ino:25:34: error: expected primary-expression before ‘void’
25 | delay(2000);include <Arduino.h>void setup() {
| ^~~~
C:\Users\garre\Documents\Arduino\sketch_jun27b\sketch_jun27b.ino:51:13: error: a function-definition is not allowed here before ‘{‘ token
51 | void loop() {
| ^
C:\Users\garre\Documents\Arduino\sketch_jun27b\sketch_jun27b.ino:54:2: error: expected ‘}’ at end of input
54 | }
| ^
C:\Users\garre\Documents\Arduino\sketch_jun27b\sketch_jun27b.ino:21:13: note: to match this ‘{‘
21 | void loop() {
| ^
exit status 1
Compilation error: ‘dTutorials’ does not name a type
Hi.
I think you’re not copying the whole code.
Please double-check. It seems some lines of code are missing.
Regards,
Sara
Hello Sara and Rui!
First of all congratulation for all the great work you do!
I would like to have some help on the following:
I have used your tutorial on ESP-CAM32 to send picture via email and then go to deep sleep.
I have added a couple of lines of code so that just before taking the snapshot the flashlight is turned on (GPIO 4 HIGH) and then right before going to sleep, I switch it off (GPIO4 LOW).
Now, the issue is that when the ESP goes to sleep, the GPIO4 is probably left uncontrolled, and there is a pull-up resistor which turns on the led (just a bit) but it is annloying as it consumes a couple of mA.
I have read around, and I found few suggestions. Such as including the following line before the deep sleep command:
rtc_gpio_isolate(GPIO_NUM_4);
or, as an alternative:
//rtc_gpio_hold_en(GPIO_NUM_4);
//gpio_deep_sleep_hold_en();
Both the solution works. Means the led turns off during deep sleep.
The issue is that at the next wake up, the led does not turn on. So the command ” digitalWrite(ledPin, HIGH) is kind of ignored by the board.
Have you experienced anything like that? Any solution?
I think that lighting the flashlight when taking the picture is very useful. But unfortunately there is something wrong with the deep sleep and the wakeup…
Thanks for any help!
Graziano.
I am getting signal interference lines in the video stream. how to overcome this? like the video is streaming, but with a lot of horizontal lines on the output of the esp32 cam. Please provide guidance.
Thank you.