吐槽先:USB 设备,是我刚刚开始学习的,完全搞不懂,玩这个USB摄像头淘宝上买的杂牌子,我在xp 下测试了一下,只能保证芯片是芯片是ZC0301PL。 其它都未知。
现在开始正文:( 博文来自**** Acanoe 的博客:http://blog.****.net/ACanoe
我的操作环境是、主机:xp + VMware ubuntu 10.10 。 开发板:OK6410 A板。 使用内核:Linux 2.6.36.2 。 使用软件: mjpg-streamer
1、配置内核支持 中微星的 ZC3XX 摄像头。
Device Drivers ->
Multimedia devices->
<*>video for linux
[*]video capture adapters->
[*]V4l USB devices ->
<*>USB video class (UVC)
[*] UVC input events device support
<*>GSPCA based webcams ->
<*>ZC3XX USB Camera Driver
配置好了以后编译内核,下载到开发板。
[root@FORLINX6410]# usb 1-1: new full speed USB device using s3c2410-ohci and ad
dress 4
usb 1-1: New USB device found, idVendor=0ac8, idProduct=301b
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1: Product: PC Camera
usb 1-1: Manufacturer: Vimicro Corp.
gspca: probing 0ac8:301b
zc3xx: probe sensor -> 000a
zc3xx: Find Sensor PB0330. Chip revision 0
input: zc3xx as /class/input/input2
gspca: video0 created
[root@FORLINX6410]#
释放 USB 摄像头 的打印信息是:
[root@FORLINX6410]# usb 1-1: USB disconnect, address 4
gspca: video0 disconnect
gspca: video0 released
[root@FORLINX6410]#
3、编译安装:mjpg-streamer
移植参考了百度文库的
基于TQ2440开发板的Linux-2.6.30.4的网络现, 下载地址为:
http://wenku.baidu.com/view/9c712cd950e2524de5187e76.html
CHANGELOG mjpg-streamer plugins
LICENSE mjpg_streamer scripts
Makefile mjpg_streamer.c start.sh
README mjpg_streamer.h utils.c
TODO mjpg_streamer.o utils.h
input_file.so output_file.so utils.o
input_testpicture.so output_http.so www
input_uvc.so output_udp.so
[root@FORLINX6410]#
i: Using V4L2 device.: /dev/video0
i: Desired Resolution: 640 x 480
i: Frames Per Second.: 5
i: Format............: MJPEG
Adding control for Pan (relative)
UVCIOC_CTRL_ADD - Error: Invalid argument
Adding control for Tilt (relative)
UVCIOC_CTRL_ADD - Error: Invalid argument
Adding control for Pan Reset
UVCIOC_CTRL_ADD - Error: Invalid argument
Adding control for Tilt Reset
UVCIOC_CTRL_ADD - Error: Invalid argument
Adding control for Pan/tilt Reset
UVCIOC_CTRL_ADD - Error: Invalid argument
Adding control for Focus (absolute)
UVCIOC_CTRL_ADD - Error: Invalid argument
mapping control for Pan (relative)
UVCIOC_CTRL_MAP - Error: Invalid argument
mapping control for Tilt (relative)
UVCIOC_CTRL_MAP - Error: Invalid argument
mapping control for Pan Reset
UVCIOC_CTRL_MAP - Error: Invalid argument
mapping control for Tilt Reset
UVCIOC_CTRL_MAP - Error: Invalid argument
mapping control for Pan/tilt Reset
UVCIOC_CTRL_MAP - Error: Invalid argument
mapping control for Focus (absolute)
UVCIOC_CTRL_MAP - Error: Invalid argument
mapping control for LED1 Mode
UVCIOC_CTRL_MAP - Error: Invalid argument
mapping control for LED1 Frequency
UVCIOC_CTRL_MAP - Error: Invalid argument
mapping control for Disable video processing
UVCIOC_CTRL_MAP - Error: Invalid argument
mapping control for Raw bits per pixel
UVCIOC_CTRL_MAP - Error: Invalid argument
o: www-folder-path...: ./www/
o: HTTP TCP port.....: 8080
o: username:password.: disabled
o: commands..........: enabled