ESP32-CAM Troubleshooting Guide: Most Common Problems Fixed

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.

ESP32-CAM Troubleshooting Guide: Most Common Problems Fixed

We’ve released the following projects with the ESP32-CAM:

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:

  1. Failed to connect to ESP32: Timed out waiting for packet header
  2. Camera init failed with error 0x20001 or similar
  3. Brownout detector or Guru meditation error
  4. Sketch too big error – Wrong partition scheme selected
  5. Board at COMX is not available – COM Port Not Selected
  6. Psram error: GPIO isr service is not installed
  7. Weak Wi-Fi Signal
  8. No IP Address in Arduino IDE Serial Monitor
  9. Can’t open web server
  10. The image lags/shows lots of latency

1. Failed to connect to ESP32: Timed out waiting for packet header

ESP32-CAM 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:

ESP32-CAM FTDI Programmer Wiring connect TX RX GND VCC

Important: GPIO 0 needs to be connected to GND so that you’re able to upload code.

To upload the code, follow the next steps:

  1. Go to Tools > Board and select ESP32 Wrover Module
  2. Go to Tools > Port and select the COM port the ESP32 is connected to
  3. In Tools > Partition Scheme, select “Huge APP (3MB No OTA)
  4. Press the ESP32-CAM on-board RESET button
  5. Then, click the Arduino IDE upload button to upload the sketch
ESP32-CAM select board, partition scheme and Port

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 3.3V.

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. However, we were always successful providing 3.3V supply.

You can’t upload code

If you can’t upload code to the ESP32-CAM, follow the suggestions for the previous issue.

2. Camera init failed with error 0x20001 or similar

ESP32-CAM 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

Some ESP32-CAM boards required 5V power supply to work properly. We’ve tested all our examples with 3.3V and they worked fine. However, some of our readers reported that this issue was fixed when they power the ESP32-CAM with 5V.

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 3.

4. Sketch too big error – Wrong partition scheme selected

ESP32-CAM 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

ESP32-CAM 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

ESP32-CAM 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.

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.

ESP32-CAM external and built-in antenna
Photo courtesy of Helmut Schoenborn

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

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
  
  IMPORTANT!!! 
   - Select Board "ESP32 Wrover Module"
   - Select the Partion Scheme "Huge APP (3MB No OTA)
   - 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 "dl_lib.h"
#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

// 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_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_sscb_sda = SIOD_GPIO_NUM;
  config.pin_sscb_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);
}

View raw code

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.

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.


Learn how to program and build projects with the ESP32 and ESP8266 using MicroPython firmware DOWNLOAD »

Learn how to program and build projects with the ESP32 and ESP8266 using MicroPython firmware DOWNLOAD »


Enjoyed this project? Stay updated by subscribing our weekly newsletter!

20 thoughts on “ESP32-CAM Troubleshooting Guide: Most Common Problems Fixed”

  1. 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

  2. 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.

  3. 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

  4. WEAK SIGNAL is also cause by the jumper that is solded for use the external antenna. Just change it to use the internal antenna

  5. 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).

  6. 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.

  7. 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.

  8. 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

Leave a Comment

Download our Free eBooks and Resources

Get instant access to our FREE eBooks, Resources, and Exclusive Electronics Projects by entering your email address below.