-
USB UVC Camera woes
Hello Everyone,
I am attempting to get a USB UVC web camera to run on my Google Nexus. I have recompiled the kernel with the UVC and V4L drivers enabled. Everything works good with one exception. About half the time the camera does not register or show up /dev/video0. Unplugging and Re-plugging the camera several or many times causes the camera to register. Also, more than half the time if I power cycle the unit the camera also does not register.
When the camera does not register I get the following:
dmesg:
[ 67.085723] usb 1-1: device not accepting address 5, error -110
[ 67.086120] hub 1-0:1.0: unable to enumerate USB device on port 1
[ 67.086517] musb_bus_suspend 2292: trying to suspend as a_host while active
[ 67.210723] usb 1-1: new high speed USB device number 6 using musb-hdrc
[ 82.335693] usb 1-1: device descriptor read/64, error -110
lsusb:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
When the camera works I get the following:
dmesg:
[ 286.460693] usb 1-1: new high speed USB device number 18 using musb-hdrc
[ 286.908294] usb 1-1: device v046d p0821 is not supported
[ 286.908538] usb 1-1: New USB device found, idVendor=046d, idProduct=0821
[ 286.908905] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=1
[ 286.909240] usb 1-1: SerialNumber: 284550E0
[ 286.916534] uvcvideo: Found UVC 1.00 device <unnamed> (046d:0821)
[ 287.311492] input: UVC Camera (046d:0821) as /devices/platform/omap/musb-omap2430/musb-hdrc/usb1/1-1/1-1:1.2/input/input6
lsusb:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 018: ID 046d:0821 Logitech, Inc. HD Webcam C910
Things I've tried so far that do not resolve the issue:
- swapped out the OTG host cable for several different cables from different vendors
- Swapped out different cameras and models
- Resetting USB with a .c program (/dev/bus/usb)
Questions:
- Has anyone else had this problem and found a solution?
- Does anyone know what GPIO# is used to control the USB bus power, I would like to write a reset routine that will reset power to the USB port until the camera registers. This is a bit hackie, but it should work. I've tried googeling and digging through the kernel source to find the GPIO# with no success

- Any other ideas on how to approach this?
Thanks
-
05-31-2012 09:10 AM
# ADS
-
Good news - Fixed the problem
Line 2032 in hub.c, change the following to:
#define HUB_ROOT_RESET_TIME 500 /* times are in msec */
#define HUB_SHORT_RESET_TIME 500
#define HUB_LONG_RESET_TIME 500
#define HUB_RESET_TIMEOUT 2000
All is well with all of the USB cameras I have tested.
-
I am trying to get UVC device to be recognized by tablet or phone, does it appear as normal camera device to the android stack or one has to implement specific UVC viewer?
I am trying to get this to work on Nexus 7 tablet. I am trying to see other than modifying hub.c as shown above what other stuff I have to implement to get this to work on Nexus 7 tablet.
Sam