Hi,
I'm wondering if anyone has success streaming videos through USB gadget mode?
I tried using the UVC-Gadget repo which works for CM4 + Pi CAM v3, but I got the following errors on CM5:
With mjpeg:
With uncompressed:
With uncompressed and not using libcamera:I see no frame on my laptop side, and the serial console seems to stuck after 4 buffer is requested.
I did the same setup with CM4 and it worked fine.
Also tried a different CM5 module to eliminate hardware issues.
I'm wondering if anyone has any inside on how to make the USB gadget mode work for webcam?
I'm wondering if anyone has success streaming videos through USB gadget mode?
I tried using the UVC-Gadget repo which works for CM4 + Pi CAM v3, but I got the following errors on CM5:
With mjpeg:
Code:
...bRequestType a1 bRequest 81 wValue 0100 wIndex 0001 wLength 0022streaming request (req GET_CUR cs 01)bRequestType a1 bRequest 83 wValue 0100 wIndex 0001 wLength 0022streaming request (req GET_MAX cs 01)bRequestType a1 bRequest 82 wValue 0100 wIndex 0001 wLength 0022streaming request (req GET_MIN cs 01)bRequestType 21 bRequest 01 wValue 0100 wIndex 0001 wLength 0022streaming request (req SET_CUR cs 01)setting probe control, length = 34bRequestType a1 bRequest 81 wValue 0100 wIndex 0001 wLength 0022streaming request (req GET_CUR cs 01)bRequestType 21 bRequest 01 wValue 0200 wIndex 0001 wLength 0022streaming request (req SET_CUR cs 02)setting commit control, length = 34Setting format to 0x47504a4d 640x480[0:02:03.793063506] [2006] WARN V4L2 v4l2_pixelformat.cpp:346 Unsupported V4L2 pixel format <INVALID>[0:02:03.793091341] [2006] WARN Formats formats.cpp:1006 Unsupported pixel format 0x00000000[0:02:03.793085859] [2006] ERROR RPI pisp.cpp:228 Pixel format <INVALID> unsupported[0:02:03.793106083] [2006] FATAL default pisp.cpp:229 assertion "0" failed in toPiSPImageFormat()Backtrace not availableAborted
Code:
bRequestType a1 bRequest 81 wValue 0100 wIndex 0001 wLength 0022streaming request (req GET_CUR cs 01)bRequestType a1 bRequest 83 wValue 0100 wIndex 0001 wLength 0022streaming request (req GET_MAX cs 01)bRequestType a1 bRequest 82 wValue 0100 wIndex 0001 wLength 0022streaming request (req GET_MIN cs 01)bRequestType 21 bRequest 01 wValue 0100 wIndex 0001 wLength 0022streaming request (req SET_CUR cs 01)setting probe control, length = 34bRequestType a1 bRequest 81 wValue 0100 wIndex 0001 wLength 0022streaming request (req GET_CUR cs 01)bRequestType 21 bRequest 01 wValue 0200 wIndex 0001 wLength 0022streaming request (req SET_CUR cs 02)setting commit control, length = 34Setting format to 0x56595559 640x480setting format to 640x480-YUYV=== Setting frame rate to 15 fpsStarting video stream.[0:02:24.313374656] [1982] INFO Camera camera.cpp:1197 configuring streams: (0) 640x480-YUYV[0:02:24.313554417] [1986] INFO RPI pisp.cpp:1450 Sensor: /base/axi/pcie@120000/rp1/i2c@70000/imx708@1a - Selected sensor format: 1536x864-SBGGR10_1X10 - Selected CFE format: 1536x864-PC1B/dev/video8: 4 buffers requested./dev/video8: buffer 0 valid./dev/video8: buffer 1 valid./dev/video8: buffer 2 valid./dev/video8: buffer 3 valid.Stopping video stream.bRequestType a1 bRequest 81 wValue 0200 wIndex 0200 wLength 0002control request (req GET_CUR cs BRIGHTNESS)bRequestType a1 bRequest 81 wValue 0200 wIndex 0200 wLength 0002control request (req GET_CUR cs BRIGHTNESS)bRequestType a1 bRequest 81 wValue 0400 wIndex 0100 wLength 0004control request (req GET_CUR cs GAIN)bRequestType a1 bRequest 81 wValue 0200 wIndex 0100 wLength 0001control request (req GET_CUR cs BRIGHTNESS)bRequestType a1 bRequest 81 wValue 0100 wIndex 0001 wLength 0022streaming request (req GET_CUR cs 01)bRequestType 21 bRequest 01 wValue 0100 wIndex 0001 wLength 0022streaming request (req SET_CUR cs 01)setting probe control, length = 34bRequestType a1 bRequest 81 wValue 0100 wIndex 0001 wLength 0022streaming request (req GET_CUR cs 01)bRequestType a1 bRequest 83 wValue 0100 wIndex 0001 wLength 0022streaming request (req GET_MAX cs 01)bRequestType a1 bRequest 82 wValue 0100 wIndex 0001 wLength 0022streaming request (req GET_MIN cs 01)bRequestType 21 bRequest 01 wValue 0100 wIndex 0001 wLength 0022streaming request (req SET_CUR cs 01)setting probe control, length = 34bRequestType a1 bRequest 81 wValue 0100 wIndex 0001 wLength 0022streaming request (req GET_CUR cs 01)bRequestType 21 bRequest 01 wValue 0200 wIndex 0001 wLength 0022streaming request (req SET_CUR cs 02)setting commit control, length = 34Setting format to 0x56595559 640x480setting format to 640x480-YUYV=== Setting frame rate to 15 fpsStarting video stream.[0:03:38.689628963] [1982] INFO Camera camera.cpp:1197 configuring streams: (0) 640x480-YUYV[0:03:38.696922420] [1986] INFO RPI pisp.cpp:1450 Sensor: /base/axi/pcie@120000/rp1/i2c@70000/imx708@1a - Selected sensor format: 1536x864-SBGGR10_1X10 - Selected CFE format: 1536x864-PC1B/dev/video8: 4 buffers requested./dev/video8: buffer 0 valid./dev/video8: buffer 1 valid./dev/video8: buffer 2 valid./dev/video8: buffer 3 valid.
Code:
streaming request (req GET_CUR cs 01)bRequestType 21 bRequest 01 wValue 0200 wIndex 0001 wLength 0022streaming request (req SET_CUR cs 02)setting commit control, length = 34Setting format to 0x56595559 640x480=== Setting frame rate to 15 fpsStarting video stream./dev/video8: 4 buffers requested./dev/video8: buffer 0 mapped at address 0x7fff9d0f4000./dev/video8: buffer 1 mapped at address 0x7fff9d05c000./dev/video8: buffer 2 mapped at address 0x7fff9cfc4000./dev/video8: buffer 3 mapped at address 0x7fff9cf2c000.
I did the same setup with CM4 and it worked fine.
Also tried a different CM5 module to eliminate hardware issues.
I'm wondering if anyone has any inside on how to make the USB gadget mode work for webcam?
Statistics: Posted by TruZ — Tue Feb 25, 2025 10:22 pm — Replies 0 — Views 56