Trying ESP32 Webcam - again

88 views
Skip to first unread message

Ron L

unread,
Jan 22, 2025, 7:26:29 PMJan 22
to TasmotaUsers
Have a ESP32 (WROOM, Wifi, Blutooth) flashed with Tasmota32-Webcam set up with the AiThinker Webcam Template.  Have a OV2640 camera module and not any SD Card module (not needed).  The OV2640 only has a PCLK pin for Output back to the ESP32 (pin22) and does not have a XCLK pin since it has its own 12mhz frequency chip on board.  Powering with 2.5 amp 5v supply and a separate BUC converter for the 3.3v to the camera.
Wired as follows:
CAM_DATA 1 thru 8 to D0 thru D7
Cam_PWDN to PWDN
Cam__PCLK to CLK
Cam_HREF to HREF
Cam_VSYNC to VSYNC
Cam_SIOD to SDA
Cam SIOC to SCL
3.3v to 3.3v
GND to GND

ESP32 boots fine and I can see where WcInit shows to start.  Wc command shows the Stream is running.  But, when I go the the stream (http://ip_address:81/stream) all I get is a browser page that is empty/blank.  Have tried with the RTSP stream as well.  Tried both with VLC Media Player as well.

Only thing I get in the ESP32 console is each time I try to access the stream, when I run WcStats it will increment the CamFail counter.  In VLC, the log on RTSP said "connection refused by peer".  VLS log on http stream says "cannot peek".

Looking for some help :)

Here is ESP32 console and pinout of the camera.

