Camera init failed with error 0x105 (ESP_ERR_NOT_FOUND) on ESP32 Cam with OV2640 Camera

Hello,

I am working on a CameraWebServer project using an ESP32 Cam board, and I am encountering the following error:

E (47) camera: Camera probe failed with error 0x105 (ESP_ERR_NOT_FOUND)
Camera init failed with error 0x105

I am uploading the code via Arduino Uno R3.

Here are the details of my setup and the steps I have taken:

  1. Board Used:

    • ESP-32S cam board
  2. Versions:

    • Latest version of ESP32 board manager installed
    • Arduino IDE version 2.3.4
  3. Camera Module:

    • OV2640 camera
  4. Troubleshooting Steps Taken:

    • Ensured the latest version of the board manager and Arduino IDE were
      used.
    • Removed and reattached the OV2640 camera multiple times.
    • Reset the esp32 board multiple times, but still encountering the same
      error.
    • Checked for any loose connections and made sure all connections are secure
    • Used multiple ESP32 boards in Arduino IDE, including ESP32 Dev Module, AI Thinker ESP32 Cam, and ESP Wrover Module, but the issue persists

Despite these efforts, I am still receiving the same error. I can provide photos of the connections, screenshots of the error, the code I am using and the board I am using.

Code:

#include "esp_camera.h"
#include <WiFi.h>
#include "soc/soc.h"
#include "soc/rtc_cntl_reg.h"

#define CAMERA_MODEL_AI_THINKER
#include "camera_pins.h"

const char* ssid = "JioFiber-t3g4d";
const char* password = "12348765";

void startCameraServer();

void setup() {
  WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0);
  Serial.begin(921600);
  Serial.setDebugOutput(true);
  Serial.println();

  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; // 1600x1200
    config.jpeg_quality = 10;           // Higher quality
    config.fb_count = 2;                // Double buffer
  } else {
    config.frame_size = FRAMESIZE_SVGA; // 800x600
    config.jpeg_quality = 12;           // Lower quality
    config.fb_count = 1;                // Single buffer
  }

  esp_err_t err = esp_camera_init(&config);
  if (err != ESP_OK) {
    Serial.printf("Camera init failed with error 0x%x", err);
    return;
  }

  sensor_t * s = esp_camera_sensor_get();
  if (s->id.PID == OV3660_PID) {
    s->set_vflip(s, 1); // flip it back
    s->set_brightness(s, 1); // up the brightness just a bit
    s->set_saturation(s, -2); // lower the saturation
  }
  s->set_framesize(s, FRAMESIZE_QVGA);

  WiFi.begin(ssid, password);

  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("");
  Serial.println("WiFi connected");

  startCameraServer();

  Serial.print("Camera Ready! Use 'http://");
  Serial.print(WiFi.localIP());
  Serial.println("' to connect");
}

void loop() {
  delay(10000);
}

Photo of the esp32 I am using

Connection image below

Settings for esp32 in arduino ide

Any help or suggestions to resolve this issue would be greatly appreciated!

Hi @learner999. Please provide a list of the exact connections you made between the UNO and the ESP32-CAM. It is just too difficult to determine them from looking at the picture you provided.

I have powered arduino uno by usb and esp32 is getting powered by arduino

Here are the connections:
Connections between arduino and esp32

TX to VOT
RX to VOR
5v to 5V
GND to GND

Esp32 connection = 1 :

GPIO0 to Gnd in esp32

Arduino connection = 1:

RES to GND

Connection image

Your topic has been moved to a more suitable location on the forum. The Arduino Nano ESP32 category is specific to that board and should not be used for the generic ESP32 boards.

Someone please answer waiting from a long time.

please help if you have resolved it.

Could be a faulty ESP32CAM or a faulty OV2640 camera.

But unless you have a good working ESP32CAM and OV2640 camera, or can borrow one, its going to prove real difficult to work out if your bits are actually faulty.

Maybe the supplier of your board can help.

i tried replacing both and same thing. if you look at my esp32 s cam image , there is no mention of espressif or ai tinker. if someone can help me in selecting which camera module i need to select and how to determine that it will be really helpful. i doubt if it is config related to camera_pins.h and somehow board is not matching it.

Several tutorials for the ESP32CAM here;

https://randomnerdtutorials.com/

Take photo and save to SD card is probably the most basic.

thanks. i tried that and it didn't worked. if you look at most of the tutorials and videos on various websites, they select AIThinker as camera module. If you look at image of Esp32 cam as that I am using , it nowhere mentions AIthinker. Also, if you look at the error, it mentions about config as well. So, I need help in understanding if pin configuration of my esp-32s cam, matches that of AIthinker. If there is a way to match pin configs mentioned in camera_pins.h, it will help, so that we can rule out config mismatch issues. i already bought another esp32s with ov camera and it also is showing same issue.

