Can't find usb camera on android


#1

Android version: latest version that download from bellow link
https://builds.96boards.org/releases/dragonboard410c/qualcomm/android/latest/

Usb camera: LogicTech C170

Dmesg info:

<6>[ 418.575602] msm_bam_device_lpm_ok: Going to LPM now
<6>[ 418.591123] msm_otg 78d9000.usb: USB in low power mode
<6>[ 418.599867] msm_otg 78d9000.usb: USB exited from low power mode
<6>[ 418.713371] msm_hsusb_host msm_hsusb_host: EHCI Host Controller
<6>[ 418.714019] msm_hsusb_host msm_hsusb_host: new USB bus registered, assigned bus number 1
<6>[ 418.719191] msm_hsusb_host msm_hsusb_host: irq 166, io mem 0x078d9000
<6>[ 418.732511] msm_hsusb_host msm_hsusb_host: USB 2.0 started, EHCI 1.00
<6>[ 418.732933] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
<6>[ 418.732942] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
<6>[ 418.732949] usb usb1: Product: EHCI Host Controller
<6>[ 418.732956] usb usb1: Manufacturer: Linux 3.10.49-g0b014e2-00006-gb6eb0ba ehci_hcd
<6>[ 418.732962] usb usb1: SerialNumber: msm_hsusb_host
<6>[ 418.734867] hub 1-0:1.0: USB hub found
<6>[ 418.734915] hub 1-0:1.0: 1 port detected
<3>[ 418.743000] mdss_dsi_cmds2buf_tx: failed to call cmd_dma_tx for cmd = 0x11
<3>[ 418.743004] mdss_dsi_cmds_tx: failed to call
<3>[ 418.745717] hdmi_get_video_id_code: timing is not supported h=1920 v=1080
<6>[ 419.053054] usb 1-1: new high-speed USB device number 2 using msm_hsusb_host
<6>[ 419.226086] usb 1-1: New USB device found, idVendor=0424, idProduct=2513
<6>[ 419.226105] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
<6>[ 419.233161] hub 1-1:1.0: USB hub found
<6>[ 419.233470] hub 1-1:1.0: 3 ports detected
<6>[ 419.514238] usb 1-1.2: new high-speed USB device number 3 using msm_hsusb_host
<6>[ 419.707716] usb 1-1.2: New USB device found, idVendor=046d, idProduct=082b
<6>[ 419.707744] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
<6>[ 419.707756] usb 1-1.2: Product: Webcam C170
<6>[ 419.707766] usb 1-1.2: Manufacturer:
<6>[ 419.717977] uvcvideo: Found UVC 1.00 device Webcam C170 (046d:082b)
<6>[ 419.729282] input: Webcam C170 as /devices/platform/msm_hsusb_host/usb1/1-1/1-1.2/1-1.2:1.0/input/input10
<6>[ 422.828808] usb 1-1.2: USB disconnect, device number 3
<6>[ 423.157993] msm_bam_device_lpm_ok: Going to LPM now
<6>[ 423.167614] msm_otg 78d9000.usb: USB in low power mode
<6>[ 424.897882] msm_otg 78d9000.usb: USB exited from low power mode
<6>[ 425.126400] usb 1-1.2: new high-speed USB device number 4 using msm_hsusb_host
<6>[ 425.357625] usb 1-1.2: New USB device found, idVendor=046d, idProduct=082b
<6>[ 425.357645] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
<6>[ 425.357656] usb 1-1.2: Product: Webcam C170
<6>[ 425.357667] usb 1-1.2: Manufacturer:
<6>[ 425.374286] uvcvideo: Found UVC 1.00 device Webcam C170 (046d:082b)
<6>[ 425.388229] input: Webcam C170 as /devices/platform/msm_hsusb_host/usb1/1-1/1-1.2/1-1.2:1.0/input/input11
<6>[ 437.024996] mmc0: Starting deferred resume
<6>[ 437.154720] mmc0: Deferred resume completed

Devices:

shell@msm8916_64:/dev $ ls -l v*
crw-rw---- system camera 81, 1 1970-01-01 00:00 v4l-subdev0
crw-rw---- system camera 81, 2 1970-01-01 00:00 v4l-subdev1
crw-rw---- system camera 81, 3 1970-01-01 00:00 v4l-subdev2
crw-rw---- system camera 81, 4 1970-01-01 00:00 v4l-subdev3
crw-rw---- system camera 81, 5 1970-01-01 00:00 v4l-subdev4
crw-rw---- system camera 81, 6 1970-01-01 00:00 v4l-subdev5
crw-rw---- system camera 81, 7 1970-01-01 00:00 v4l-subdev6
crw-rw---- system camera 81, 8 1970-01-01 00:00 v4l-subdev7
crw-rw---- system camera 81, 9 1970-01-01 00:00 v4l-subdev8
crw-rw---- system camera 81, 10 1970-01-01 00:00 v4l-subdev9
crw------- root root 10, 95 1970-01-01 00:00 vga_arbiter
lrwxrwxrwx root root 1970-01-01 00:00 venus_dec -> /dev/video32
lrwxrwxrwx root root 1970-01-01 00:00 venus_enc -> /dev/video33
crwxrwxrwx system camera 81, 0 1970-01-01 00:00 video0
crwxrwxrwx system camera 81, 12 1970-01-01 00:00 video32
crwxrwxrwx system camera 81, 13 1970-01-01 00:00 video33
crw-rw---- system audio 248, 0 1970-01-01 00:00 voice_svc

When I call Camera.getNumberOfCameras(); return is zero.
and I tried with CameraICS(https://play.google.com/store/apps/details?id=com.moblynx.cameraics&hl=en), a basic camera app. CameraIcs doestn’t work.

Can anyone give me idea about this issue? thanks


#2

fixed this issue!

use simplewebcam app that I got from “https://bitbucket.org/neuralassembly/simplewebcam”. Changed device to /dev/device1 and got preview.


#3

Hi Jasonliu,

I’m (very) new to Java.
I downloaded simplewebcam app you mentioned above and imported that to eclipse for android with Android SDK set to android-19 (android 4.4).
When I try to build, I get this error message:
"
Description Resource Path Location Type
R cannot be resolved to a variable Main.java /SimpleWebCam/src/com/camera/simplewebcam line 13 Java Problem
"
Did you make any changes to the code obtained from https://bitbucket.org/neuralassembly/simplewebcam before build?

Thanks,
Mo


#4

Jasonliu,

okay, I somehow got past that error mentioned in my last post.
Now, I wanted to make sure which Android image you used in your video preview test and whether you made any changes to the Kernel configuration to get your usb camera work?

(
as there are some required kernel configs mentioned in the simplewebcam page:
CONFIG_VIDEO_DEV=y
CONFIG_VIDEO_V4L2_COMMON=y
CONFIG_VIDEO_MEDIA=y
CONFIG_USB_VIDEO_CLASS=y
CONFIG_V4L_USB_DRIVERS=y
CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y

which do not exactly correspond with DB410c Android kernel config settings).

also which usb port on DB410c board you hooked up your usb camera to?

I am using Qualcomm Android vLA.BR.1.2.4-01810-8×16.0-3 and also using a “VGA Single Chip” usb camera “idVendor=093a, idProduct=2601”.
Camera works fine on desktop computer (enumerated as /dev/video1) but when I connect it to micro usb port on DB410c, nothing happens (I expect to see a new entry in /dev/video device list), oddly, when I connect it to another usb port on DB410c board, the webcam light comes on which means it is powered but again no video device is added to list of /dev/videox devices on DB410c.