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

原文: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 1

config wifi-iface 
option device wifi0 
# option network lan 
option mode ap 
option ssid OpenWrt_private 
option hidden 0 
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 1 
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 1 
option key2 key 2 
option key3 key 3 
option key4 key 4 
option server ip address 
option port port 
option hidden 0,1 
option isolate 0,1

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

  • type 
    该接口使用的驱动。The driver to use for this interface.
  • country 
    国家代码用来指名规定设置。The country code used to determine the regulatory settings.
  • channel 
    wifi频道(例如1-14,取决于country设置)The wifi channel (e.g. 1-14, depending on your country setting).
  • maxassoc 
    可选:最大的可连接客户端。这个特性只在broadcom芯片组上可选。可选的: Maximum number of associated clients. This feature is supported only on the broadcom chipset.
  • distance 
    可选的: Distance between the ap and the furthest client in meters. This feature is supported only on the atheros chipset.
  • mode 
    The frequency band (b, g, bg, a). This feature is only supported on the atheros chipset.
  • diversity 
    可选的: Enable diversity for the Wi-Fi device. This feature is supported only on the atheros chipset.
  • rxantenna 
    可选的: Antenna identifier (0, 1 or 2) for reception. This feature is supported by atheros and some broadcom chipsets.
  • txantenna 
    可选的: Antenna identifier (0, 1 or 2) for emission. This feature is supported by atheros and some broadcom chipsets.
  • txpowerSet the transmission power to be used. The amount is specified in dBm.

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

    • network 
      选择/etc/config/network中的接口段 Selects the interface section from /etc/config/networkto be used with this interface
    • device 
      设置设备名称Set the wifi device name.
    • mode 
      可选模式:Operating mode:
      • ap 
        接入点模式Access point mode
      • sta 
        客户端模式Client mode
      • adhoc 
        Ad-Hoc mode
      • monitor 
        监控模式Monitor mode
      • wds 
        WDS点对点连接 WDS point-to-point link
    • ssid 设置wifi设备使用的SSID Set the SSID to be used on the wifi device.
    • bssid设置BSSID 地址用来设置wds的mac地址。Set the BSSID address to be used for wds to set the mac address of the other wds unit.
    • txpower(Deprecated, set in wifi-device) Set the transmission power to be used. The amount is specified in dBm.
    • encryption 
      加密设置。可设置为以下值:Encryption setting. Accepts the following values:
      • none
      • wep
      • psk, psk2 
        WPA(2) Pre-shared Key
      • wpa, wpa2 
        WPA(2) RADIUS
    • key, key1, key2, key3, key4(wep, wpa and psk) 
      WEP key, WPA key (PSK mode) or the RADIUS shared secret (WPA RADIUS mode)
    • server(wpa) 
      The RADIUS server ip address
    • port(wpa) 
      The RADIUS server port (defaults to 1812)
    • hidden 
      0 broadcasts the ssid; 1 disables broadcasting of the ssid
    • isolate 
      可选的: Isolation is a mode usually set on hotspots that limits the clients to communicate only with the AP and not with other wireless clients. 0 disables ap isolation (default); 1 enables ap isolation.
时间: 2024-08-04 13:23:44

openwrt 的/etc/config/wireless 文件解析的相关文章

转载:AAC文件解析及解码

转自:http://blog.csdn.net/wlsfling/article/details/5876016 http://www.cnblogs.com/gaozehua/archive/2012/05/03/2479960.html OUTLINE: * AAC概述 * AAC规格简述 * AAC特点 * AAC音频文件解析 --ADIF&ADTS格式 --ADIF&ADTS头信息 --ADIF&ADTS数据信息 --AAC文件处理流程 * AAC解码流程 --技术解析 *

paper 37 : WINCE的BIB文件解析

WINCE的BIB文件解析 BIB的全称为Binary Image Builder,在Wince编译过程中的最后MakeImage阶段会用到BIB文件,BIB文件的作用是指示构建系统如何构建二进制映像.所有的BIB文件会被合并成CE.bib文件,然后打包工具Romimage.exe会根据BIB文件中的描述来决定哪些文件最终被包含到WINCE image中,BIB文件还决定了WINCE设备内存的分配,比如定义了WINCE image占用哪块内存,显存(Framebuffer)占用哪块内存等. BI

AAC 文件解析及解码流程(音频术语aac he lc等及其功能性的描述)

OUTLINE: * AAC概述 * AAC规格简述 * AAC特点 * AAC音频文件解析 --ADIF&ADTS格式 --ADIF&ADTS头信息 --ADIF&ADTS数据信息 --AAC文件处理流程 * AAC解码流程 --技术解析 * 术语说明 一.AAC概述 AAC是高级音频编码(Advanced Audio Coding)的缩写,出现于1997年,最初是基于MPEG-2的音频编码技术.由Fraunhofer IIS.Dolby Laboratories.AT&

webpack配置之webpack.config.js文件配置

webpack配置之webpack.config.js文件配置 webpack.config.js webpack resolve 1.总是手动的输入webpack的输入输出文件路径,是一件非常繁琐的事情.我们尝试用文件的形式将输入输出文件夹配置好.新建一个js文件,并命名为webpack.config.js[目前只能命名为这个,不然程序不识别] webpack.config.js 2.在webpack.config.js文件内输入以下代码 module.exports = { entry: '

python yaml 文件解析及str、repr函数的说明

记录说明 yaml 文件解析的方法及str.repr函数的区别 1. yaml 文件解析 config.yml site_name: AJPy pages: - Introduction: index.md - AJP overview: ajp.md theme: readthedocs code: 中文 解析yaml 文件 import yaml import os class OperateYaml(object): """ 操作yaml 文件 ""

Intel HEX文件解析

近期有一个需求就是为Arduino开发板做一个基于蓝牙的无线烧录程序.眼下的Arduino程序都是通过USB线连接到电脑的主机上,实际的传输过程是基于USB协议的,这个过程还是比較麻烦的.由于每次的编译完以后都须要通过一个USB线来完毕传输烧录的工作,这个还是非常麻烦的. 原理解读 在Arduino中.利用USB来完毕传输烧录大概是这么一个过程. 每一个Arduino源程序.即sketch文件,经过一系列的编译处理以后.终于会形成一个Intel HEX格式的文件.这个HEX文件事实上就一个被封装

Android项目中的config.xml文件 “config.xml”

Android应用程序需要保存一些配置时,可以将这些配置项放置到values/config.xml文件中. 实例分析: <?xml version="1.0" encoding="utf-8"?> <!-- /* ** Copyright 2009, The Android Open Source Project ** ** Licensed under the Apache License, Version 2.0 (the "Lice

AndroidNative层文件解析漏洞挖掘指南

| 导语 本文以手Q的一次文件解析类漏洞挖掘为例,叙述了Android Native层文件解析类型漏洞挖掘的过程 手Q这个应用从功能来说十分的庞大,如果使用类似MFFA的框架去挖掘文件解析类漏洞,效率低,而且文件入口在哪儿.如何利用脚本进行自动化都是非常大的问题.本文在一次手Q的文件解析类漏洞挖掘的过程中,提出了一种可能的解决问题的方案,妄称指南不吝赐教. 目录: 1.问题分析 2.流程图 3.so筛选 4.测试程序编写 5.test case生成 6.测试得出crash 7.未来的工作 0x0

MyBatis2:config.xml文件

前言 前一篇文章,讲了MyBatis入门,讲到了MyBatis有两个基本的配置文件,一个用来配置环境信息,一个用来写SQL语句.前者我把它命名为config.xml,config.xml的内容是: <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "htt