network
/etc/config/network
==========================
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fd59:af0e:370b::/48'
config interface 'lan'
# option ifname 'eth0.1'
# option force_link '1'
# option type 'bridge'
# option proto 'static'
# option ipaddr '192.168.1.1'
# option netmask '255.255.255.0'
# option ip6assign '60'
option ifname 'eth0.1'
option proto 'dhcp'
option macaddr ':'
config interface 'wan'
option ifname 'eth0.2'
option proto 'dhcp'
option macaddr ':'
config interface 'wan6'
option ifname '@wan'
option proto 'dhcpv6'
config switch
option name 'rt305x'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'rt305x'
option vlan '1'
option ports '0 1 2 3 6t'
config switch_vlan
option device 'rt305x'
option vlan '2'
option ports '4 6t'
=============================
wireless
/etc/config/wireless
==================================
config wifi-device 'radio0'
option type 'mac80211'
option channel '11'
option hwmode '11g'
option path '10180000.wmac'
option htmode 'HT20'
option txpower '20'
option country '00'
config wifi-iface
option device 'radio0'
option network 'lan'
option encryption 'none'
option ssid 'OpenWrt_charlieu'
option mode 'sta'
option wds '1'
===============================
config wifi-device 'radio0'
option type 'mac80211'
option channel '11'
option hwmode '11g'
option path '10180000.wmac'
option htmode 'HT20'
option txpower '20'
option country '00'
option disabled '1'
config wifi-iface
option ssid 'TP-LINK_EBF4'
option encryption 'psk2'
option device 'radio0'
option mode 'sta'
option bssid '14:75:90:B5:EB:F4'
option key '12345678'
option network 'wwan
===========================
mjpg_streamer -i "input_uvc.so -y" -o "output_http.so -w www"
如果是普通的摄像头使用下面的命令(输出格式为yuv的摄像头):
mjpg_streamer -i "input_uvc.so -f 10 -r 320*240 -y" -o "output_http.so -w www"
带mjpg压缩的usb 摄像头:
mjpg_streamer -i "input_uvc.so -f 10 -r 320*240" -o "output_http.so -w www"