OpenCVwithUVC icon indicating copy to clipboard operation
OpenCVwithUVC copied to clipboard

Camera immediately stalls when using USB3.0

Open Mr-Grieves opened this issue 7 years ago • 0 comments

The app works as expected when connected with a USB2 cable, however, in an attempt to increase resolution+frame rate, I've been trying to get it working with USB3 instead. When I run it over USB3.0 I get the following behaviour:

My device transmits a frame and then immediately stops. (There is a light on the device that blinks while transmitting, after the stall it stops blinking). I see 2 errors that do not appear during the USB2.0 tests:

I/libusb/core: [9849*core.c:2085:libusb_init2]:libusb v1.0.19.10903 I/libusb/usbfs: [9849*android_usbfs.c:504:op_init2]:start up hotplug event handler I/libusb/usbfs: [9849*android_usbfs.c:512:op_init2]:call android_scan_devices E/libuvc/device: [9849*device.c:330:uvc_open]:internal_devh->info->ctrl_if.bEndpointAddress is null I/AbsUVCCameraHandler: supportedSize:{"formats":[{"index":1,"type":4,"default":11,"size":["640x360","640x480","720x480","720x576","800x600","960x540","1024x768","1280x720","1280x1024","1600x1200","1920x1080","1920x1200"]}]} V/CameraThread: handleStartPreview: I/libUVCCamera: [9884*UVCPreview.cpp:492:prepare_preview]:frameSize=(640,480)@YUYV I/libUVCCamera: [9888*UVCPreview.cpp:258:callbackPixelFormatChanged]:PIXEL_FORMAT_RAW: D/EGLBase14: EGLContext created, client version 3 D/mali_winsys: EGLint new_window_surface(egl_winsys_display*, void*, EGLSurface, EGLConfig, egl_winsys_surface**, egl_color_buffer_format*, EGLBoolean) returns 0x3000, [640x480]-format:1 E/libusb/usbfs: [9883*android_usbfs.c:2656:handle_bulk_completion]:LIBUSB_TRANSFER_STALL

After the LIBUSB_TRANSFER_STALL, there is no more debug output until I disconnect the device. I assume the increased data rate is causing some issue but I do not know enough about the UVC software to come up with a solution. @saki4510t please let me know if you have any idea why this is happening and how to fix it.

FYI: I've also commented here. Mostly opening this here for visibility.

Thank you

Mr-Grieves avatar Jan 24 '18 23:01 Mr-Grieves