00:00:00.002 HDW: ESP32-D0WD-V3 v3.1
00:00:00.032 UFS: FlashFS mounted with 304 kB free
00:00:00.051 CFG: Loaded from File, Count 82
00:00:00.060 QPC: Count 1
00:00:00.111 BRY: Berry initialized, RAM used 3780 bytes
00:00:00.123 Project tasmota - Tasmota Version 14.4.1(tasmota32-WEBCAM)-3_1_0(2025-01-22T14:32:03)
00:00:01.001 WIF: Connecting to AP1 ...
00:00:03.577 WIF: Connected
00:00:03.785 HTP: Web server active on tasmota-xxx with IP address xxx
00:00:03.830 RUL: SYSTEM#BOOT performs 'WcInit'
00:00:03.836 RSL: RESULT = {"WCInit":"Done"}
22:09:43.957 QPC: Reset
22:09:44.955 RSL: STATE = {"Time":"2025-01-22T22:09:44","Uptime":"0T00:00:08","UptimeSec":8,"Heap":136,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":0,"Berry":{"HeapUsed":3,"Objects":42},"Wifi":{"AP":1,"SSId":"DEFCON-2","BSSId":"2C:56:DC:56:97:C8","Channel":6,"Mode":"HT40","RSSI":100,"Signal":-48,"LinkCount":1,"Downtime":"0T00:00:04"}}
22:10:24.991 CMD: wcstats
22:10:24.995 RSL: RESULT = {"WCStats":{"FPS":0,"CamFail":1,"JpegFail":0,"ClientFail":0}}
22:10:36.991 CMD: wcstats
22:10:36.995 RSL: RESULT = {"WCStats":{"FPS":0,"CamFail":2,"JpegFail":0,"ClientFail":0}}
22:11:56.843 CMD: wc
22:11:56.847 RSL: RESULT = {"WC":{"Stream":1,"Resolution":8,"Mirror":0,"Flip":0,"Saturation":0,"Brightness":0,"Contrast":0,"SpecialEffect":0,"AWB":1,"WBMode":0,"AWBGain":1,"AEC":1,"AECValue":204,"AELevel":0,"AECDSP":1,"AGC":1,"AGCGain":5,"GainCeiling":0,"GammaCorrect":1,"LensCorrect":1,"WPC":1,"DCW":1,"BPC":0,"Colorbar":1,"Feature":1,"Auth":0,"Rtsp":0}}

OV2640 Pinout.jpg

Ron L

unread,
Jan 22, 2025, 9:46:48 PMJan 22
to TasmotaUsers
Reflashed with Tasmota32-Webcam (started over) and now I am back to getting this error in console log after boot.  I will get back to reading on the web.

00:00:07.659 RUL: SYSTEM#BOOT performs 'WcInit'
00:00:07.663 CAM: InitErr 0x103 try 1
00:00:07.810 CAM: InitErr 0xffffffff try 2
00:00:07.955 CAM: InitErr 0xffffffff try 3
00:00:07.955 CAM: InitErr 0xffffffff
00:00:08.118 CAM: InitErr 0xffffffff try 1
00:00:08.279 CAM: InitErr 0xffffffff try 2
00:00:08.440 CAM: InitErr 0xffffffff try 3
00:00:08.440 CAM: InitErr 0xffffffff
00:00:08.442 RSL: RESULT = {"WCInit":"Done"}
03:38:59.340 QPC: Reset

I initially got these errors on my initial setup, but since I do not have a SD Card, when I took the SD Card related configuration pins out of the Template (set them to 'user'), it did away with these InitErr's.
I have taken them out again this time, but errors persist.

Philip Knowles

unread,
Jan 23, 2025, 7:01:29 AMJan 23
to Ron L, TasmotaUsers
The Blakadder template is
{"NAME":"AITHINKER CAM","GPIO":[4992,1,672,1,416,5088,1,1,1,6720,736,704,1,1,5089,5090,0,5091,5184,5152,0,5120,5024,5056,0,0,0,0,4928,576,5094,5095,5092,0,0,5093],"FLAG":0,"BASE":2}

The Lilygo with OV2640 one in Tasmota ESP32 Devices - Tasmota
{"NAME":"TTGO_V05","GPIO":[1,1,1,1,5090,5088,1,1,5056,5024,5089,5091,1,1,5092,5184,0,640,608,5093,0,5152,4928,5120,0,0,0,0,4992,160,32,1,5094,0,0,5095],"FLAG":0,"BASE":2} 
(which might just be using different GPIOs)
It would be useful to share the actual configuration screenshot (and wiring) as ESP32s don't really have D0-D7


From: sonof...@googlegroups.com <sonof...@googlegroups.com> on behalf of Ron L <rgl...@gmail.com>
Sent: 23 January 2025 02:46
To: TasmotaUsers <sonof...@googlegroups.com>
Subject: Re: Trying ESP32 Webcam - again
 
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/sonoffusers/fbedfd16-7c01-4404-9ac8-a47330ad8005n%40googlegroups.com.

Ron L

unread,
Jan 23, 2025, 10:08:40 AMJan 23
to TasmotaUsers
Yes, I compared the AiThinker and Lilygo templates and decided the AiThinker was the closest match for my OV2640.  In fact, I believe the default WebCam template in the Tasmota32-Webcam FW is the same as the AiThinker template.  I loaded the AiThinker template to my device but get the same results as my latest post (wc init errors).  I then changed all unused pins associated with the SD card back to user just to reduce confusion for me since I don't have a SD card reader in my setup.

Regarding my reference to D0 thru D7 - those are the 8 data pins on the OV2640.  That is, I connected ESP32 pins configured as CAM_DATA 1 thru 8 to OV2640 pins D0 thru D7 respectively.  Here is my current template:

{"NAME":"AITHINKER CAM","GPIO":[4992,1,0,1,0,5088,1,1,1,0,1,1,1,1,5089,5090,0,5091,5184,5152,0,5120,5024,5056,0,0,0,0,4928,576,5094,5095,5092,0,0,5093],"FLAG":0,"BASE":2}

I have double and triple checked my wiring, but now will rewire it using a different batch of wires.

Philip Knowles

unread,
Jan 23, 2025, 10:45:53 AMJan 23
to Ron L, TasmotaUsers
Can you send a screenshot of the actual configuration page (not the template) before I go down a rabbit hole.


Sent: 23 January 2025 15:08

Ron L

unread,
Jan 23, 2025, 10:56:49 AMJan 23
to TasmotaUsers
Screenshot 2025-01-23 095530.jpg

Philip Knowles

unread,
Jan 23, 2025, 12:33:00 PMJan 23
to Ron L, TasmotaUsers
So, this is what Blakadder has. There is an issue in Tasmota which says the OV2640 needs to use pSRAM (which uses SPI) and doesn't appear to be available in the ESP32-WROOM and another with the same symptoms with a link to several issues in ESPhome with boards having incorrect voltage regulators. Might be worth trying an ESP32-WROVER
GPIO #
Component
GPIO00
CAM_XCLK
GPIO01
User
GPIO02
SPI MISO
GPIO03
User
GPIO04
PWM 1
GPIO05
CAM_DATA 1
GPIO09
User
GPIO10
User
GPIO12
User
GPIO13
SDCard CS
GPIO14
SPI CLK
GPIO15
SPI MOSI
GPIO16
User
GPIO17
User
GPIO18
CAM_DATA 2
GPIO19
CAM_DATA 3
GPIO20
None
GPIO21
CAM_DATA 4
GPIO22
CAM_PCLK
GPIO23
CAM_HREF
GPIO24
None
GPIO25
CAM_VSYNC
GPIO26
CAM_SIOD
GPIO27
CAM_SIOC
GPIO32
CAM_PWDN
GPIO33
LedLinki
GPIO34
CAM_DATA 7
GPIO35
CAM_DATA 8
GPIO36
CAM_DATA 5
GPIO37
None
GPIO38
None
GPIO39
CAM_DATA 6



Sent: 23 January 2025 15:56

Ron L

unread,
Jan 23, 2025, 12:45:50 PMJan 23
to TasmotaUsers
I agree totally.  In fact, I just placed an order for the Freenove ESP32-WROVER webcam kit and it does have PSRAM.

Thanks for your time.

Ron L

unread,
Jan 31, 2025, 9:31:09 AMJan 31
to TasmotaUsers
To provide closure on this topic: The Freenove ESP32-WROVER webcam kit works great using the Freenove WROVER template shown in Tasmota documentation.
The kit comes with a download link for several tutorials in C and Python.  I used the tutorial to prove out the hardware first - then I flashed Tasmota.32-Webcam.
What I really like about the Freenove is that it still has all unassigned GPIO available for other devices in addition to having a webcam; although good chance you will have to build your own firmware depending on what devices you want to add.  I have mine configured for a Pet Feeder using the OV2640 Webcam and a Nema 17 A4988 Stepper Motor driver.


Reply all
Reply to author
Forward
0 new messages