-
Notifications
You must be signed in to change notification settings - Fork 805
Description
The Problem
The ESP32-CAM device with an OV5640 camera fails to initialize with the official v16.0.0 firmware release, even though the release notes state that the camera is supported. The logs indicate a PID mismatch, where the firmware detects the OV5640 but then expects an OV3660.
This appears to be a bug in the pre-compiled firmware bundle for this hardware and camera combination. There is no user-configurable option in the config.ini file to manually set the camera model.
Hardware and Firmware
Device: Inland ESP32-CAM (Micro Center product 632692)
Camera: OV5640
Firmware Version: v16.0.0
PSRAM: Found 8MB PSRAM
Steps to Reproduce
Flash the v16.0.0 release firmware onto the Inland ESP32-CAM.
Power on the device.
Monitor the serial port log for startup messages.
Actual Behavior
The camera initialization fails. The device continuously attempts to initialize the camera before reverting to a reduced web interface. The following error messages are observed in the serial log:
I (2658) ov5640: Mismatch PID=0x3660
E (2658) camera: Detected camera not supported.
E (2658) camera: Camera probe failed with error 0x106(UNKNOWN ERROR)
Workaround
The issue does not appear in more recent nightly builds from the GitHub Actions page. Flashing a successful nightly build resolves the problem. This suggests a bug was present in the v16.0.0 official release firmware that was later patched in subsequent commits.
Version
16.0.0
Logfile
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:2
load:0x3fff0030,len:7664
load:0x40078000,len:15360
load:0x40080400,len:3744
entry 0x4008067c
I (27) boot: ESP-IDF 4.3.2 2nd stage bootloader
I (27) boot: compile time 20:02:47
I (27) boot: chip revision: 3
I (30) boot_comm: chip revision: 3, min. bootloader chip revision: 0
I (37) boot.esp32: SPI Speed : 40MHz
I (42) boot.esp32: SPI Mode : DIO
I (46) boot.esp32: SPI Flash Size : 4MB
I (51) boot: Enabling RNG early entropy source...
I (56) boot: Partition Table:
I (60) boot: ## Label Usage Type ST Offset Length
I (67) boot: 0 nvs WiFi data 01 02 00009000 00004000
I (75) boot: 1 otadata OTA data 01 00 0000d000 00002000
I (82) boot: 2 phy_init RF data 01 01 0000f000 00001000
I (89) boot: 3 ota_0 OTA app 00 10 00010000 001db000
I (97) boot: 4 ota_1 OTA app 00 11 001f0000 001db000
I (104) boot: End of partition table
I (109) boot_comm: chip revision: 3, min. application chip revision: 0
I (116) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=335f0h (210416) map
I (205) esp_image: segment 1: paddr=00043618 vaddr=3ffb0000 size=04ab0h ( 19120) load
I (213) esp_image: segment 2: paddr=000480d0 vaddr=40080000 size=07f48h ( 32584) load
I (227) esp_image: segment 3: paddr=00050020 vaddr=400d0020 size=11eb14h (1174292) map
I (677) esp_image: segment 4: paddr=0016eb3c vaddr=40087f48 size=13580h ( 79232) load
I (725) boot: Loaded app from partition at offset 0x10000
I (725) boot: Disabling RNG early entropy source...
I (737) quad_psram: This chip is ESP32-D0WD
I (737) esp_psram: Found 8MB PSRAM device
I (738) esp_psram: Speed: 40MHz
I (738) esp_psram: PSRAM initialized, cache is in low/high (2-core) mode.
W (745) esp_psram: Virtual address not enough for PSRAM, map as much as we can. 4MB is mapped
I (753) cpu_start: Multicore app
I (1636) esp_psram: SPI SRAM memory test OK
I (1645) cpu_start: Pro cpu start user code
I (1645) cpu_start: cpu freq: 160000000 Hz
I (1645) app_init: Application information:
I (1646) app_init: Project name: AI-on-the-edge
I (1650) app_init: App version: v16.0.0
I (1654) app_init: Compile time: Mar 15 2025 13:31:36
I (1659) app_init: ELF file SHA256: 2a3f258f4...
I (1664) app_init: ESP-IDF: 5.3.1
I (1668) efuse_init: Min chip rev: v0.0
I (1672) efuse_init: Max chip rev: v3.99
I (1676) efuse_init: Chip rev: v3.1
I (1680) heap_init: Initializing. RAM available for dynamic allocation:
I (1686) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (1691) heap_init: At 3FFBC580 len 00023A80 (142 KiB): DRAM
I (1696) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (1702) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (1708) heap_init: At 4009B4C8 len 00004B38 (18 KiB): IRAM
I (1713) esp_psram: Adding pool of 4081K of PSRAM memory to heap allocator
I (1721) spi_flash: detected chip: generic
I (1723) spi_flash: flash io: dio
W (1728) i2c: This driver is an old driver, please migrate your application code to adapt `driver/i2c_master.h`
I (1748) main_task: Started on CPU0
I (1758) esp_psram: Reserving pool of 40K of internal memory for DMA/internal allocations
I (1758) main_task: Calling app_main()
I (1758) MAIN:
================ Start app_main =================
I (1868) MAIN: =================================================
I (1878) MAIN: ==================== Start ======================
I (1898) MAIN: =================================================
I (1908) SDCARD: Basic R/W check started...
I (1978) SDCARD: Basic R/W check successful
I (2008) OTA: Start CheckOTAUpdateCheck...
I (2018) OTA: SHA-256 for the partition table: : 9d4a2809ae90fb20709a8ca3dd3ac3462e1e73286bcd31b689060c91de06fa3a
I (2038) OTA: SHA-256 for bootloader: : 4a9573dafac5d5c79c43e5a356568332da3a99dd2e220da6ceeadc96d32708a2
I (2438) OTA: SHA-256 for current firmware: : 6b7b421ffc456d7032c99d64763181a1b80020d93b597ad72b73495dd4e56f86
I (2468) MAIN: PSRAM size: 8388608 byte (8MB / 64MBit)
I (2488) MAIN: Total heap: 4378543 byte
I (2598) gpio: GPIO[25]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:2
I (2598) cam_hal: cam init ok
I (2598) sccb: pin_sda 26 pin_scl 27
I (2598) sccb: sccb_i2c_port=1
I (2598) gpio: GPIO[32]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (2638) camera: Detected camera at address=0x3c
I (2638) ov5640: Mismatch PID=0x3660
E (2638) camera: Detected camera not supported.
E (2638) camera: Camera probe failed with error 0x106(UNKNOWN ERROR)
E (2738) CAM: Camera Init Failed
W (4738) MAIN: Camera init failed (0x106), retrying...
I (4848) gpio: GPIO[25]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:2
I (4848) cam_hal: cam init ok
I (4848) sccb: pin_sda 26 pin_scl 27
I (4848) sccb: sccb_i2c_port=1
I (4848) gpio: GPIO[32]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (4888) camera: Detected camera at address=0x3c
I (4888) ov5640: Mismatch PID=0x3660
E (4888) camera: Detected camera not supported.
E (4888) camera: Camera probe failed with error 0x106(UNKNOWN ERROR)
E (4988) CAM: Camera Init Failed
E (6988) MAIN: Camera init failed (0x106)! Check camera module and/or proper electrical connection
E (6998) HELPER: New System Status: 0x00000004
I (7098) SNTP: TimeServer not defined, using default: pool.ntp.org
I (7118) SNTP: Configuring NTP Client...
I (7138) SNTP: Time zone set to CET-1CEST,M3.5.0,M10.5.0/3
I (7148) SNTP: time zone: +0100 Delta to UTC: 3600 seconds
I (7168) SNTP: The local time is unknown, starting with 1970-01-01 01:00:05
I (7178) SNTP: Once the NTP server provides a time, we will switch to that one
I (7228) MAIN: CPU frequency: 160 MHz
I (7248) SDCARD: Folder/file presence check started...
I (7448) SDCARD: Folder/file presence check successful
I (7478) MAIN: Tag: 'v16.0.0', Release: v16.0.0 (Commit: f542d84), Date/Time: 2025-03-15 13:28, Web UI: Release: v16.0.0 (Commit: f542d84)
I (7538) MAIN: Reset reason: Power-on event (or reset button)
I (7558) WLANINI: SSID: Roys-2.4G
I (7578) WLANINI: Password: XXXXXXXX
I (7598) WLANINI: RSSIThreshold: 0
I (7618) MAIN: WLAN config loaded, init WIFI...
I (7628) WIFI: Automatic interface config --> Use DHCP service
I (7658) wifi:wifi driver task: 3ffcf4c4, prio:23, stack:6144, core=0
I (7668) wifi:wifi firmware version: ccaebfa
I (7668) wifi:wifi certification version: v7.0
I (7668) wifi:config NVS flash: enabled
I (7668) wifi:config nano formating: enabled
I (7668) wifi:Init data frame dynamic rx buffer num: 16
I (7678) wifi:Init static rx mgmt buffer num: 5
I (7678) wifi:Init management short buffer num: 32
I (7688) wifi:Init static tx buffer num: 16
I (7688) wifi:Init tx cache buffer num: 16
I (7688) wifi:Init static rx buffer size: 1600
I (7698) wifi:Init static rx buffer num: 16
I (7698) wifi:Init dynamic rx buffer num: 16
I (7708) wifi_init: rx ba win: 16
I (7708) wifi_init: accept mbox: 6
I (7708) wifi_init: tcpip mbox: 32
I (7718) wifi_init: udp mbox: 6
I (7718) wifi_init: tcp mbox: 6
I (7718) wifi_init: tcp tx win: 5760
I (7718) wifi_init: tcp rx win: 5760
I (7728) wifi_init: tcp mss: 1440
I (7728) wifi_init: WiFi/LWIP prefer SPIRAM
I (7728) wifi_init: WiFi IRAM OP enabled
I (7738) wifi_init: WiFi RX IRAM OP enabled
W (7738) wifi:Password length matches WPA2 standards, authmode threshold changes from OPEN to WPA2
I (7748) phy_init: phy_version 4830,54550f7,Jun 20 2024,14:22:08
I (7828) wifi:mode : sta (68:25:dd:2d:e3:3c)
I (7828) wifi:enable tsf
I (7828) WIFI: Set hostname to: watermeter
I (7848) WIFI: Init successful
I (10248) wifi:new:<1,0>, old:<1,0>, ap:<255,255>, sta:<1,0>, prof:1, snd_ch_cfg:0x0
I (10248) wifi:state: init -> auth (0xb0)
I (10418) wifi:state: auth -> assoc (0x0)
I (10448) wifi:state: assoc -> run (0x10)
I (11448) wifi:connected with Roys-2.4G, aid = 45, channel 1, BW20, bssid = 24:f5:a2:c1:1d:49
I (11458) wifi:security: WPA2-PSK, phy: bg, rssi: -77
I (11458) wifi:pm start, type: 1
I (11458) wifi:dp: 1, bi: 102400, li: 3, scale listen interval from 307200 us to 307200 us
I (11468) wifi:dp: 2, bi: 102400, li: 4, scale listen interval from 307200 us to 409600 us
I (11478) wifi:AP's beacon interval = 102400 us, DTIM period = 2
I (11478) WIFI: Connected to: Roys-2.4G, RSSI: -72
I (12968) esp_netif_handlers: sta ip: 192.168.54.100, mask: 255.255.0.0, gw: 192.168.0.1
I (12968) WIFI: Assigned IP: 192.168.54.100
I (27868) MAIN: Device info: CPU cores: 2, Chip revision: 301
I (27878) MAIN: SD card info: Name: SD, Capacity: 7618MB, Free: 7598MB
I (29898) MAIN SERVER: Starting server on port: '80'
I (29898) MAIN SERVER: Registering URI handlers
I (29898) MAINCTRL: server_main_flow_task - Registering URI handlers
I (29898) OTA: Registering URI handlers
I (29898) GPIO: start GpioHandler
I (29908) GPIO: register GPIO Uri
I (29908) GPIO: server_GPIO - Registering URI handlers
E (29908) MAIN: Initialization failed. Flow task start aborted. Loading reduced web interface...
I (29938) main_task: Returned from app_main()
I (41788) SNTP: =================================================
I (41808) SNTP: ==================== Start ======================
I (41818) SNTP: == Logs before time sync -> log_1970-01-01.txt ==
I (41838) SNTP: Time is synced with NTP Server pool.ntp.org: 2025-09-01 18:10:34
I (3667828) SNTP: Time is synced with NTP Server pool.ntp.org: 2025-09-01 19:10:43
>Expected Behavior
The camera should be detected and initialized successfully, allowing the device to begin the main workflow.
Screenshots
No response
Additional Context
No response