在测试usb camera时,直接插在ubuntu主机行可以看到图像;但是插到开发板时,串口打印枚举错误。
以上说明以下几点:
1、usb camera自身芯片和摄像头正常,因为可以在ubuntu机上采集到图像
2、ubuntu14.04与android4.4都是基于linux内核,而且都很新,在USB模块上应该差别不大
3、可以将问题集中在枚举时出现错误。
看串口打印是在进行读取描述符错误,错误值-71(协议错误)。网上搜了一下,有人说到协议错误可能就是时序错误,几个线干扰到了。因此就把四个数据线给剪短。结果成功了
几个测试测试摄像头可用以下几个软件:
luvcview
xawtv
sudo apt-get install 安装
*******************************************************************************************************************
@ubuntu:~$ luvcview
luvcview 0.2.4
SDL information:
Video driver: x11
A window manager is available
Device information:
Device path: /dev/video0
Stream settings:
Frame format: YUYV (MJPG is not supported by device)
Frame size: 640x480
Frame rate: 30 fps
*******************************************************************************************************************
@ubuntu:~$ xawtv
This is xawtv-3.95.dfsg.1, running on Linux/i686 (2.6.27-7-generic)
xinerama 0: 1024x768+0+0
WARNING: No DGA support available for this display.
/dev/video0 [v4l2]: no overlay support
v4l-conf had some trouble, trying to continue anyway
ioctl: VIDIOC_QUERYCTRL(id=9963776;type=unknown;name="";minimum=0;maximum=0;step=0;default_value=0;flags=0): Input/output error
ioctl: VIDIOC_QUERYCTRL(id=9963777;type=unknown;name="";minimum=0;maximum=0;step=0;default_value=0;flags=0): Input/output error
Warning: Cannot convert string "-*-ledfixed-medium-r-*--39-*-*-*-c-*-*-*" to type FontStruct
ioctl: VIDIOC_G_STD(std=0xb7967490b7eab1b8 [PAL_H,PAL_I,PAL_D,PAL_K,PAL_M,NTSC_M,NTSC_M_JP,?,SECAM_D,SECAM_H,SECAM_K1,SECAM_L,?ATSC_8_VSB,ATSC_16_VSB,(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)]): Invalid argument
ioctl: VIDIOC_S_STD(std=0x0 []): Invalid argument