Did you find the solution? I'm also facing same issue.

Hi @iot69. Please post your full sketch.

I'll provide instructions you can follow to do that:

  1. If you are using Arduino IDE: select Tools > Auto Format from the menus.
  2. Click on the window that contains your sketch code.
  3. Press the Ctrl+A keyboard shortcut (Command+A for macOS users).
    This will select all the text.
  4. Press the Ctrl+C keyboard shortcut (Command+C for macOS users).
    This will copy the selected text to the clipboard.
  5. Open a forum reply here by clicking the "Reply" button.
  6. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
  7. Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
    This will paste the copied code into the code block.
  8. Move the cursor outside of the code block markup before you add any additional text to your reply.
  9. Click the "Reply" button to post the output.
(attachments)

esp32_camera.zip (22.7 KB)

This is the part I was interested in:

#define CAMERA_MODEL_AI_THINKER

The "CameraWebServer" example that comes with the "esp32" boards platform is configured for use with the "ESP Eye", like this:

#define CAMERA_MODEL_ESP_EYE  // Has PSRAM

and that configuration doesn't work with the common ESP32-CAM board, and so when the example is used without any modification it causes the "Camera probe failed with error 0x105 (ESP_ERR_NOT_FOUND)" error reported by @learner999. However, I see that your sketch is already configured correctly for use with the ESP32-CAM, so assuming you are using ESP32-CAM board, then your sketch is correctly configured.

I notice you are using a very old version of the example sketch, likely because you have a very old version of the "esp32" boards platform installed. Unless you have a specific reason for using that old platform version, I recommend you update to the latest version. I'll provide instructions you can follow to do that:

A. Update "esp32" Boards Platform

  1. Open the web page containing Espressif's official installation instructions for the ESP32 boards platform:
    https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#installing-using-arduino-ide
  2. Copy the URL shown under the "Stable release link" section of that page.
  3. Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
    The "Preferences" dialog will open.
  4. If there is already a URL for the ESP32 boards platform in the "Additional Boards Manager URLs" field of the "Preferences" dialog, delete it.
  5. Add the URL you copied from the ESP32 boards platform installation instructions to the "Additional Boards Manager URLs" field.
    If there are other URLs in the field, separate them with commas (,).
  6. Click the "OK" button on the "Preferences" dialog.
    The "Preferences" dialog will close.
  7. You will now see a "Downloading index: ..." notification at the bottom right corner of the IDE window. Wait for that notification to close.
  8. Select Tools > Board > Boards Manager... from the Arduino IDE menus to open the "Boards Manager" view in the left side panel.
  9. Scroll down through the list of boards platforms until you see the "esp32 by Espressif Systems" entry.
  10. Click the "UPDATE" button at the bottom of the entry.
  11. Wait for the update process to finish, as indicated by a notification at the bottom right corner of the Arduino IDE window:

    Successfully installed platform ...

B. Use Latest Example Sketch

  1. Select File > Examples > ESP32 > Camera > CameraWebServer from the Arduino IDE menus.
    The "CameraWebServer" sketch will open in a new Arduino IDE window.
  2. Change line 17 of the sketch from this:
    #define CAMERA_MODEL_ESP_EYE  // Has PSRAM
    
    to this:
    #define CAMERA_MODEL_AI_THINKER
    
  3. Replace the ********** placeholders on lines 39 and 40 of the sketch with your Wi-Fi access point credentials:
    const char *ssid = "**********";
    const char *password = "**********";
    
  4. If it isn't already, connect your ESP32-CAM board to the computer with a USB cable.
  5. Select Tools > Board > ESP32-CAM from the Arduino IDE menus.
  6. Select the port of the ESP32-CAM board from Arduino IDE's Tools > Port menu.
  7. If it isn't already open, select Tools > Serial Monitor to open the Serial Monitor panel.
  8. Select Sketch > Upload from the Arduino IDE menus.
  9. Wait for the upload to finish successfully.
  10. Watch the Serial Monitor panel. You should see something like this:
    WiFi connecting..
    WiFi connected
    Camera Ready! Use 'http://192.168.254.129' to connect
    
  11. Type the URL shown in Serial Monitor into the address bar of your browser.
  12. Press the Enter key.
    A web page will open that allows you to configure the camera.
  13. Make any camera configurations you like on the web page.
  14. Click the "Start Stream" button on the web page.

You should now see the stream from the camera in the web page.

My esp32 version is 3.1.0
I think it is latest version.

I think it is latest version in arduino ide

The latest version is 3.1.3. Please try following the instructions I provided. They work perfectly with my ESP32-CAM.

E (490) camera: JPEG format is not supported on this sensor
Camera init failed with error 0x106

:frowning: not working

thankfully that camera probe error is not coming.But another error occured.