saki4510t / UVCCamera

library and sample to access to UVC web camera on non-rooted Android device
2.99k stars 1.2k forks source link

does libusb support usb3.0? #554

Closed Eason-Tang closed 4 years ago

Eason-Tang commented 4 years ago

hi everyone; i am developing a project with a usb3.0 device; but i am not sure this project support usb3.0 protocol; my usb3.0 device can not be opened by using usbCameraTest8 demo; E/UVCCamera: [7771*UVCCamera.cpp:172:connect]:could not open camera:err=-1

Eason-Tang commented 4 years ago

I have resolved my problem; 1 please make sure your usb3.0 device Configuration Descriptor->wTotalLength ? UVCCamera/libuvccamera/src/main/jni/libusb/libusb/os/android_usbfs.c function:android_initialize_device uint8_t desc[4096]; // max descriptor size is 4096 bytes here has limited desc as 4096; you could increase this define length as 8192 or more; 2 you could connect your usb3.0 device to ubuntu PC ;(please note your ubuntu PC should support usb3.0 too) run cmd in terminal " lsusb -d xxxx:xxxx -v " this is the total descripptor; and find Configuration Descriptor->wTotalLength;