Closed j-broyles closed 4 years ago
Put contents of file in bug so easier to see.
Relative fresh install of VS & Platform.IO - only loaded a couple of instances of Tasmota & tried to compile, and did not know how.
Started VS Extracted folder from ZIP to desktop Dragged folder into project workspace Answered make folder a project Clicked Platformio.Build
Executing task in folder esp32cam-ready-master: C:\Users\temp.platformio\penv\Scripts\platformio.exe run <
Verbose mode can be enabled via -v, --verbose
option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32cam.html
PLATFORM: Espressif 32 1.11.1 > AI Thinker ESP32-CAM
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES: toolchain-xtensa32 2.50200.80 (5.2.0), tool-openocd-esp32 1.1000.20190708 (10.0), framework-arduinoespressif32 2.10004.191002 (1.0.4), tool-esptoolpy 1.20600.0 (2.6.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 29 compatible libraries
Scanning dependencies...
Dependency Graph
|--
Terminal will be reused by tasks, press any key to close it.
Connected ESP32-CAM to CH340 & connected to USB. Jumpered GPIO0 to GND Changed platformio.ini upload_protocol = esptool Clicked platformio.upload
Executing task in folder esp32cam-ready-master: C:\Users\temp.platformio\penv\Scripts\platformio.exe run --target upload <
Verbose mode can be enabled via -v, --verbose
option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32cam.html
PLATFORM: Espressif 32 1.11.1 > AI Thinker ESP32-CAM
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES: toolchain-xtensa32 2.50200.80 (5.2.0), tool-openocd-esp32 1.1000.20190708 (10.0), tool-mkspiffs 2.230.0 (2.30), framework-arduinoespressif32 2.10004.191002 (1.0.4), tool-esptoolpy 1.20600.0 (2.6.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 29 compatible libraries
Scanning dependencies...
Dependency Graph
|--
Leaving... Hard resetting via RTS pin... ========================= [SUCCESS] Took 30.05 seconds =========================
Terminal will be reused by tasks, press any key to close it.
remove GPIO0 jumper open serial terminal reset esp32-cam
Executing task in folder esp32cam-ready-master: C:\Users\temp.platformio\penv\Scripts\platformio.exe device monitor <
--- Miniterm on COM3 115200,8,N,1 --- --- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H --- ets Jun 8 2016 00:22:57
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:0x3fff0018,len:4 load:0x3fff001c,len:1044 load:0x40078000,len:8896 load:0x40080400,len:5816 entry 0x400806ac [I][main.cpp:31] setup(): Starting ESP32Cam... [I][main.cpp:36] setup(): Instance_name: esp32cam-3cf016286f24 [I][main.cpp:38] setup(): Connecting... I (1447) wifi: wifi driver task: 3ffb5a20, prio:23, stack:3584, core=0 I (3035) wifi: wifi firmware version: 7997e4b I (3035) wifi: config NVS flash: enabled I (3035) wifi: config nano formating: disabled I (3036) wifi: Init dynamic tx buffer num: 32 I (3040) wifi: Init data frame dynamic rx buffer num: 32 I (3045) wifi: Init management frame dynamic rx buffer num: 32 I (3051) wifi: Init management short buffer num: 32 I (3056) wifi: Init static rx buffer size: 1600 I (3060) wifi: Init static rx buffer num: 16 I (3064) wifi: Init dynamic rx buffer num: 32 I (3136) wifi: mode : sta (24:6f:28:16:f0:3c) [I][wifi_provisioning.cpp:17] connect(): Connecting... Retries left: 1 I (3260) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:1 I (3261) wifi: state: init -> auth (b0) I (3265) wifi: state: auth -> assoc (0) I (3271) wifi: state: assoc -> run (10) I (3490) wifi: connected with ATT696, channel 1, BW20 I (3495) wifi: pm start, type: 1
[I][wifi_provisioning.cpp:21] connect(): Connection result: 3 [I][main.cpp:53] setup(): Connected! IP address:192.168.10.28 [I][main.cpp:55] setup(): Starting servers... [I][espcam_webserver.cpp:19] begin(): Starting rtsp_server [I][rtsp_server.cpp:20] begin(): Starting rtsp server [E][ESPmDNS.cpp:148] addService(): Failed adding service rtsp.tcp.
[I][espcam_webserver.cpp:22] begin(): Starting web server [E][WebServer.cpp:617] _handleRequest(): request handler not found [I][espcam_webserver.cpp:39] handle_root(): handle_root [E][WebServer.cpp:617] _handleRequest(): request handler not found [I][espcam_webserver.cpp:39] handle_root(): handle_root
connected with web browser (wifi credentials retained from previous flashing with micro-rtsp, reset config works)
ESP32CAM rtsp stream available at: rtsp://esp32cam-3cf016286f24.local:554/mjpeg/1 Options Single frame Stream frames Light on Light off Reset configuration and restart
Issue 1: number following device name in URL is mac address with octets in reverse order. MAC of this device is 24:6f:28:16:f0:3c - Can it be made to use the MAC correctly?
Serial monitor: [I][espcam_webserver.cpp:102] handle_jpg(): handle_jpg [E][WebServer.cpp:617] _handleRequest(): request handler not found [I][espcam_webserver.cpp:39] handle_root(): handle_root [E][WebServer.cpp:617] _handleRequest(): request handler not found [I][espcam_webserver.cpp:39] handle_root(): handle_root [I][espcam_webserver.cpp:116] handle_light_on(): handle_light_on [E][WebServer.cpp:617] _handleRequest(): request handler not found [I][espcam_webserver.cpp:39] handle_root(): handle_root [E][WebServer.cpp:617] _handleRequest(): request handler not found [I][espcam_webserver.cpp:39] handle_root(): handle_root [I][espcam_webserver.cpp:126] handle_light_off(): handle_light_off [E][WebServer.cpp:617] _handleRequest(): request handler not found [I][espcam_webserver.cpp:39] handle_root(): handle_root [E][WebServer.cpp:617] _handleRequest(): request handler not found [I][espcam_webserver.cpp:39] handle_root(): handle_root
Each option of web page works correctly, but monitor logs error after each is completed.
Using VLC, streaming url opened
Serial monitor: Creating TSP streamer Created streamer width=800, height=600 Creating RTSP session RTSP received OPTIONS RTSP received DESCRIBE client has closed the socket client closed socket, exiting closing UDP socket closing UDP socket closing TCP socket Creating TSP streamer Created streamer width=800, height=600 Creating RTSP session RTSP received SETUP RTSP received PLAY RTSP received OPTIONS RTSP received OPTIONS RTSP received OPTIONS
No display in VLC
Serial monitor - line repeated every few minutes: RTSP received OPTIONS
Closed down VLC
Serial Monitor: RTSP received OPTIONS RTSP received TEARDOWN closing UDP socket closing UDP socket closing TCP socket
Previous attempts gave error messages while attempting to stream rtsp taking about being unambe to forward UDP packets - multiple occurances, but unable to duplicate while documenting this. May be related to when web server starts:
Serial Monitor: [I][rtsp_server.cpp:20] begin(): Starting rtsp server [E][ESPmDNS.cpp:148] addService(): Failed adding service rtsp.tcp.
MAC Id issue should be solved.
ok, I pulled your revised version (MAC is right now :) )and caught the UDP error:
Executing task in folder esp32cam-ready-master: C:\Users\temp.platformio\penv\Scripts\platformio.exe device monitor <
--- Miniterm on COM3 115200,8,N,1 --- --- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H --- ets Jun 8 2016 00:22:57
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:0x3fff0018,len:4 load:0x3fff001c,len:1044 load:0x40078000,len:8896 load:0x40080400,len:5816 entry 0x400806ac [I][main.cpp:38] setup(): Starting ESP32Cam... [I][main.cpp:43] setup(): Instance_name: esp32cam-246f2816f03c [I][main.cpp:45] setup(): Connecting... I (1448) wifi: wifi driver task: 3ffb5a20, prio:23, stack:3584, core=0 I (3037) wifi: wifi firmware version: 7997e4b I (3037) wifi: config NVS flash: enabled I (3037) wifi: config nano formating: disabled I (3038) wifi: Init dynamic tx buffer num: 32 I (3042) wifi: Init data frame dynamic rx buffer num: 32 I (3047) wifi: Init management frame dynamic rx buffer num: 32 I (3053) wifi: Init management short buffer num: 32 I (3058) wifi: Init static rx buffer size: 1600 I (3062) wifi: Init static rx buffer num: 16 I (3066) wifi: Init dynamic rx buffer num: 32 I (3139) wifi: mode : sta (24:6f:28:16:f0:3c) [I][wifi_provisioning.cpp:17] connect(): Connecting... Retries left: 1 I (3263) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:1 I (3263) wifi: state: init -> auth (b0) I (3267) wifi: state: auth -> assoc (0) I (3273) wifi: state: assoc -> run (10) I (3565) wifi: connected with ATT696, channel 1, BW20 I (3605) wifi: pm start, type: 1
[I][wifi_provisioning.cpp:21] connect(): Connection result: 3 [I][main.cpp:60] setup(): Connected! IP address:192.168.10.28 [I][main.cpp:62] setup(): Starting servers... [I][espcam_webserver.cpp:19] begin(): Starting rtsp_server [I][rtsp_server.cpp:20] begin(): Starting rtsp server [E][ESPmDNS.cpp:148] addService(): Failed adding service rtsp.tcp.
Build:
Executing task in folder esp32cam-ready-master: C:\Users\temp.platformio\penv\Scripts\platformio.exe run <
Verbose mode can be enabled via -v, --verbose
option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32cam.html
PLATFORM: Espressif 32 1.11.1 > AI Thinker ESP32-CAM
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES: toolchain-xtensa32 2.50200.80 (5.2.0), framework-arduinoespressif32 2.10004.191002 (1.0.4), tool-esptoolpy 1.20600.0 (2.6.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 29 compatible libraries
Scanning dependencies...
Dependency Graph
|--
Terminal will be reused by tasks, press any key to close it.
upload:
Executing task in folder esp32cam-ready-master: C:\Users\temp.platformio\penv\Scripts\platformio.exe run --target upload <
Verbose mode can be enabled via -v, --verbose
option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32cam.html
PLATFORM: Espressif 32 1.11.1 > AI Thinker ESP32-CAM
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES: toolchain-xtensa32 2.50200.80 (5.2.0), tool-mkspiffs 2.230.0 (2.30), framework-arduinoespressif32 2.10004.191002 (1.0.4), tool-esptoolpy 1.20600.0 (2.6.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 29 compatible libraries
Scanning dependencies...
Dependency Graph
|--
Leaving... Hard resetting via RTS pin... ========================= [SUCCESS] Took 63.83 seconds =========================
Terminal will be reused by tasks, press any key to close it.
monitor logs errors after redirect should be solved now.
Regardung the UDP streaming issues. I checked what this could be and think it might have something to do with the libraries used. It might be caused by these issues:
In the logging that you send me there are no timestamps but because the stream was closed and reopened this might be plausible. See line
Creating TSP streamer
in logging.
The other errorline in the log: [E][ESPmDNS.cpp:148] addService(): Failed adding service rtsp.tcp. is caused because the rtsp service is already present in the mdns responder and should be a warning.
compiled your current revision, downloaded & run- including serial monitor (most):
[I][wifi_provisioning.cpp:21] connect(): Connection result: 3 [I][main.cpp:60] setup(): Connected! IP address:192.168.10.28 [I][main.cpp:62] setup(): Starting servers... [I][espcam_webserver.cpp:19] begin(): Starting rtsp_server [I][rtsp_server.cpp:20] begin(): Starting rtsp server [E][ESPmDNS.cpp:148] addService(): Failed adding service rtsp.tcp.
[I][espcam_webserver.cpp:22] begin(): Starting web server [I][espcam_webserver.cpp:39] handle_root(): handle_root [I][espcam_webserver.cpp:102] handle_jpg(): handle_jpg [I][espcam_webserver.cpp:116] handle_light_on(): handle_light_on [I][espcam_webserver.cpp:39] handle_root(): handle_root [I][espcam_webserver.cpp:126] handle_light_off(): handle_light_off [I][espcam_webserver.cpp:39] handle_root(): handle_root [I][espcam_webserver.cpp:82] handle_jpg_stream(): handle_jpg_stream [E][WiFiClient.cpp:392] write(): fail on fd 59, errno: 104, "Connection reset by peer" [E][WiFiClient.cpp:392] write(): fail on fd 59, errno: 104, "Connection reset by peer"
Monitor log looks better. Got the errors at the end when I clicked browser back while jpeg streaming.
Looked at the 2 other issues that you attached. Immediately seemed interesting as I have a home net with wifi mesh extenders, but the esp32-cam, pc w/ VS & web browser, and tablet with VLC are all on the same subnet. I then considered that I had always tried the web control page a bit before trying the rtsp stream, so I rebooted the ESP32-cam and immediately went into VLC, and got the same messages and errors as before.
Any idea what library might be an issue that I should check?
Hi J-broyles,
Strange, I cannot reproduce it. If I start the ESP32-Cam and go directly to VLC, I do not see any errors and have a fine image in VLC. Have you tried it with the PC version of VLC? I'm using 3.0.8 Vetinari?
--- Miniterm on COM6 115200,8,N,1 ---
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
etsRչ␁ 8���� �Ғ�:5S��!��:0� ��]�RO�%U�E�JI�ot���3 (*�}FA��e1AS�%=�T)C��nf�֥�: � ��IW���5
�녑:0�f�␖��c,���10�SH�녑:0�␓��80�,�YK�89S��+�i0x␓�4�bb�n:���j ��R� ␚��ck�V�i1
e���A0�␓���6�H�[I][main.cpp:38] setup(): Starting ESP32Cam...
[I][main.cpp:43] setup(): Instance_name: esp32cam-30aea4d4ceac
[I][main.cpp:45] setup(): Connecting...
I (1446) wifi: wifi driver task: 3ffb5a20, prio:23, stack:3584, core=0
I (3033) wifi: wifi firmware version: 7997e4b
I (3034) wifi: config NVS flash: enabled
I (3034) wifi: config nano formating: disabled
I (3035) wifi: Init dynamic tx buffer num: 32
I (3038) wifi: Init data frame dynamic rx buffer num: 32
I (3043) wifi: Init management frame dynamic rx buffer num: 32
I (3049) wifi: Init management short buffer num: 32
I (3054) wifi: Init static rx buffer size: 1600
I (3058) wifi: Init static rx buffer num: 16
I (3062) wifi: Init dynamic rx buffer num: 32
I (3139) wifi: mode : sta (30:ae:a4:d4:ce:ac) + softAP (30:ae:a4:d4:ce:ad)
I (3142) wifi: Total power save buffer number: 16
I (3143) wifi: Init max length of beacon: 752/752
I (3144) wifi: Init max length of beacon: 752/752
I (3149) wifi: mode : sta (30:ae:a4:d4:ce:ac)
[I][wifi_provisioning.cpp:17] connect(): Connecting... Retries left: 1
I (3278) wifi: n:6 0, o:1 0, ap:255 255, sta:6 0, prof:1
I (3279) wifi: state: init -> auth (b0)
I (3288) wifi: state: auth -> assoc (0)
I (3296) wifi: state: assoc -> run (10)
I (3332) wifi: connected with ZiggoXXXXXXX, channel 6, BW20
I (3338) wifi: pm start, type: 1
[I][wifi_provisioning.cpp:21] connect(): Connection result: 3
[I][main.cpp:60] setup(): Connected! IP address:192.168.178.32
[I][main.cpp:62] setup(): Starting servers...
[I][espcam_webserver.cpp:20] begin(): Starting rtsp_server
[I][rtsp_server.cpp:20] begin(): Starting rtsp server
[E][ESPmDNS.cpp:148] addService(): Failed adding service rtsp.tcp.
[I][espcam_webserver.cpp:23] begin(): Starting web server Creating TSP streamer Created streamer width=800, height=600 Creating RTSP session RTSP received OPTIONS RTSP received DESCRIBE RTSP received SETUP RTSP received PLAY
By the way, thank you for reporting issues!
before I got your comment, I'd looked back at the serial monitor output from my previous run, and nestled in between the udp packet errors was a warning, which I doubt has any relevance, but reporting it anyway:
[E][WiFiUdp.cpp:183] endPacket(): could not send data: 12 error sending udp packet [W][rtsp_server.cpp:55] doLoop(): warning exceeding max frame rate of 210 ms [E][WiFiUdp.cpp:183] endPacket(): could not send data: 12 error sending udp packet
After your comment, I loaded VLC/win v
The warning: "warning exceeding max frame rate of 210 ms" means that the data for one image/frame is larger than can be sent. This might be caused by the strength of the WiFi connection or other infrastructure related bottlenecks. If this is the case I suggest to lower the resolution or frame rate.
Looks like the issues are resolved or explained. Closing the issue,
Excellent project! I'm inexperienced with PlatformIO, but have used Arduino IDE for some time. Was finally able to get the bin file made & uploaded. See the attached txt file for my issues.
rtsp.txt Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context Add any other context about the problem here.