ubnt解决方案
查看: 15488|回复: 3

[分享] OPENWRT 挂 ZC301(ZC3XX)摄像头 白话教程 超级详细

[复制链接]

261

回帖

1502

积分

125 小时

在线时间

上尉

注册时间
2008-11-23
金币
545 个
威望
110 个
荣誉
10 个

尚未签到

发表于 2010-11-30 20:17 |显示全部楼层
本帖最后由 sknrv 于 2010-11-30 20:24 编辑

发现好多人没搞明白,所以自己会弄了,顺便写个教程,自己以后可能也用得到!
将DB120设置成二级路由
1。网络——接口——WAN——协议——改成无——保存
2。网络——接口——LAN——设置IP(与上级路由同一IP段)——网关与DNS(DNS在添加里)为上级路由IP——保存应用
重起路由

重新登陆WEB管理时用刚刚设置的LAN IP(如果连接不上新的IP,检查下电脑的IP是否跟路由IP在同一网段,如果在同一网段,但是PING不通,可将电脑的本地连接 禁用了再启用)

此时电脑可以通过路由上网,说明二级路由设置成功。

开始挂摄像头:
1、登陆路由WEB管理:系统——软件包——编辑软件包列表和安装对象——将http://downloads.openwrt.org改成http://downloads.x-wrt.org/xwrt——提交
2、启动SecureCRT——ALT+Q——主机名:输入路由IP——连接——接受并保存——输入路由用户名(默认root)——输入路由密码(默认admin)——确定登陆
3、命令开始(红字为命令,黑字为结果,如果摄像头型号不同,需将最后一个包更改)
root@OpenWrt:~# opkg update
Downloading http://downloads.x-wrt.org/xwrt/backfire/10.03/brcm63xx/packages/Packages.gz.
Inflating http://downloads.x-wrt.org/xwrt/backfire/10.03/brcm63xx/packages/Packages.gz.
Updated list of available packages in /var/opkg-lists/packages.
root@OpenWrt:~# opkg install kmod-i2c-core
Installing kmod-i2c-core (2.6.32.10-1) to root...
Downloading http://downloads.x-wrt.org/xwrt/backfire/10.03/brcm63xx/packages/kmod-i2c-core_2.6.32.10-1_brcm63xx.ipk.
Configuring kmod-i2c-core.
root@OpenWrt:~# opkg install kmod-video-core
Installing kmod-video-core (2.6.32.10-1) to root...
Downloading http://downloads.x-wrt.org/xwrt/backfire/10.03/brcm63xx/packages/kmod-video-core_2.6.32.10-1_brcm63xx.ipk.
Configuring kmod-video-core.
root@OpenWrt:~# opkg install kmod-usb-video
Installing kmod-usb-video (2.6.32.10-1) to root...
Downloading http://downloads.x-wrt.org/xwrt/backfire/10.03/brcm63xx/packages/kmod-usb-video_2.6.32.10-1_brcm63xx.ipk.
Configuring kmod-usb-video.
root@OpenWrt:~# opkg remove kmod-usb-video (#这里不知道为什么要删除了下面再装上,请高手指教)
Removing package kmod-usb-video from root...
root@OpenWrt:~# opkg install kmod-usb-video
Installing kmod-usb-video (2.6.32.10-1) to root...
Downloading http://downloads.x-wrt.org/xwrt/backfire/10.03/brcm63xx/packages/kmod-usb-video_2.6.32.10-1_brcm63xx.ipk.
Configuring kmod-usb-video.
root@OpenWrt:~# opkg install kmod-video-gspca-core
Installing kmod-video-gspca-core (2.6.32.10-1) to root...
Downloading http://downloads.x-wrt.org/xwrt/backfire/10.03/brcm63xx/packages/kmod-video-gspca-core_2.6.32.10-1_brcm63xx.ipk.
Configuring kmod-video-gspca-core.
root@OpenWrt:~# opkg install kmod-video-gspca-zc3xx
Installing kmod-video-gspca-zc3xx (2.6.32.10-1) to root...
Downloading http://downloads.x-wrt.org/xwrt/backfire/10.03/brcm63xx/packages/kmod-video-gspca-zc3xx_2.6.32.10-1_brcm63xx.ipk.
Configuring kmod-video-gspca-zc3xx.
到此摄像头已经挂完,输入以下命令看看是否挂上。
root@OpenWrt:~# dmesg | grep usb
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
usbcore: registered new interface driver rtl8187
usbcore: registered new interface driver p54usb
usb usb1: configuration #1 chosen from 1 choice
usb usb2: configuration #1 chosen from 1 choice
usbcore: registered new interface driver usblp
usb 2-1: new full speed USB device using bcm63xx_ohci and address 2
usbcore: registered new interface driver usbserial
usb 2-1: configuration #1 chosen from 1 choice
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial Driver core
usbcore: registered new interface driver usb-storage
usbcore: registered new interface driver zd1211rw
usb 2-1: USB disconnect, address 2
usb 2-1: new full speed USB device using bcm63xx_ohci and address 3
usb 2-1: configuration #1 chosen from 1 choice
usbcore: registered new interface driver zc3xx
看到最后一行,说明已经挂上。

