esp-iot-solution: Data overflow on streaming (AEGHB-42)
Environment
Development Kit: [ESP32 S3] Kit version (ESP32-S3-DevKitC-1 v1.1) IDF version (run git describe --tags to find it): v5.0 Build System: [CMake] Compiler version (run xtensa-esp32-elf-gcc --version to find it):xtensa-esp32-elf-gcc (crosstool-NG esp-2022r1) 11.2.0 Operating System: [macOS] Power Supply: [USB]
Problem Description
//Detailed problem description goes here. I am loading a screensize that is somehow irregular, I am wondering if is because I need more PSRAM or this is kinda big for the processor to handle.
Expected Behavior
Memory allocation should be enough
Actual Behavior
Overflow happens at usb_stream
Steps to repropduce
Attach a camera with 960 by 544
Debug Logs
I (8151) UVC_STREAM: Actual VS Interface(MPS < 600) found, interface = 1, alt = 0
I (8151) UVC_STREAM: Endpoint(BULK) Addr = 0x81, MPS = 64
I (8152) UVC_STREAM: Actual MJPEG format index = 1, contains 5 frames
I (8152) UVC_STREAM: Actual MJPEG width*heigh: 960*544, frame index = 1
I (8153) UVC_STREAM: UVC Streaming Config Succeed, Version: 0.4.0
I (8153) UVC_STREAM: _usb_get_parse_config_desc_2:0
I (8153) UVC_STREAM: urb free
I (8153) UVC_STREAM: Skipping camera verification?
I (8154) UVC_STREAM: urb alloced
I (8154) UVC_STREAM: Set Device Configuration = 1
I (8154) UVC_STREAM: Got expected pipe_handle and event
I (8155) UVC_STREAM: Set Device Configuration Done
I (8155) UVC_STREAM: urb free
I (8155) UVC_STREAM: Probe MJPEG payload size = 35840
I (8155) UVC_STREAM: urb alloced
I (8156) UVC_STREAM: SET_CUR Probe
I (8156) UVC_STREAM: Got expected pipe_handle and event
I (8156) UVC_STREAM: SET_CUR Probe Done
I (8157) UVC_STREAM: GET_CUR Probe
I (8157) UVC_STREAM: Got expected pipe_handle and event
**I (8157) UVC_STREAM: /Users/xxx/esp-iot-solution/components/usb/usb_stream/usb_stream.c:1743 (_uvc_vs_commit_control):urb status: data overflow**
I (8158) UVC_STREAM: urb free
I (8158) UVC_STREAM: urb alloced
I (8158) UVC_STREAM: Set Device Interface = 1, Alt = 0
I (8159) UVC_STREAM: Got expected pipe_handle and event
I (8159) UVC_STREAM: Set Device Interface Done
I (8159) UVC_STREAM: urb free
I (8160) UVC_STREAM: usb stream task start
I (8160) UVC_STREAM: urb alloced
I (8160) UVC_STREAM: uvc stream urb ready
I (8160) UVC_STREAM: Sample processing task started
I (8161) UVC_STREAM: Creating uvc in(bulk) pipe itf = 1-0, ep = 0x81
I (8161) UVC_STREAM: pipe init succeed
I (8161) UVC_STREAM: urb context update
I (8162) UVC_STREAM: uvc streaming...
I checked the line of the overflow and apparently you guys know it could overflow in there and after that, sometimes the wifi doesnt server the html to the client. So I was wondering if there is a variable I could increase or is the physical memory that is not enough.
Greetings!
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 18 (3 by maintainers)
@leeebo I got too far on the project :p you can see it here, https://github.com/beckmx/esp32-ps-vita-streamer, I forked this repo and modified, but at the end I think the esp32 crashes for lack of memory?, but at least I am happy to see I almost got it working
@beckmx
bogus packet: actual_len=35840, header_len=55means the payload does not have a valid UVC MJPEG header. The first Byte should be12but we got55We will release v0.4.2, from which you can enable the VERBOSE log to print each payload for better debugging