openwrt 的/etc/config/wireless 文件解析

时间:2015-06-08 18:53:00   收藏:0   阅读:633

原文:http://blog.csdn.net/hui523hui523hui523/article/details/38493725

 

1.2.2 无线网络Wireless

WiFi设置储存在/etc/config/wireless中(目前支持Broadcom, Atheros 和mac80211)。当第一次启动路由器时,将会自动检测你的卡并且创建简单的配置文件。默认情况下 ‘option network lan‘ 是被注释掉的。它提供了一个非安全的无线网络共享。

The WiFi settings are configured in the file /etc/config/wireless(currently supported on Broadcom, Atheros and mac80211). When booting the router for the first time it should detect your card and create a sample configuration file. By default ‘option network lan‘ is commented. This prevents unsecured sharing of the network over the wireless interface.

每一个无线驱动都有自己的配置脚本/lib/wifi/driver_name.sh ,用来处理驱动选项和配置。这个脚本也调用特殊二进制,例如Broadcom的w1c,或者atheros的hostapd 和wpa_supplicant 。

Each wireless driver has its own configuration script in /lib/wifi/driver_name.sh which handles driver specific options and configurations. This script is also calling driver specific binaries like wlc for Broadcom, or hostapd and wpa_supplicant for atheros.

使用不同的架构配置是因为不同的驱动配置。

The reason for using such architecture, is that it abstracts the driver configuration.

标准的Broadcom无线配置: Generic Broadcom wireless config:

config wifi-device "wl0" 
option type "broadcom" 
option channel "5" 

config wifi-iface 
option device "wl0" 
option network lan 
option mode "ap" 
option ssid "OpenWrt" 
option hidden "0" 
option encryption "none"

标准的Atheros无线配置: Generic Atheros wireless config:

config wifi-device "wifi0" 
option type "atheros" 
option channel "5" 
option hwmode "11g" 

config wifi-iface 
option device "wifi0" 
option network lan 
option mode "ap" 
option ssid "OpenWrt" 
option hidden "0" 
option encryption "none"

标准的mac80211无线配置: Generic mac80211 wireless config:

config wifi-device "wifi0" 
option type "mac80211" 
option channel "5" 

config wifi-iface 
option device "wlan0" 
option network lan 
option mode "ap" 
option ssid "OpenWrt" 
option hidden "0" 
option encryption "none"

标准的多播Atheros无线配置: Generic multi-radio Atheros wireless config:

config wifi-device wifi0 
option type atheros 
option channel 

config wifi-iface 
option device wifi0 
option network lan 
option mode ap 
option ssid OpenWrt_private 
option hidden 
option encryption none 

config wifi-device wifi1 
option type atheros 
option channel 11 

config wifi-iface 
option device wifi1 
option network lan 
option mode ap 
option ssid OpenWrt_public 
option hidden 
option encryption none

这个文件里有两个类型的配置段。wifi-device针对物理wifi接口,wifi-iface配置了一个在wifi-device之上的虚拟接口(需要被驱动支持)。

There are two types of config sections in this file. The ‘wifi-device‘ refers to the physical wifi interface and ‘wifi-iface‘ configures a virtual interface on top of that (if supported by the driver).

无线配置全概括:A full outline of the wireless configuration file with description of each field:

 

config wifi-device wifi device name 
option type broadcom, atheros, mac80211 
option country us, uk, fr, de, etc. 
option channel 1-14 
option maxassoc 1-128 (broadcom only) 
option distance 1-n 
option hwmode 11b, 11g, 11a, 11bg (atheros, mac80211) 
option rxantenna 0,1,2 (atheros, broadcom) 
option txantenna 0,1,2 (atheros, broadcom) 
option txpower transmission power in dBm 

config wifi-iface 
option network the interface you want wifi to bridge with 
option device wifi0, wifi1, wifi2, wifiN 
option mode ap, sta, adhoc, monitor, or wds 
option txpower (deprecated) transmission power in dBm 
option ssid ssid name 
option bssid bssid address 
option encryption none, wep, psk, psk2, wpa, wpa2 
option key encryption key 
option key1 key 
option key2 key 
option key3 key 
option key4 key 
option server ip address 
option port port 
option hidden 0,1 
option isolate 0,1

 

 

 

wifi-device的配置项: Options for the wifi-device :

wifi-iface的配置: Options for the wifi-iface :

原文:http://www.cnblogs.com/yinsua/p/4561530.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!