4、开始安装监控程序motion
root@OpenWrt:~# opkg install motion
Installing motion (3.2.11.1-1) to root...
Downloading http://downloads.x-wrt.org/xwrt/backfire/10.03/brcm63xx/packages/motion_3.2.11.1-1_brcm63xx.ipk.
Installing libjpeg (6b-1) to root...
Downloading http://downloads.x-wrt.org/xwrt/backfire/10.03/brcm63xx/packages/libjpeg_6b-1_brcm63xx.ipk.
Configuring libjpeg.
Configuring motion.
root@OpenWrt:~# vi /overlay/etc/motion.conf
我的编辑文件内容如下(这个是引用别人的设置)(按字母o之后可编写,用DEL键来删除)
# Rename this distribution example file to motion.conf
#
# This config file was generated by motion "3.2.11.1"


############################################################
# Daemon
############################################################

# Start in daemon (background) mode and release terminal (default: off)
daemon off (此处 on改为off)

# File to store the process ID, also called pid file. (default: not defined)
process_id_file /var/run/motion/motion.pid

############################################################
# Basic Setup Mode
############################################################

# Start in Setup-Mode, daemon disabled. (default: off)
setup_mode off

###########################################################
# Capture device options
############################################################

# Videodevice to be used for capturing (default /dev/video0)
# for FreeBSD default is /dev/bktr0
videodevice /dev/video0



# Image width (pixels). Valid range: Camera dependent, default: 352
width 320 (视频宽)

# Image height (pixels). Valid range: Camera dependent, default: 288
height 240 (视频高)





# Motion Detection Settings:
############################################################

# Threshold for number of changed pixels in an image that
# triggers motion detection (default: 1500)
threshold 1500 (这个是改变探测灵敏度,越小越灵敏)
# Automatically tune the threshold down if possible (default: off)
threshold_tune off

# Noise threshold for the motion detection (default: 32)
noise_level 32

# Automatically tune the noise threshold (default: on)
noise_tune on







# Live Webcam Server
############################################################

# The mini-http server listens to this port for requests (default: 0 = disabled)
webcam_port 8081 #远程端口
# Quality of the jpeg images produced (default: 50)
webcam_quality 50

# Output frames at 1 fps when no motion is detected and increase to the
# rate given by webcam_maxrate when motion is detected (default: off)
webcam_motion off

# Maximum framerate for webcam streams (default: 1)
webcam_maxrate 1

# Restrict webcam connections to localhost only (default: on)
webcam_localhost off #必须改成off才能通过pc访问

# Limits the number of images per connection (default: 0 = unlimited)
# Number can be defined by multiplying actual webcam rate by desired number of seconds
# Actual webcam rate is the smallest of the numbers framerate and webcam_maxrate
webcam_limit 0

target_dir /tmp/cam1 保存目录

############################################################
# HTTP Based Control
############################################################

# TCP/IP port for the http server to listen on (default: 0 = disabled)
control_port 8080

# Restrict control connections to localhost only (default: on)
control_localhost on

# Output for http server, select off to choose raw text plain (default: on)
control_html_output on

# Authentication for the http based control. Syntax username:password
# Default: not defined (Disabled)
; control_authentication username:password

##############################################################
# Thread config files - One for each camera.
# Except if only one camera - You only need this config file.
# If you have more than one camera you MUST define one thread
# config file for each camera in addition to this config file.
##############################################################

# Remember: If you have more than one camera you must have one
# thread file for each camera. E.g. 2 cameras requires 3 files:
# This motion.conf file AND thread1.conf and thread2.conf.
# Only put the options that are unique to each camera in the
# thread config files.
thread /etc/thread1.conf
thread /etc/thread2.conf
# thread /etc/thread3.conf
# thread /etc/thread4.conf #如果有多个摄像头要把使用这部分,否则全部注释掉

编辑完后依次按ESC Z Z 退出编辑

开启MOTION
输入cd / (回到根目录)
输入cd /etc (进到etc目录)
输入motion -c motion.conf (开启motion)

设置完毕!
可以用PC查看了
在windows下也可以使用palantir (在这里下载http://www.fastpath.it/products/palantir/pub/pclient.exe) 的pc客户端 连接 路由IP:8081

评分

2

查看全部评分

504

回帖

2199

积分

218 小时

在线时间

少校

注册时间
2009-12-11
金币
1620 个
威望
6 个
荣誉
0 个

尚未签到

发表于 2010-11-30 20:37 |显示全部楼层
{:2_31:}  不错 不错 有时间 得试试 呵呵 不过还得买指定的 摄像头啊
回复

使用道具 举报

51

回帖

1万

积分

1042 小时

在线时间

上校

注册时间
2010-9-29
金币
16408 个
威望
8 个
荣誉
0 个
累计签到:1487 天
连续签到:0 天
[LV.1825]无线元老
发表于 2010-12-1 09:12 |显示全部楼层
看不懂,围观一下而已。
回复

使用道具 举报

头像被屏蔽

1180

回帖

8643

积分

703 小时

在线时间

禁止发言

注册时间
2008-8-28
金币
7287 个
威望
1 个
荣誉
0 个

尚未签到

发表于 2010-12-1 15:54 |显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册 微信登录

本版积分规则

站点统计 | Archiver | 手机版 | 无线门户 ( 粤ICP备11076993号|粤公网安备44010602008359号 ) |网站地图

GMT+8, 2024-12-22 23:27

返回顶部 返回列表