Closed lucianobonzatto closed 1 year ago
Before officially initializing the camera, ESP32 will send a command to the sensor through the I2C bus. Normally, the sensor should send an ACK, and then ESP32 can initialize the sensor through the I2C bus. The current log shows that the sensor has not sent an ACK. Therefore, the configuration of the ESP32 pin is abnormal, or the sensor is working in an abnormal state.
I'm also facing the same issue, even after the cam init ok.
@yashshukla99 Is the official development board currently used? Which sensor model is used? And it is recommended that you use the example here for testing.
Thanks @WangYuxin-esp , I will test above code and I am using this one with OV2640 sensor.
@yashshukla99 I have several of this AI-Thinker (or faked clone?). The are borderline.
I often face this problem, but it is usually due to a poor connection of the FPC connector, which can be solved by inserting the connector all the way to the back.
Tried all of the solutions, I think I got scamed or my electrical skills are too bad : /
@OmPatel47097 Probably you have got just bad luck with the one you have. Since i use ESP32-S3 Cam Modells never had any problem.
@OmPatel47097 Probably you have got just bad luck with the one you have. Since i use ESP32-S3 Cam Modells never had any problem.
Probably I might need to buy a new one
you shoud trie to use the CAMERA_MODEL_AI_THINKER board worked for me when i had this problem
I faced the same issue. With the same log. I solved changing from I2C port#1 (default) to port#0 (and AI_THINKER as noted here above)
@sergioaiello what do you mean by changing I2c port 1 to 2? Do you have some sketch?
Tried with .sccb_i2c_port = 0 and also = 1 but no luck.
no, it is very easy. Go to "menuconfig" ("F1" if you use VisualCode editor) and search for "SCCB" (OV camera's interface) You should get the menu "I2C peripheral to use for SCCB" with two choices: "I2C0" and "I2C1" Apparently the default is the latter. Change to the former and compile after a "fullclean". It worked for me. Give it a try and let me know.
@sergioaiello, thanks for the response. Im using vscode with PlatafformIO extension. I dont get any result when searching "SCCB".
choice SCCB_HARDWARE_I2C_PORT
bool "I2C peripheral to use for SCCB"
default SCCB_HARDWARE_I2C_PORT1
config SCCB_HARDWARE_I2C_PORT0
bool "I2C0"
config SCCB_HARDWARE_I2C_PORT1
bool "I2C1"
endchoice
You can check the file https://github.com/espressif/esp32-camera/blob/master/Kconfig
Also you can get the entire github project that refers to the Kconfig.projbuild file. talk to you then
using/ uncommenting the above worked for me.
define CAMERA_MODEL_AI_THINKER // Has PSRAM using/ uncommenting the above worked for me.
Can you share your sketch (and probably platform.ini)?
define CAMERA_MODEL_AI_THINKER // Has PSRAM using/ uncommenting the above worked for me.
Can you share your sketch (and probably platform.ini)?
// // WARNING!!! PSRAM IC required for UXGA resolution and high JPEG quality // Ensure ESP32 Wrover Module or other board with PSRAM is selected // Partial images will be transmitted if image exceeds buffer size // // You must select partition scheme from the board menu that has at least 3MB APP space. // Face Recognition is DISABLED for ESP32 and ESP32-S2, because it takes up from 15 // seconds to process single frame. Face Detection is ENABLED if PSRAM is enabled as well
// =================== // Select camera model // =================== //#define CAMERA_MODEL_WROVER_KIT // Has PSRAM // #define CAMERA_MODEL_ESP_EYE // Has PSRAM //#define CAMERA_MODEL_ESP32S3_EYE // Has PSRAM //#define CAMERA_MODEL_M5STACK_PSRAM // Has PSRAM //#define CAMERA_MODEL_M5STACK_V2_PSRAM // M5Camera version B Has PSRAM //#define CAMERA_MODEL_M5STACK_WIDE // Has PSRAM //#define CAMERA_MODEL_M5STACK_ESP32CAM // No PSRAM //#define CAMERA_MODEL_M5STACK_UNITCAM // No PSRAM
//#define CAMERA_MODEL_TTGO_T_JOURNAL // No PSRAM // Espressif Internal Boards //#define CAMERA_MODEL_ESP32_CAM_BOARD //#define CAMERA_MODEL_ESP32S2_CAM_BOARD //#define CAMERA_MODEL_ESP32S3_CAM_LCD
// =========================== // Enter your WiFi credentials // =========================== const char* ssid = "**"; const char* password = "**";
void startCameraServer(); void setupLedFlash(int pin);
void setup() { Serial.begin(115200); 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.frame_size = FRAMESIZE_UXGA; config.pixel_format = PIXFORMAT_JPEG; // for streaming //config.pixel_format = PIXFORMAT_RGB565; // for face detection/recognition config.grab_mode = CAMERA_GRAB_WHEN_EMPTY; config.fb_location = CAMERA_FB_IN_PSRAM; config.jpeg_quality = 12; config.fb_count = 1; // if PSRAM IC present, init with UXGA resolution and higher JPEG quality // for larger pre-allocated frame buffer. if(config.pixel_format == PIXFORMAT_JPEG){ if(psramFound()){ config.jpeg_quality = 10; config.fb_count = 2; config.grab_mode = CAMERA_GRAB_LATEST; } else { // Limit the frame size when PSRAM is not available config.frame_size = FRAMESIZE_SVGA; config.fb_location = CAMERA_FB_IN_DRAM; } } else { // Best option for face detection/recognition config.frame_size = FRAMESIZE_240X240;
config.fb_count = 2;
}
pinMode(13, INPUT_PULLUP); pinMode(14, INPUT_PULLUP);
// 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; }
sensor_t * s = esp_camera_sensor_get(); // initial sensors are flipped vertically and colors are a bit saturated 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 } // drop down frame size for higher initial frame rate if(config.pixel_format == PIXFORMAT_JPEG){ s->set_framesize(s, FRAMESIZE_QVGA); }
s->set_vflip(s, 1); s->set_hmirror(s, 1);
s->set_vflip(s, 1);
// Setup LED FLash if LED pin is defined in camera_pins.h
setupLedFlash(LED_GPIO_NUM);
WiFi.begin(ssid, password); WiFi.setSleep(false);
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() { // Do nothing. Everything is done in another task by the web server delay(10000); }
define CAMERA_MODEL_AI_THINKER // Has PSRAM using/ uncommenting the above worked for me.
Can you share your sketch (and probably platform.ini)?
include "esp_camera.h"
include
// // WARNING!!! PSRAM IC required for UXGA resolution and high JPEG quality // Ensure ESP32 Wrover Module or other board with PSRAM is selected // Partial images will be transmitted if image exceeds buffer size // // You must select partition scheme from the board menu that has at least 3MB APP space. // Face Recognition is DISABLED for ESP32 and ESP32-S2, because it takes up from 15 // seconds to process single frame. Face Detection is ENABLED if PSRAM is enabled as well
// =================== // Select camera model // =================== //#define CAMERA_MODEL_WROVER_KIT // Has PSRAM // #define CAMERA_MODEL_ESP_EYE // Has PSRAM //#define CAMERA_MODEL_ESP32S3_EYE // Has PSRAM //#define CAMERA_MODEL_M5STACK_PSRAM // Has PSRAM //#define CAMERA_MODEL_M5STACK_V2_PSRAM // M5Camera version B Has PSRAM //#define CAMERA_MODEL_M5STACK_WIDE // Has PSRAM //#define CAMERA_MODEL_M5STACK_ESP32CAM // No PSRAM //#define CAMERA_MODEL_M5STACK_UNITCAM // No PSRAM
define CAMERA_MODEL_AI_THINKER // Has PSRAM
//#define CAMERA_MODEL_TTGO_T_JOURNAL // No PSRAM // Espressif Internal Boards //#define CAMERA_MODEL_ESP32_CAM_BOARD //#define CAMERA_MODEL_ESP32S2_CAM_BOARD //#define CAMERA_MODEL_ESP32S3_CAM_LCD
include "camera_pins.h"
// =========================== // Enter your WiFi credentials // =========================== const char* ssid = "**"; const char* password = "**";
void startCameraServer(); void setupLedFlash(int pin);
void setup() { Serial.begin(115200); 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.frame_size = FRAMESIZE_UXGA; config.pixel_format = PIXFORMAT_JPEG; // for streaming //config.pixel_format = PIXFORMAT_RGB565; // for face detection/recognition config.grab_mode = CAMERA_GRAB_WHEN_EMPTY; config.fb_location = CAMERA_FB_IN_PSRAM; config.jpeg_quality = 12; config.fb_count = 1; // if PSRAM IC present, init with UXGA resolution and higher JPEG quality // for larger pre-allocated frame buffer. if(config.pixel_format == PIXFORMAT_JPEG){ if(psramFound()){ config.jpeg_quality = 10; config.fb_count = 2; config.grab_mode = CAMERA_GRAB_LATEST; } else { // Limit the frame size when PSRAM is not available config.frame_size = FRAMESIZE_SVGA; config.fb_location = CAMERA_FB_IN_DRAM; } } else { // Best option for face detection/recognition config.frame_size = FRAMESIZE_240X240;
if CONFIG_IDF_TARGET_ESP32S3
config.fb_count = 2;
endif
}
if defined(CAMERA_MODEL_ESP_EYE)
pinMode(13, INPUT_PULLUP); pinMode(14, INPUT_PULLUP);
endif
// 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; }
sensor_t * s = esp_camera_sensor_get(); // initial sensors are flipped vertically and colors are a bit saturated 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 } // drop down frame size for higher initial frame rate if(config.pixel_format == PIXFORMAT_JPEG){ s->set_framesize(s, FRAMESIZE_QVGA); }
if defined(CAMERA_MODEL_M5STACK_WIDE) || defined(CAMERA_MODEL_M5STACK_ESP32CAM)
s->set_vflip(s, 1); s->set_hmirror(s, 1);
endif
if defined(CAMERA_MODEL_ESP32S3_EYE)
s->set_vflip(s, 1);
endif
// Setup LED FLash if LED pin is defined in camera_pins.h
if defined(LED_GPIO_NUM)
setupLedFlash(LED_GPIO_NUM);
endif
WiFi.begin(ssid, password); WiFi.setSleep(false);
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() { // Do nothing. Everything is done in another task by the web server delay(10000); }
So far, the modification has been made already. Replace with your code.
Have some success today:
arduino-esp32
arduino-esp32/libraries/ESP32/examples/Camera/CameraWebServer
#define CAMERA_MODEL_AI_THINKER
AND #define CAMERA_MODEL_ESP32_CAM_BOARD
Three devices working, one gives me:
E (541) sccb: SCCB_Write Failed addr:0x30, reg:0x37, data:0xc3, ret:263
E (542) camera: Camera probe failed with error 0xffffffff(ESP_FAIL)
Camera init failed with error 0xffffffff
So this board has a damaged PSRAM?
You only could uncomment one board particularly. Use #define CAMERA_MODEL_AI_THINKER only please. Don't use two boards. It should work. Sent from Yahoo Mail on Android
On Tue, 7 Mar 2023 at 1:45 pm, Christoph @.***> wrote:
Have some success today:
Three devices working, one gives me: E (541) sccb: SCCB_Write Failed addr:0x30, reg:0x37, data:0xc3, ret:263 E (542) camera: Camera probe failed with error 0xffffffff(ESP_FAIL) Camera init failed with error 0xffffffff
So this board has a damaged PSRAM?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
You only could uncomment one board particularly. Use #define CAMERA_MODEL_AI_THINKER only please. Don't use two boards. It should work.
Does not make any difference. Still get the SCCB_Write Failed
@psi-4ward There are clone AI-Thinker Boards where PSRAM is not there or not working.
@psi-4ward There are clone AI-Thinker Boards where PSRAM is not there or not working.
But I've 4 pieces and 3 of them work now - all from the same order.
I've resolved the same problem. I've selected "Ai Thinker ESP-32 cam" board. Flash mode "DIO". Partition Scheme "Huge APP (3Mb...)". And it's all. My Cam works fine. This is my board.
This issue appears to be stale. Please close it if its no longer valid.
@Deewansonic
define CAMERA_MODEL_AI_THINKER // Has PSRAM using/ uncommenting the above worked for me.
Can you share your sketch (and probably platform.ini)?
include "esp_camera.h"
include
// // WARNING!!! PSRAM IC required for UXGA resolution and high JPEG quality // Ensure ESP32 Wrover Module or other board with PSRAM is selected // Partial images will be transmitted if image exceeds buffer size // // You must select partition scheme from the board menu that has at least 3MB APP space. // Face Recognition is DISABLED for ESP32 and ESP32-S2, because it takes up from 15 // seconds to process single frame. Face Detection is ENABLED if PSRAM is enabled as well // =================== // Select camera model // =================== //#define CAMERA_MODEL_WROVER_KIT // Has PSRAM // #define CAMERA_MODEL_ESP_EYE // Has PSRAM //#define CAMERA_MODEL_ESP32S3_EYE // Has PSRAM //#define CAMERA_MODEL_M5STACK_PSRAM // Has PSRAM //#define CAMERA_MODEL_M5STACK_V2_PSRAM // M5Camera version B Has PSRAM //#define CAMERA_MODEL_M5STACK_WIDE // Has PSRAM //#define CAMERA_MODEL_M5STACK_ESP32CAM // No PSRAM //#define CAMERA_MODEL_M5STACK_UNITCAM // No PSRAM
define CAMERA_MODEL_AI_THINKER // Has PSRAM
//#define CAMERA_MODEL_TTGO_T_JOURNAL // No PSRAM // Espressif Internal Boards //#define CAMERA_MODEL_ESP32_CAM_BOARD //#define CAMERA_MODEL_ESP32S2_CAM_BOARD //#define CAMERA_MODEL_ESP32S3_CAM_LCD
include "camera_pins.h"
// =========================== // Enter your WiFi credentials // =========================== const char ssid = "**"; const char password = "**"; void startCameraServer(); void setupLedFlash(int pin); void setup() { Serial.begin(115200); 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.frame_size = FRAMESIZE_UXGA; config.pixel_format = PIXFORMAT_JPEG; // for streaming //config.pixel_format = PIXFORMAT_RGB565; // for face detection/recognition config.grab_mode = CAMERA_GRAB_WHEN_EMPTY; config.fb_location = CAMERA_FB_IN_PSRAM; config.jpeg_quality = 12; config.fb_count = 1; // if PSRAM IC present, init with UXGA resolution and higher JPEG quality // for larger pre-allocated frame buffer. if(config.pixel_format == PIXFORMAT_JPEG){ if(psramFound()){ config.jpeg_quality = 10; config.fb_count = 2; config.grab_mode = CAMERA_GRAB_LATEST; } else { // Limit the frame size when PSRAM is not available config.frame_size = FRAMESIZE_SVGA; config.fb_location = CAMERA_FB_IN_DRAM; } } else { // Best option for face detection/recognition config.frame_size = FRAMESIZE_240X240;
if CONFIG_IDF_TARGET_ESP32S3
config.fb_count = 2;
endif
}
if defined(CAMERA_MODEL_ESP_EYE)
pinMode(13, INPUT_PULLUP); pinMode(14, INPUT_PULLUP);
endif
// 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; } sensor_t * s = esp_camera_sensor_get(); // initial sensors are flipped vertically and colors are a bit saturated 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 } // drop down frame size for higher initial frame rate if(config.pixel_format == PIXFORMAT_JPEG){ s->set_framesize(s, FRAMESIZE_QVGA); }
if defined(CAMERA_MODEL_M5STACK_WIDE) || defined(CAMERA_MODEL_M5STACK_ESP32CAM)
s->set_vflip(s, 1); s->set_hmirror(s, 1);
endif
if defined(CAMERA_MODEL_ESP32S3_EYE)
s->set_vflip(s, 1);
endif
// Setup LED FLash if LED pin is defined in camera_pins.h
if defined(LED_GPIO_NUM)
setupLedFlash(LED_GPIO_NUM);
endif
WiFi.begin(ssid, password); WiFi.setSleep(false); 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() { // Do nothing. Everything is done in another task by the web server delay(10000); }
So far, the modification has been made already. Replace with your code.
You made my day!!! Awesome. With your modification it work for me. Thanks a lot!
I face the same problem and have managed to fix it: my device is esp32cam from AI-thinker, and it turns out to be that i forgot to set the Pin of it which leads to this problem.
Hi, the problem is in the programming example camera web server
I modified the programming and managed to fix it
use this in the folder (camerawebserver.ino) if you are using arduino.ide
const char ssid = "CASA_DA_MARA"; const char password = "Maralian1234";
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"; 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; } } return res; } void startCameraServer();
void setup() { WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); //desativa o detector de brownout
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.grab_mode = CAMERA_GRAB_WHEN_EMPTY; config.fb_location = CAMERA_FB_IN_PSRAM; config.frame_size = FRAMESIZE_UXGA; config.jpeg_quality = 12; config.fb_count = 1; if(config.pixel_format == PIXFORMAT_JPEG){ if(psramFound()){ config.jpeg_quality = 10; config.fb_count = 2; config.grab_mode = CAMERA_GRAB_LATEST; } else { config.frame_size = FRAMESIZE_SVGA; config.fb_location = CAMERA_FB_IN_DRAM; } } else { // Best option for face detection/recognition config.frame_size = FRAMESIZE_240X240;
config.fb_count = 2;
}
// Inicia a câmera esp_err_t err = esp_camera_init(&config); if (err != ESP_OK) { Serial.printf("Camera init failed with error 0x%x", err); return; } // Conecta o WiFi WiFi.begin(ssid, password); while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); } Serial.println(""); Serial.println("WiFi connected");
Serial.print("Camera Stream Ready! Go to: http://"); Serial.print(WiFi.localIP());
// Start streaming web server startCameraServer(); } void loop() { delay(1); //nenhuma ação relevante é realizada no loop }
@maralian please always put sourcecode in three backticks :
```
hello, i'm tring to get image form ESP32-CAM using platformio. this is my fededback message:
E (2207) camera: Camera probe failed with error 0x105(ESP_ERR_NOT_FOUND) Camera init failed with error 0x105ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_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:13132 load:0x40080400,len:3036 entry 0x400805e4
and my platformio.ini:
[env:esp32dev] platform = espressif32 board = esp-wrover-kit framework = arduino monitor_speed = 115200
It's necessary set DBOARD_HAS_PSRAM?
I get the same issue , and figure out is is due to select the worng camera model. you just need update the .ino file with correct cam model.
Camera probe failed with error 0x105
In my case, it's caused by poor quality programmer/uploader (ESP32-CAM-MB). The female pin was bent. Sometimes it cause error 0x105, and sometimes success but show very bad quality videos.
When I changed to the other programmer, the problem was solved.
Is it too late to join in this discussion? I have a similar problem. Curiously, I get a different error if I flash it from a different PC; my guess is that the other one has an older set of libraries, or some such thing, rather than being the difference between machines.
On this one, I get:
E (543) camera: Camera probe failed with error 0x105(ESP_ERR_NOT_FOUND)
Camera init failed with error 0x105
On the other one I get:
[E][camera.c:1113] camera_probe(): Detected camera not supported.
[E][camera.c:1379] esp_camera_init(): Camera probe failed with error 0x20004
I'm also getting these warnings:
W (179) esp_psram: Virtual address not enough for PSRAM, map as much as we can. 4MB is mapped
W (301) i2c: This driver is an old driver, please migrate your application code to adapt `driver/i2c_master.h`
Is it too late to join in this discussion? I have a similar problem. Curiously, I get a different error if I flash it from a different PC; my guess is that the other one has an older set of libraries, or some such thing, rather than being the difference between machines.
On this one, I get:
E (543) camera: Camera probe failed with error 0x105(ESP_ERR_NOT_FOUND) Camera init failed with error 0x105
On the other one I get:
[E][camera.c:1113] camera_probe(): Detected camera not supported. [E][camera.c:1379] esp_camera_init(): Camera probe failed with error 0x20004
I'm also getting these warnings:
W (179) esp_psram: Virtual address not enough for PSRAM, map as much as we can. 4MB is mapped W (301) i2c: This driver is an old driver, please migrate your application code to adapt `driver/i2c_master.h`
Man, I was having the same problem. Use this reference to flash your code:
https://github.com/espressif/esp-iot-solution/tree/master/examples/camera/basic
It's work to me.
Thanks. That doesn't seem to work on mine: maybe my camera is dud. There is another one here somewhere. I'll try swapping them about a bit.
I have the esp32 cam and the first time I got it and used Arduino IDE for it didn't work so I returned it and got a new one and still have the problem but I'm about to try one of the solutions above
The problem is mostly caused by incorrectly defining camera pins. The esp32 wrover kit has a different camera pin configuration that the espcam by AI thinker.
The problem is mostly caused by incorrectly defining camera pins. The esp32 wrover kit has a different camera pin configuration that the espcam by AI thinker.
I would say "Often" rather than "Mostly", and I have tried both. Would it be a lot of work to write a sketch that runs through the options and reports back on which one is right? If it is the most common cause of this problem, then maybe it would be worth doing?
Or has somebody done it already?
After checking, I barely didn't provide enough power for the camera to run properly, and it drove me crazy hahaha
After checking, I barely didn't provide enough power for the camera to run properly, and it drove me crazy hahaha
I had one that wouldn't boot without a capacitor across the power rail. I reckoned that was a power issue, but I couldn't fathom the basis for the problem: I'm fairly sure the power supply was more than adequate.
- Used
#define CAMERA_MODEL_AI_THINKER
AND#define CAMERA_MODEL_ESP32_CAM_BOARD
This works for esp32-cam with ov2460 from AIThinker
I have this issue too and I need a solution as soon as possible, I don't really know how to fix this.
my board is the xiao esp32 s3 sense and it keeps on giving the cam init error: Camera init failed with error 0x105
this is the code:
// // WARNING!!! PSRAM IC required for UXGA resolution and high JPEG quality // Ensure ESP32 Wrover Module or other board with PSRAM is selected // Partial images will be transmitted if image exceeds buffer size // // You must select partition scheme from the board menu that has at least 3MB APP space. // Face Recognition is DISABLED for ESP32 and ESP32-S2, because it takes up from 15 // seconds to process single frame. Face Detection is ENABLED if PSRAM is enabled as well
// =================== // Select camera model // =================== //#define CAMERA_MODEL_WROVER_KIT // Has PSRAM // #define CAMERA_MODEL_ESP_EYE // Has PSRAM //#define CAMERA_MODEL_ESP32S3_EYE // Has PSRAM //#define CAMERA_MODEL_M5STACK_PSRAM // Has PSRAM //#define CAMERA_MODEL_M5STACK_V2_PSRAM // M5Camera version B Has PSRAM //#define CAMERA_MODEL_M5STACK_WIDE // Has PSRAM //#define CAMERA_MODEL_M5STACK_ESP32CAM // No PSRAM //#define CAMERA_MODEL_M5STACK_UNITCAM // No PSRAM //#define CAMERA_MODEL_M5STACK_CAMS3_UNIT // Has PSRAM //#define CAMERA_MODEL_AI_THINKER // Has PSRAM //#define CAMERA_MODEL_TTGO_T_JOURNAL // No PSRAM
// Espressif Internal Boards //#define CAMERA_MODEL_ESP32_CAM_BOARD //#define CAMERA_MODEL_ESP32S2_CAM_BOARD //#define CAMERA_MODEL_ESP32S3_CAM_LCD //#define CAMERA_MODEL_DFRobot_FireBeetle2_ESP32S3 // Has PSRAM //#define CAMERA_MODEL_DFRobot_Romeo_ESP32S3 // Has PSRAM
// =========================== // Enter your WiFi credentials // =========================== const char ssid = ""; const char password = "";
void startCameraServer(); void setupLedFlash(int pin);
void setup() { Serial.begin(115200); 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_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.frame_size = FRAMESIZE_UXGA; config.pixel_format = PIXFORMAT_JPEG; // for streaming //config.pixel_format = PIXFORMAT_RGB565; // for face detection/recognition config.grab_mode = CAMERA_GRAB_WHEN_EMPTY; config.fb_location = CAMERA_FB_IN_PSRAM; config.jpeg_quality = 12; config.fb_count = 1;
// if PSRAM IC present, init with UXGA resolution and higher JPEG quality // for larger pre-allocated frame buffer. if (config.pixel_format == PIXFORMAT_JPEG) { if (psramFound()) { config.jpeg_quality = 10; config.fb_count = 2; config.grab_mode = CAMERA_GRAB_LATEST; } else { // Limit the frame size when PSRAM is not available config.frame_size = FRAMESIZE_SVGA; config.fb_location = CAMERA_FB_IN_DRAM; } } else { // Best option for face detection/recognition config.frame_size = FRAMESIZE_240X240;
config.fb_count = 2;
}
pinMode(13, INPUT_PULLUP); pinMode(14, INPUT_PULLUP);
// 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; }
sensor_t *s = esp_camera_sensor_get(); // initial sensors are flipped vertically and colors are a bit saturated 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 } // drop down frame size for higher initial frame rate if (config.pixel_format == PIXFORMAT_JPEG) { s->set_framesize(s, FRAMESIZE_QVGA); }
s->set_vflip(s, 1); s->set_hmirror(s, 1);
s->set_vflip(s, 1);
// Setup LED FLash if LED pin is defined in camera_pins.h
setupLedFlash(LED_GPIO_NUM);
WiFi.begin(ssid, password); WiFi.setSleep(false);
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() { // Do nothing. Everything is done in another task by the web server delay(10000); }
thanks a lot!
This may be a hardware issue, check the I2C (SCCB) pins on the baseboard.
I ran a 12c check and it said nothing was connected to it
Is the power pin of the sensor normal? Two devices with normal power supply and correctly connected I2C pins should be able to communicate with each other.
how do i check the connections?
i got this error please i have to submit my project on 24 august
ets Jul 29 2019 12:21:46
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:4832 load:0x40078000,len:16460 load:0x40080400,len:4 load:0x40080404,len:3504 entry 0x400805cc E (358) esp_cor⸮⸮VW}⸮⸮⸮͡⸮ No core dump partition found! E (358) esp_core_dump_flash: No core dump partition found!
E (512) camera: Camera probe failed with error 0x105(ESP_ERR_NOT_FOUND) Camera init failed with error 0x105
i use arduino ide
- Used
#define CAMERA_MODEL_AI_THINKER
AND#define CAMERA_MODEL_ESP32_CAM_BOARD
This works for esp32-cam with ov2460 from AIThinker
I also did this hack:
AND
#define CAMERA_MODEL_ESP32_CAM_BOARD`And it worked for me too. I was searching for days and sent even back some ESP32-CAM back, but now I got one from a good provider and still had the problem. after this hack it worked to my surprise. I must say I use the programmerboard ESP32-CAM-MB and the ESP32-CAM together and connect it to an USB port and now I see an IP address and have acces to the camserver. I must still test it without the programmerboard.Thanks
This is late to the conversation, however I was experiencing many issues including memory. Strangle I was testing with two AI-thinkers, one working the other not. Compared the boot sequence and nothing apparent. Giving up I replaced the failing espcam. Wow, the same issue. I then out of frustration decided to replace the camera. Bugger me, the problem went away. Maybe I just did not seat the camera correctly, maybe a faulty camera, who cares it's resolved.
hello, i'm tring to get image form ESP32-CAM using platformio. this is my fededback message:
E (2207) camera: Camera probe failed with error 0x105(ESP_ERR_NOT_FOUND) Camera init failed with error 0x105ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_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:13132 load:0x40080400,len:3036 entry 0x400805e4
and my platformio.ini:
[env:esp32dev] platform = espressif32 board = esp-wrover-kit framework = arduino monitor_speed = 115200
It's necessary set DBOARD_HAS_PSRAM?