esp32cam-rtsp
esp32cam-rtsp copied to clipboard
M5Stack UnitCam S3
Hi I have not mastered Platform IO, any chance that there is an Arduino version??
I am trying to load this onto a M5Stack UnitCam S3 to stream to HomeKit via HomeBrigde FFMPEG.
thanks.
I have got the Platform IO working for this but having issues building for the M5Satck CAMS3 Unit. It builds but doe snot find the camera on running. any tips on what to hang in INI or PlatformIO to get it to build??
Hi cohen,
Use the develop version. I do not own such a camera but take a look at the include/camera_config.h. There are the pins defined to connect to the camera. Something might be wrong there...
I did use the Develop version. ill look into the Camera config for the pins. thanks
Yes, good luck, the develop version is an attempt to get it also running on other platforms. This was required for the seeed_xiao_esp32s3 that uses the esp32s3. Not everything has been tested so help is very welcome. Make a PR if you have suggestions!
will do nice code by the way.
so I use this Env default_envs = seeed_xiao_esp32s3
it compiles and loads for my M5camS3 Unit, I can get the config page and log into my wifi, but as you say the Camera Config might be incorrect.
I looked at the pins and the M5 docs
https://docs.m5stack.com/en/unit/Unit-CamS3 https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/unit/OV2640DS_en.pdf https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/products/unit/Unit-CamS3/ESP32-S3-WROOM-1-N16R8.pdf
but I really have no idea what to change on this:- any help??? would be appreciated, thanks constexpr camera_config_t xiao_esp32s3_camera_settings = { .pin_pwdn = -1, .pin_reset = -1, .pin_xclk = 10, .pin_sscb_sda = 40, .pin_sscb_scl = 39, .pin_d7 = 48, .pin_d6 = 11, .pin_d5 = 12, .pin_d4 = 14, .pin_d3 = 16, .pin_d2 = 18, .pin_d1 = 17, .pin_d0 = 15, .pin_vsync = 38, .pin_href = 47, .pin_pclk = 13, .xclk_freq_hz = 20000000, .ledc_timer = LEDC_TIMER_0, .ledc_channel = LEDC_CHANNEL_0, .pixel_format = PIXFORMAT_JPEG, // for streaming .frame_size = FRAMESIZE_UXGA, .jpeg_quality = 12, .fb_count = 2, .fb_location = CAMERA_FB_IN_PSRAM, .grab_mode = CAMERA_GRAB_LATEST};
Hiconstexpr camera_config_t m5stack_camera_settings = { I added the settings. Just do a pull and they should be there if you build the m5stack
Thanks. Just to confirm I am using the Env constexpr camera_config_t xiao_esp32s3_camera_settings = { as this is a ESP32S3 the only one that works for my device. If you change the other one, will it help? I downloaded the new file and it did not help??
I built using the default_envs = m5stack_esp32cam in the Platformio . ini but got this error A fatal error occurred: This chip is ESP32-S3 not ESP32. Wrong --chip argument? only the default_envs = seeed_xiao_esp32s3 is esp32s3 the tip my camera has. thanks
Maybe board is off... I think this is a new version and needs to be added What do you use for the board?
It's all one device. Board and camera together. If I understand your question.
I want to use it as home security camera. It's small.
Sent from my iPhone
On 28 Jan 2024, at 22:55, Rene @.***> wrote:
Maybe board is off... I think this is a new version and needs to be added What do you use for the board?
— Reply to this email directly, view it on GitHubhttps://github.com/rzeldent/esp32cam-rtsp/issues/104#issuecomment-1913570809, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEECUMCY46BHCTN6ANJPQULYQY4DJAVCNFSM6AAAAABCN5U57OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJTGU3TAOBQHE. You are receiving this because you authored the thread.Message ID: @.***>
Added it to the project, development branch, just uncomment in the platformio.ini the board...
thanks ill try it out in the morning. appreciate it.
No guarantees, but maybe your fiddling will make it work?
Thanks for your help. I get a panic after loading. I set the ini file to "default_envs = m5stack_unitcams3" it complies and transfers OK. I set the device target to esp32s3. this is the panic from the Serial Monitor
Rebooting...
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x4209ed52
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x44c
load:0x403c9700,len:0xbd8
load:0x403cc700,len:0x2a80
entry 0x403c98d0
Config version: 1.6
Config size: 271
Loading configurations
[iwcAll]
|-- [iwcSys]
| |-- 'iwcThingName' with value: 'ESP32CAM-RTSP-3882503bdaec'
| |-- 'iwcApPassword' with value:
Core 1 register dump:
PC : 0x4204ab86 PS : 0x00060830 A0 : 0x82043cc4 A1 : 0x3fcebcf0
A2 : 0x3fcab4a0 A3 : 0x3fc9cc80 A4 : 0xffff8fff A5 : 0x3c0c38c8
A6 : 0x00001000 A7 : 0x3c0c3920 A8 : 0x00000000 A9 : 0x3fcebcd0
A10 : 0x00000080 A11 : 0x00000001 A12 : 0x00000000 A13 : 0x3fcab4fc
A14 : 0x00000008 A15 : 0x00000005 SAR : 0x00000015 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000 LBEG : 0x400570e8 LEND : 0x400570f3 LCOUNT : 0x00000000
Backtrace: 0x4204ab83:0x3fcebcf0 0x42043cc1:0x3fcebd40 0x42043812:0x3fcebd70 0x4201299d:0x3fcebdc0 0x42005a66:0x3fcebde0 0x42005ea8:0x3fcebee0 0x420160e2:0x3fcebf70
ELF
end of error.
the build output if it helps.
Building in release mode Retrieving maximum program size .pio/build/m5stack_unitcams3/firmware.elf Checking size .pio/build/m5stack_unitcams3/firmware.elf Advanced Memory Usage is available via "PlatformIO Home > Project Inspect" RAM: [=== ] 26.2% (used 85732 bytes from 327680 bytes) Flash: [===== ] 47.6% (used 935129 bytes from 1966080 bytes) Configuring upload protocol... AVAILABLE: cmsis-dap, esp-bridge, esp-builtin, esp-prog, espota, esptool, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa CURRENT: upload_protocol = esptool Looking for upload port... Using manually specified: /dev/cu.usbmodem24301 Uploading .pio/build/m5stack_unitcams3/firmware.bin esptool.py v4.5.1 Serial port /dev/cu.usbmodem24301 Connecting... Chip is ESP32-S3 (revision v0.2) Features: WiFi, BLE Crystal is 40MHz MAC: ec:da:3b:50:82:38 Uploading stub... Running stub... Stub running... Changing baud rate to 921600 Changed. Configuring flash size... Flash will be erased from 0x00000000 to 0x00003fff... Flash will be erased from 0x00008000 to 0x00008fff... Flash will be erased from 0x0000e000 to 0x0000ffff... Flash will be erased from 0x00010000 to 0x000f4fff... Compressed 15104 bytes to 10401... Writing at 0x00000000... (100 %) Wrote 15104 bytes (10401 compressed) at 0x00000000 in 0.2 seconds (effective 503.1 kbit/s)... Hash of data verified. Compressed 3072 bytes to 146... Writing at 0x00008000... (100 %) Wrote 3072 bytes (146 compressed) at 0x00008000 in 0.0 seconds (effective 527.6 kbit/s)... Hash of data verified. Compressed 8192 bytes to 47... Writing at 0x0000e000... (100 %) Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 696.9 kbit/s)... Hash of data verified. Compressed 935488 bytes to 592595... Writing at 0x00010000... (2 %) Writing at 0x0001dd88... (5 %) Writing at 0x000290cb... (8 %) Writing at 0x0003163c... (10 %) Writing at 0x0003f2fd... (13 %) Writing at 0x00045c9d... (16 %) Writing at 0x0004bd0f... (18 %) Writing at 0x00052324... (21 %) Writing at 0x0005823c... (24 %) Writing at 0x0005d8ae... (27 %) Writing at 0x00062d05... (29 %) Writing at 0x00067e94... (32 %) Writing at 0x0006cc89... (35 %) Writing at 0x00071cfb... (37 %) Writing at 0x00076b4f... (40 %) Writing at 0x0007bb02... (43 %) Writing at 0x0008097e... (45 %) Writing at 0x000860d4... (48 %) Writing at 0x0008c8ff... (51 %) Writing at 0x00091aba... (54 %) Writing at 0x00096ce6... (56 %) Writing at 0x0009c9d4... (59 %) Writing at 0x000a1783... (62 %) Writing at 0x000a6779... (64 %) Writing at 0x000ab799... (67 %) Writing at 0x000b0c2e... (70 %) Writing at 0x000b6068... (72 %) Writing at 0x000bb7ed... (75 %) Writing at 0x000c1294... (78 %) Writing at 0x000c683c... (81 %) Writing at 0x000cbcea... (83 %) Writing at 0x000d4931... (86 %) Writing at 0x000dc918... (89 %) Writing at 0x000e2aa4... (91 %) Writing at 0x000e8047... (94 %) Writing at 0x000ed811... (97 %) Writing at 0x000f362a... (100 %) Wrote 935488 bytes (592595 compressed) at 0x00010000 in 6.8 seconds (effective 1100.6 kbit/s)... Hash of data verified.
Leaving... Hard resetting via RTS pin... ====================================================== [SUCCESS] Took 12.59 seconds ======================================================
Environment Status Duration
m5stack_unitcams3 SUCCESS 00:00:12.590 ====================================================== 1 succeeded in 00:00:12.590 ======================================================
- Terminal will be reused by tasks, press any key to close it.
Could you add the exception decoder in the platformio.ini? https://community.platformio.org/t/how-do-i-use-esp32-exception-decoder/22789/2
will do.
Its in the INI file already
line 36 of the ini monitor_filters = log2file, time, default, esp32_exception_decoder
I get the following Build warning. /Users/andrew/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-uart.c: In function 'uartSetPins': /Users/andrew/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-uart.c:153:9: warning: 'return' with no value, in function returning non-void return; ^~~~~~ /Users/andrew/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-uart.c:149:6: note: declared here bool uartSetPins(uint8_t uart_num, int8_t rxPin, int8_t txPin, int8_t ctsPin, int8_t rtsPin)
from Problems screen
'return' with no value, in function returning non-void [{ "resource": "/Users/andrew/Documents/Arduino/ESP/esp32cam-rtsp-main-Dev-V2/esp32cam-rtsp-develop/Users/andrew/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-uart.c", "owner": "cpp", "severity": 4, "message": "'return' with no value, in function returning non-void", "startLineNumber": 153, "startColumn": 9, "endLineNumber": 153, "endColumn": 9 }]
[env:m5stack_unitcams3] board = esp32s3box build_flags = -DBOARD_M5STACK_UNITCAMS3 -DBOARD_HAS_PSRAM -DCORE_DEBUG_LEVEL=3
tried to set a debug level not sure where it prints out?
Here is the latest Panic message with a little more detail. Just after this command it fails,
[ 235][I][main.cpp:232] initialize_camera(): Frame duration: 200 ms
Rebooting...
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x4209f93a
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x44c
load:0x403c9700,len:0xbd8
load:0x403cc700,len:0x2a80
entry 0x403c98d0
[ 205][I][esp32-hal-psram.c:96] psramInit(): PSRAM enabled
[ 224][I][main.cpp:311] setup(): CPU Freq: 240 Mhz, 2 core(s)
[ 225][I][main.cpp:312] setup(): Free heap: 289836 bytes
[ 225][I][main.cpp:313] setup(): SDK version: v4.4.6-dirty
[ 226][I][main.cpp:314] setup(): Board: M5Stack UnitCamS3
[ 226][I][main.cpp:315] setup(): Starting ESP32CAM-RTSP...
Config version: 1.6
Config size: 271
Loading configurations
[iwcAll]
|-- [iwcSys]
| |-- 'iwcThingName' with value: 'ESP32CAM-RTSP-3882503bdaec'
| |-- 'iwcApPassword' with value:
Core 1 register dump:
PC : 0x4204b676 PS : 0x00060830 A0 : 0x820447b4 A1 : 0x3fcebce0
A2 : 0x3fcab4a0 A3 : 0x3fc9cc80 A4 : 0xffff8fff A5 : 0x3c0c42d0
A6 : 0x00001000 A7 : 0x3c0c4328 A8 : 0x00000000 A9 : 0x3fcebcc0
A10 : 0x00000080 A11 : 0x00000001 A12 : 0x00000000 A13 : 0x3fcab4fc
A14 : 0x00000008 A15 : 0x00000005 SAR : 0x00000015 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000 LBEG : 0x400570e8 LEND : 0x400570f3 LCOUNT : 0x00000000
Backtrace: 0x4204b673:0x3fcebce0 0x420447b1:0x3fcebd30 0x42044302:0x3fcebd60 0x420131dd:0x3fcebdb0 0x42005cda:0x3fcebdd0 0x4200628c:0x3fcebee0 0x42016b5e:0x3fcebf70
Panic with Verbose Debug on.
Rebooting...
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x420a1792
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x44c
load:0x403c9700,len:0xbd8
load:0x403cc700,len:0x2a80
entry 0x403c98d0
[ 196][V][WiFiServer.h:42] WiFiServer(): WiFiServer::WiFiServer(port=80, ...)
[ 196][V][WebServer.cpp:87] WebServer(): WebServer::Webserver(port=80)
[ 209][I][esp32-hal-psram.c:96] psramInit(): PSRAM enabled
[ 228][I][main.cpp:311] setup(): CPU Freq: 240 Mhz, 2 core(s)
[ 229][I][main.cpp:312] setup(): Free heap: 289836 bytes
[ 230][I][main.cpp:313] setup(): SDK version: v4.4.6-dirty
[ 230][I][main.cpp:314] setup(): Board: M5Stack UnitCamS3
[ 231][I][main.cpp:315] setup(): Starting ESP32CAM-RTSP...
Config version: 1.6
Config size: 271
Loading configurations
[iwcAll]
|-- [iwcSys]
| |-- 'iwcThingName' with value: 'ESP32CAM-RTSP-3882503bdaec'
| |-- 'iwcApPassword' with value:
Core 1 register dump:
PC : 0x4204d476 PS : 0x00060e30 A0 : 0x820465b4 A1 : 0x3fcebce0
A2 : 0x3fcab4a0 A3 : 0x3fc9cc80 A4 : 0xffff8fff A5 : 0x3c0c55cc
A6 : 0x00001000 A7 : 0x3c0c5624 A8 : 0x00000000 A9 : 0x3fcebcc0
A10 : 0x00000080 A11 : 0x00000001 A12 : 0x00000000 A13 : 0x3fcab4fc
A14 : 0x00000008 A15 : 0x00000005 SAR : 0x00000015 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000 LBEG : 0x400570e8 LEND : 0x400570f3 LCOUNT : 0x00000000
Backtrace: 0x4204d473:0x3fcebce0 0x420465b1:0x3fcebd30 0x42046102:0x3fcebd60 0x42014ef9:0x3fcebdb0 0x4200608e:0x3fcebdd0 0x420066f0:0x3fcebee0 0x4201891a:0x3fcebf70
@rzeldent I have tried a few things around MAIN - LINE 232, but to no effect. any ideas what is causing the Panic? thanks
Hi cohen,
You need to add the line for the exception decoder. This will make the backtrace readable..
can you advise what to add and where? is that in ini file or somewhere else? sorry never done this/ thanks
Add the line:
monitor_filters = esp32_exception_decoder
in the platformio.ini file
Its in the INI file already
line 36 of the ini monitor_filters = log2file, time, default, esp32_exception_decoder
only thing did not do is.
set build type to debug instead of release by adding build_type = debug to your platformio.ini (https://community.platformio.org/t/cannot-get-esp32-exception-decoder-to-work/37588)
I think it only works if the other filters are not present...
Tried to Build with Debug. this is what is see in the Monitor- I note the wrong config version note sure what that related too.
Rebooting...
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x420a49aa
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x44c
load:0x403c9700,len:0xbd8
load:0x403cc700,len:0x2a80
entry 0x403c98d0
Config version: 1.6
Config size: 271
Wrong config version. Applying defaults.
[iwcAll]
|-- [iwcSys]
| |-- 'iwcThingName' with value: 'ESP32CAM-RTSP-3882503bdaec'
| |-- 'iwcApPassword' with value:
Core 1 register dump:
PC : 0x42050196 PS : 0x00060830 A0 : 0x820492d4 A1 : 0x3fcebb20
A2 : 0x3fcab4a0 A3 : 0x3fc9cc80 A4 : 0xffff8fff A5 : 0x3c0c1bc4
A6 : 0x00001000 A7 : 0x3c0c1c1c A8 : 0x00000000 A9 : 0x3fcebb00
A10 : 0x00000080 A11 : 0x00000001 A12 : 0x00000000 A13 : 0x3fcab4fc
A14 : 0x00000008 A15 : 0x00000005 SAR : 0x00000015 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000 LBEG : 0x400570e8 LEND : 0x400570f3 LCOUNT : 0x00000000
Backtrace: 0x42050193:0x3fcebb20 0x420492d1:0x3fcebb70 0x42048e22:0x3fcebba0 0x42017755:0x3fcebbf0 0x420093f6:0x3fcebc10 0x42009874:0x3fcebd10 0x4201b582:0x3fcebd90
Hi cohen,
Updated the develop branch with new types: https://github.com/rzeldent/esp32cam-rtsp/tree/develop Configuration has been taken out to seaparate files. M5STACK_UNITCAMS3 has been added but untested.