Uniform AG1311 Users manual

őųŦűŢųŦť
ŌŦůůźġńũŦů
ŇŇŏĵıijłġʼnŢųťŸŢųŦġŔűŦŤį łűűųŰŷŦť
ŔűŦůŤŦųġńũŦů ĴįIJIJįijıIJĴ
œŦŷŪŴŪŰů ŷŦųġIJįIJ
Description
CPU
Switch port
Power Input
DC jack
ĶŗĭġŮŪůŪŅńġŋŢŤŬ
I/O & Peripherial
JTAG
ŏİł
RS-232 (console)
ŤŰůŴŰŭŦġűŰųŵġŸŪŵũġĵĮűŪůġűŪůġũŦŢťġŤŰůůŦŤŵŰų
USB
ŐůŦġűŰųŵĭġŖŔŃġijįıġũŰŴŵ
USB extension
ķĮűŪůġŦŹŵŦůťŦťġŧųŰŮġŖŔŃġűŰųŵ
Wifi antenna
ŷŪŢġŔŎłġœŇġŤŰůůŦŤŵŰųġŧŰųġŦŹŵŦųůŢŭġŢůŵŦůůŢ
LEDs
ķġōņŅŴ
Reset Button
ŚŦŴĭġŔŰŧŵŸŢųŦġœŦŴŦŵ
Environmental
PCB dimension
ĶĸŮŮġīġĸıġŮŮ
Housing
ŕŅŃ
Operating temperature
ıƱńġſĶıƱń
1
Flash DRAM RTC Ethernet RF
Humidity
ĹıijįIJIJůġŸŪŧŪġŔźŴŵŦŮġŎŰťŶŭŦ
łŵũŦųŰŴġłœĺĴĴIJġĩłœIJĴIJIJĪ ĹġŎŃ ĴijġŎŃ ŏŰ IJıİIJııġŎţűŴġŇŢŴŵġņŵũŦųůŦŵġīijġĩŰűŵŪŰůŢŭġŵŰġŐůŦġœŋĮĵĶĪ IJŕIJœĭġĹıijįIJIJůĭġũŪĮűŰŸŦųġĩĶııġŮŸĪ(2.4GHz Band)
ĺıĦġůŰůĮŤŰůťŦůŴŪŷŦ
GPIO definition
ňőŊŐġı ōņŅġIJ ňőŊŐġIJĴ ōņŅġij ňőŊŐġIJĸ ōņŅġĴ őŰŸŦų ōņŅġĵ ňőŊŐġijĸ ōņŅġĶ ňőŊŐġijķ ōņŅġķ ňőŊŐġijı ŊƳńġŅŢŵŢ ňőŊŐġijĴ ŊƳńġńŭŰŤŬ ňőŊŐġIJij œŦŴŦŵġţŶŵŵŰůġĩŴŰŧŵŸŢųŦġœŦŴŦŵĪ
Revision record
2
ųŦŷįIJįIJŎ
PRELIMINARY
3
Revision History
Revision Date Description
0.5 November
Original Release
2008
0.6 November
Updated to include Web interface and configuration methods.
2008
0.7 Jan 2010 Updated for UMAC baseline
PRELIMINARY
Table of Contents
4
1 Introduction................................................................................................................................................ 6
1.1 Top Level architecture ........................................................................................................................ 6
1.2 Fusion Overview................................................................................................................................. 6
1.3 Lower MAC........................................................................................................................................ 7
1.3.1 HAL .................................................................................................................................................... 7
1.3.2 ATH .................................................................................................................................................... 7
1.3.3 Rate Control ........................................................................................................................................ 7
1.3.4 Packet Logging ................................................................................................................................... 8
1.3.5 DFS ..................................................................................................................................................... 8
1.4 Upper MAC ........................................................................................................................................ 8
1.4.1 802.11 Layer ....................................................................................................................................... 8
1.4.2 Shim Layer.......................................................................................................................................... 8
1.5 WLAN Driver Interface and OS Abstraction Layer ........................................................................... 9
1.6 WBUF Abstraction ............................................................................................................................. 9
2 User Interface........................................................................................................................................... 10
2.1 Configuration File............................................................................................................................. 10
2.2 Environmental Variables................................................................................................................... 10
2.3 Shell Scripts ...................................................................................................................................... 19
2.3.1 Initialization Scripts .......................................................................................................................... 26
2.3.1.1 rcS ..................................................................................................................................................... 27
2.3.1.2 rc.network ......................................................................................................................................... 27
2.3.1.3 rc.bridge ............................................................................................................................................ 27
2.3.1.4 rc.wlan............................................................................................................................................... 27
2.3.2 Driver Operation Scripts ................................................................................................................... 27
2.3.2.1 makeVAP.......................................................................................................................................... 28
2.3.2.2 activateVAP ...................................................................................................................................... 29
2.3.2.3 killVAP ............................................................................................................................................. 29
2.3.3 Compatibility Scripts ........................................................................................................................ 29
2.3.3.1 apup................................................................................................................................................... 29
2.3.3.2 apdown.............................................................................................................................................. 29
2.4 Wireless Tools .................................................................................................................................. 30
2.4.1 iwconfig ............................................................................................................................................ 30
2.4.2 iwpriv ................................................................................................................................................ 32
2.4.2.1 Radio Layer....................................................................................................................................... 33
2.4.2.2 Protocol Layer................................................................................................................................... 41
2.4.2.3 WMM related.................................................................................................................................... 42
2.4.2.4 Security Related ................................................................................................................................ 44
2.4.2.5 802.11n related.................................................................................................................................. 48
2.4.2.6 Regulatory commands....................................................................................................................... 52
2.4.2.6.1 General commands .................................................................................................................... 54
2.4.3 Changing parameters using iwconfig and iwpriv..............................................................................63
2.5 wlanconfig utility .............................................................................................................................. 63
2.5.1 Creating a VAP ................................................................................................................................. 63
PRELIMINARY
5
2.5.2
Listing VAP Parameters.................................................................................................................... 63
2.5.2.1 Station (sta) ....................................................................................................................................... 64
2.5.2.2 AP List (ap)....................................................................................................................................... 65
2.5.2.3 Channel (chan).................................................................................................................................. 65
2.5.2.4 Capabilities (caps)............................................................................................................................. 66
2.5.2.5 WMM Configuration (wme)............................................................................................................. 66
2.5.3 Deleting a VAP ................................................................................................................................. 66
3 AP Configuration Guide .......................................................................................................................... 67
3.1 AP Modes of Operation .................................................................................................................... 67
3.1.1 Network Configuration ..................................................................................................................... 67
3.1.1.1 Bridged Mode ................................................................................................................................... 67
3.1.1.2 Static IP address Mode...................................................................................................................... 67
3.1.1.3 DHCP Client ..................................................................................................................................... 67
3.1.1.4 DHCP Server .................................................................................................................................... 67
3.1.2 Radio Configuration.......................................................................................................................... 68
3.1.3 Operating Mode ................................................................................................................................ 68
3.2 Security ............................................................................................................................................. 69
3.2.1 WEP Configuration........................................................................................................................... 69
3.2.2 WPA.................................................................................................................................................. 69
3.2.2.1 Enabling WPA Preauthorization (AP only) ...................................................................................... 69
3.2.2.2 WPA PSK ......................................................................................................................................... 70
3.2.2.3 WPA Enterprise ................................................................................................................................ 70
3.2.3 WSC Configuration........................................................................................................................... 70
3.2.3.1 Including WSC in the build............................................................................................................... 70
3.2.3.2 Activating WSC support on the AP .................................................................................................. 70
3.3 VLAN Configuration ........................................................................................................................ 71
3.3.1 Bridge configuration in mBSSID and VLAN mode ......................................................................... 72
3.4 Multiple BSS..................................................................................................................................... 72
3.4.1 Multiple Open APs............................................................................................................................ 72
3.4.2 Multiple AP’s with different security modes .................................................................................... 73
3.4.3 Changing Parameters in mBSSID Modes ......................................................................................... 73
3.5 Wi-Fi Distribution System (WDS).................................................................................................... 73
3.5.1 AP With Single WDS Repeater ........................................................................................................ 73
3.5.1.1 Limitations ........................................................................................................................................ 73
3.5.1.2 Setup Instructions.............................................................................................................................. 74
3.5.2 AP with Multiple Repeaters .............................................................................................................. 74
3.5.2.1 Limitations ........................................................................................................................................ 75
3.5.2.2 Setup Instructions.............................................................................................................................. 75
3.5.3 WDS Bridge with single span........................................................................................................... 75
3.5.3.1 Limitations ........................................................................................................................................ 75
3.5.3.2 Setup Instructions.............................................................................................................................. 76
3.5.4 WDS Bridge with multiple span ....................................................................................................... 76
3.5.4.1 Limitations ........................................................................................................................................ 76
3.5.4.2 Setup Instructions.............................................................................................................................. 77
3.6 Dual Concurrent Operations ..................................................................................................
Appe
ndix A Country Code Definition.......................................................................................................................... 78
........... 77
PRELIMINARY
6
1 Introduction
This manual provides information on the design and use of the Atheros AP system. This system consists of the OS kernel, utility functions, and the Atheros AP Driver.
1.1 Top Level architecture
This driver is based on the Atheros Universal Driver Architecture. This architecture abstracts the WLAN driver into various common sections that can be used for a variety of operating systems. OS specific components are well isolated, and the Atheros Driver Framework (ADF) provides abstractions of OS services such that the common code does not have to have ANY OS specific coding. The data packet abstraction, called WBUF, allows the driver to handle different OS specific frame formats in a common way. This abstraction has been used with both SKB and MBUF frame architectures successfully, and also works with Windows frame architectures.
The software design is moved to a further modularized architecture that allows for better isolation of data items and object oriented design. . Global variables are eliminated, and all layer functions are contained within a call structure.
1.2 Fusion Overview
The main driver for the Fusion architecture was the use of a common code base to support multiple operating systems. This allows for more efficient development processes, as well as the synergy of getting bug fixes for all major platforms at the same time.
The Fusion architecture consists of 4 major components. The first is the WLAN driver interface, which is the operating system unique interface adaptor that translates OS specific calls to Fusion “generic” calls. The second is the Upper MAC layer, which contains the bulk of the 802.11 protocol processing for both station and AP applications. In earlier versions of Fusion, this layer was implemented specifically for each operating system. In later versions, a common version of the Upper MAC is used to provide the protocol processing layer.
The third component is the Lower MAC, which contains the ATH and HAL layers. This layer is much more hardware centric, and is designed to support the needs of the Atheros chipset architecture. The fourth component is the OS Abstraction layer. This is a set of macros that is used to redefine “generic’ OS primitives into specific system calls that perform the required function. Functions such as register read/write, translation of OS packets into WBUF abstractions, and tasking control are all included in this section. A block diagram of the components and their relationship are shown in Figure 1.
˪˴˼˺ʳ
15.21 "Changes or modifications are not expressly approved by the manufacturer could void the user's authority to operate the equipment." The following sentence has to be displayed on the outside of device in which the transmitter module is installed "Contains FCC ID: This device uses, generates and radiated radio frequency energy. The radio frequency energy produced by this device is well below the maximum exposure allows by Federal Communications Commission(FCC).
TFJAG1311 "
PRELIMINARY
7
OS Abstraction Layer
STA/AP SME Scanning/Roaming
Base Objects (channel, ic, node, VAP)
ATH DEV
Figure 1 Fusion Top Level Block Diagram
WLAN Driver Interface
IEEE 802.11 Protocol Stack
Config
MLME PM
LMAC Interface
Atheros Device Object (ath dev)
Rate Control DFS
Hardware Abstraction Layer
AR5212
Mgmt Frm
Packet Logging
AR5416
1.3 Lower MAC
The Lower MAC portion consists of two main components: The Hardware Abstraction Layer (HAL), and the Atheros Device Object (ATH). The HAL contains all chip-specific settings and procedures that are performed to initialize and operate the device. The ATH layer is responsible for managing the data flow into the input queues of the hardware, as well as managing lower layer protocols, such as Block ACK processing.
1.3.1 HAL
HAL provides low-level primitives to program Atheros chipsets. HAL abstraction will allow runtime support of multiple chipset families and defines a common body of functions between chipsets with chipset differences being handled in specific components. Only low-level driver components can interface directly with HAL.
1.3.2 ATH
ATH_DEV module implements the low level MAC functionalities including:
x Unified transmit and receive path for both legacy and 11n chipsets. x Advanced 11n MAC features: aggregation, RIFS, MIMO power save, etc. x 802.11 network power save and device power state (D0-D3) management. x Beacon generation and TSF management. x Wake-On-Wireless support. x Key cache management. x RfKill, Customized LED and GPIO algorithms
ATH_DEV can be accessed through Atheros device object interface (section 1.2) by protocol shim layer.
1.3.3 Rate Control
The rate control algorithm attempts to transmit unicast packets at the optimum data rate. If there are changes in the propagation channel, the rate control algorithm will automatically step up or down to a data rate that allows reliable transmission at the fastest possible rate. The rate control can only be accessed by ath_dev, and should not by protocol stacks.
PRELIMINARY
8
pyqyg,
operating in the 5GHz band to detect the presence of rada
r systems. If a radar system is detected, the wireless
pg p
yy
device must avoid interfering with it and must
automatically switch to another frequency.
1.3.4 Packe
t Logging
Packet logging provides a low level mechanism to capture driver activities. It can log activities like transmit, receive, rate find and update, aggregation, ANI, and etc. Different operating system shall have its own tool to enable packet log and retrieve the log buffer.
1.3.5 DFS
1.3.5 DFS
This module implements the DFS or Dynamic Frequency Selection algorithm, which enables wireless devices
This module implements the DFS or Dynamic Frequency Selection algorithm, which enables wireless devices operating in the 5GHz band to detect the presence of radar systems. If a radar system is detected, the wireless device must avoid interfering with it and must automatically switch to another frequency.
1.4 Upper MAC
The Upper MAC is the portion of the MAC that performs most of the 802.11 protocol processing, and provides the interface to the OS networking stack. In the Fusion implementation, the Upper MAC consists of the 802.11 layer, and the so-called “shim” layer.
1.4.1 802.11 Layer
Most wireless LAN device driver today consists of two major components: a protocol stack and a low-level driver. Usually the protocol stack contains IEEE802.11 state machine, scanning/roaming, IE processing, and other device independent support needed by an 802.11 device. Although the functionalities of a protocol stack are largely platform independent, the actual implementation is often platform specific.
Many protocol stacks are available. The protocol stacks with the most support in the Fusion driver are the net80211 derivatives. They have been ported to NetBSD, Linux, Darwin, and Windows Vista. Another popular stack is Devicescape’s 802.11 stack in Linux kernel. Microsoft also has a separate stack for SoftAP on Vista.
1.4.2 Shim Layer
The Shim layer is provided in order to minimize changes to upper layers that have been implemented for non­fusion architectures. Since the HAL/ATH layers try to encapsulate internal data and only provide interfaces through the operations interface, the upper layer no longer have direct access to variables within the lower layers. The Shim layer is provided to expose various state and configuration variables to the upper layers in order to minimize changes to the upper layers.
The Shim layer uses the standard interfaces to the ATH/HAL layers to obtain state information. Since everything is written in the “C” language, this is enforced more through coding convention than through language restrictions. Because of the protocol stack is largely device independent, while a low level driver is protocol independent, a protocol shim layer is required to connect different components of the wireless LAN driver. Most importantly, it has the following operations:
x Register with IEEE802.11 protocol stack. x Register with operating system’s network stack. x Manage low level driver object (ath_dev, see section 1.4). x Forward packets between protocol stack and low level driver. x Translate control request and event indication between protocol stack and low
Figure 2 illustrates the operations of protocol shim layer.
level driver.
PRELIMINARY
9
net80211
Packets
Packets
Figure 2 UMAC Shim Layer
net80211 Requests
ath_dev APIs
1.5 WLAN Driver Interface and OS Abstraction Layer
Each operating system has its own networking and wireless driver interface, such as NDIS 6.0 with Revised Native WiFi in Windows Vista. The WLAN driver interface allows the driver to register with kernel, and defines data path and configuration path from/to network stack, such as OID for Windows Vista, iwconfig/iwpriv tools for Linux, and etc.
OS abstraction layer is a set of kernel services used by wireless LAN driver. A separate implementation is required for each platform. By having a consistent API across all platforms, driver developers can focus on the core wireless LAN logic. Currently supported operating systems are: NetBSD, Linux and Windows Vista.
1.6 WBUF Abstraction
A wbuf (wireless buffer) is a platform independent object to represent a network buffer. In WLAN world, it also represents an MSDU passed down by the protocol stack. The low level driver components treat wbuf as an opaque object defined by type wbuf_t, and access it only through a well defined interface. The wbuf APIs can be found in include/wbuf.h. Each platform should implement the same set of APIs in their OS abstraction layer. Usually the wbuf is associated with or mapped to native network buffer structures.
net80211 APIs
IF_ATH
ath_dev Indications
ATH_DEV
PRELIMINARY
10
2 User Interface
The user interface on the Linux AP baseline provides a rich set of capabilities via command line tools, and also provides a simplified web interface that can be used for quick AP configuration. The user interface is based on shell scripts and a configuration utility that will store configuration information in flash. The web interface also uses this utility to store information through boot cycles.
2.1 Factory Default File
The file /etc/ath/apcfg contains the “factory default” information for the AP. This is the data that is used to configure the device in the absence of other configuration information. If the configuration information is erased, this data will repopulate the configuration information files. The default values included in this file can be changed if the user so desires.
2.2 Configuration Tool
The purpose of the cgiMain utility is to provide a small program size mechanism for managing environmental configuration information in as efficient manner as possible. Major consideration has been applied to small footprint environments, where JFFS2 filesystem space is at a premium. Further, if no configuration information needs to be changed in the JFFS2 filesystem, the cramfs can be used to further reduce the flash footprint of the overall system.
2.2.1 Design
The main design intent was to provide a busybox like environment that can be used as a CGI program for getting environmental information, and further providing output formatting that will make the web pages easily configurable, but dynamic. This was done in lieu of other larger implementations, such as PHP or Python, simply for the smaller size requirement, and the customization required to use flash resources effectively.
The main engine will receive an input file and “translate” it, changing specially tagged parameters into their equivalent values. For example, let’s say that we have an environmental variable called AP_SSID, whose value is AP24. Further, let’s say we have a configuration file that has a line in the file of the form
ssid=<ssid value>.
We can put a tagged reference to the environmental variable in the configuration file, and then “translate” it to a scratch file:
Original file: ssid=~~AP_SSID~ Translated file: ssid=AP24
The translated file can be written to /tmp (ram disk), thus not requiring any more flash space to support the translation. A typical command line to implement this would be
# cgiMain –t2 /etc/ath/PSK.ap_bss > /tmp/vap2sec.bss
Where /etc/ath/PSK.ap_bss is the file containing the tags, and /tmp/vap0sec.bss is the file containing the translated version with tags replaced with values.
PRELIMINARY
11
2.2.1.1 Variable Names
All tags work with the names of environmental variables. These are passed either through the CGI interface when doing HTML pages, and/or read from the stored environmental data. There are two types of variable names used by the program:
Fixed Names: The standard name with no additions, like AP_SSID
Indexed Names: When variables are indexed by instance, they will typically have an extension, such as
All variable names fall within these two categories. Indexed names can be used in any tag value
2.2.1.2 File Tags
The used tag types are designed to support two main efforts. First, they will allow an HTML page to be created with tagged information that will be translated through the CGI interface. Secondly, in a command line format, it can be used to manage the values stored in the flash/cache areas, allowing the user to have either temporary or permanent parameter storage. Table 1 defines the available tags.
Table 1 Available File Tags
Tag Usage Example
AP_SSID_2. The indexed names are expressed as AP_SSID#, where the # is replaced by the index as specified in the –t (translate) option
~~VAR_NAME~ ~~VAR_NAME#~
Direct replacement of the environmental variable with its value. Variable must exist to produce a value. If the value does not exist, the tag is erased and no characters are substituted.
~~VAR_NAME:default~ ~~VAR_NAME#:default~
Direct Replacement with Default. If the variable exists, then its value is inserted. If it does not exist, then the “default” string will be substituted.
~`exec str`~ Execute the program or script enclosed in
` ` markers. The output of these programs will be processed to be displayable in HTML format (non breaking spaces will be added, and tabs translated). Note that any stderr output is not caught, and should be piped to /dev/null if to be used in a web page.
~cVAR_NAME:VAL~
Used for checkboxes in HTML files
~cVAR_NAME#:VAL
~sVAR_NAME:VAL~ ~sVAR_NAME:VAL~
~?VAR_NAME:VAL`exec str`~ ~?VAR_NAME#:VAL`exec str`~
~~AP_SSID~ ~~AP_SSID#~
~~AP_STARTMODE:dual~ ~~AP_CHMODE#:11NAHT20~
~`athstats 2>/dev/null`~
PRELIMINARY
12
2.2.1.3 Flash Usage
This program seeks to eliminate extra usage of flash resources by using an existing sector for storing date (the calibration sector). Note that the board and radio calibration data only take up the first 32 KB of flash storage, leaving the second 32 KB available. The permanent storage area for parameter data is put into this area without using a filesystem – the data is simply written to flash as a linear string of data. Parameters are stored in the “NAME=VALUE” format. The first 4 bytes of the data are flagged with a know value (0xfaf30020) as a synchronization value to verify the data is valid (as opposed to an “erased” flash). The data is assumed terminated if a value of 0x0 is found (note that all data is stored as ASCII, and can be read/edited in flash using u-boot).
A limit of 32 characters for variable names, and 64 characters for values are imposed. Adding the “=” and the <lf> terminators, each value has a maximum of 98 characters used. This means that a total number of (32768-4)/98 = 334 parameters can be stored in this area. Since many parameter names and values are much shorter, an estimate of 450-500 parameters is not unreasonable. Note that parameters will only take up the space required, not the full 32/64 byte area. The following is an example “dump” of the parameter data in flash:
ar7100> md 0xbf668000 bf668000: faf30020 49504144 44523d31 39322e31 ... IPADDR=192.1 bf668010: 36382e31 2e320a49 504d4153 4b3d3235 68.1.2.IPMASK=25 bf668020: 352e3235 352e3235 352e300a 57414e49 5.255.255.0.WANI bf668030: 503d3139 322e3136 382e322e 310a5741 P=192.168.2.1.WA bf668040: 4e4d4153 4b3d3235 352e3235 352e3235 NMASK=255.255.25 bf668050: 352e300a 41505f53 5349443d 41503234 5.0.AP_SSID=AP24 bf668060: 5f486f6c 64656e0a 41505f53 5349445f _Holden.AP_SSID_ bf668070: 323d4150 35305f48 6f6c6465 6e0a4150 2=AP50_Holden.AP bf668080: 5f504153 53504852 4153453d 6672617a _PASSPHRASE=fraz bf668090: 65310a41 505f5041 53535048 52415345 e1.AP_PASSPHRASE bf6680a0: 5f323d66 726f7a65 0a5a4849 46454e47 _2=froze.ZHIFENG
bf6680b0: 3d686572 650a0000 0000fbb7 ffc1f6f7 =here...........
2.2.1.4 Cache File
For temporary changes, a cache file is located in /tmp/.apcfg. This file contains the same type of information that is in the flash, but is not permanent. This is used to perform updates to parameters during a run, but it is not desired to commit these changes to flash. Note that a specific commit operation is required to update the flash area.
2.2.2 Tool Usage
The intended use for this is for both a web server interface, and for script access to permanent variables. Having a single program to perform this function will save on flash space.
2.2.2.1 Web Server Usage
HTML files that define web pages usually contain static content, unless they have embedded java code. In order to get dynamic content (without using something like PHP or java) something is required to modify the pages such that they display the dynamic data as required. This is accomplished by linking the page name to the cgiMain program.
A web server will execute programs/scripts as part of the Computer Gateway Interface (CGI). This allows a program to be run to generate the web page content as required. This interface is exploited for this function. The Busybox httpd daemon will execute as a CGI program any page that is located in the /usr/www/cgi-bin directory. In order to have separate pages that reference the same program, the same method that Busybox uses is used here. Page names are soft linked to /usr/www/cgi-bin/cgiMain. The cgiMain program uses the argv[0] (the name of the program) to determine which html page to process to produce the web content. This works in the exact same way as the file translation mode of the cgiMain program, changing tagged values into their value strings, or in special cases indicating which parameters have been “set” to specific values.
PRELIMINARY
13
An example of a tagged HTML page:
Note the embedded tags for the text boxes and the check boxes. This produces the web page:
<HTML><HEAD> <LINK REL="stylesheet" href="styleSheet.css" type="text/css"> </head><body> <FORM METHOD=POST> <p class="headind"><INPUT TYPE="SUBMIT" NAME="UPDATE" VALUE="Update">   <INPUT TYPE="SUBMIT" NAME="COMMIT" VALUE="Commit">   <INPUT TYPE="SUBMIT" NAME="RebootButton" VALUE="Reboot"></p> <p class="topnavg">Basic AP Configuration</p> <table> <tr><td colspan=2> <INPUT type="radio" name="AP_IMODE" ~cAP_IMODE:Bridged~> Bridged  <INPUT type="radio" name="AP_IMODE" ~cAP_IMODE:Routed~> Routed  <INPUT type="radio" name="AP_IMODE" ~cAP_IMODE:DHCP~> DHCP  <tr><td align="top"> <table> <tr><td colspan=2><a class=topnavg>Local IP settings <tr><td><a class="header">Local IP Addr <td><INPUT type="text" id="IPADDR" name="IPADDR" class="text2" size="20" maxlength="16" value="~~IPADDR~"> <tr><td><a class="header">Local Netmask <td><INPUT type="text" id="IPMASK" name="IPMASK" class="text2" size="20" maxlength="16" value="~~IPMASK~"> <tr><td><a class="header">Gateway IP <td><INPUT type="text" id="IPGW" name="IPGW" class="text2" size="20" maxlength="16" value="~~IPGW~"> </table> <td align=top> <table> <tr><td colspan=2><a class=topnavg>WAN IP settings <tr><td><a class="header">WAN IP Addr <td><INPUT type="text" id="WANIP" name="WANIP" class="text2" size="20" maxlength="16" value="~~WANIP~"> <tr><td><a class="header">Local Netmask <td><INPUT type="text" id="WANMASK" name="WANMASK" class="text2" size="20" maxlength="16" value="~WANMASK~"> <tr><td><a class="header">Primary DNS <td><INPUT type="text" id="PRIDNS" name="PRIDNS" class="text2" size="20" maxlength="16" value="~~PRIDNS~"> <tr><td><a class="header">Secondary DNS <td><INPUT type="text" id="SECDNS" name="SECDNS" class="text2" size="20" maxlength="16" value="~~SECDNS~"> </table> </table> </body></html>
PRELIMINARY
14
2.2.2.2 Command Line Usage
The cgiMain program also has command line switches available for use in scripts. This provides convenient access to stored parameter data, and data updated via web pages. In fact, a web page can start a script as part of a CGI interface, where the script executes command line versions of cgiMain within the script to perform various functions.
Note that the cache file takes precedence over the flash contents when executing scripts. This is to allow changes to be made and executed on a temporary basis, and only kept if the desired configuration operates satisfactorily. If you want to discard cache change, they either ALL have to be discarded, or specific parameters removed. See adding, deleting, committing, and invalidating cache.
In order to avoid putting /usr/www/cgi-bin into the execution path, a soft link from /bin/cfg to /usr/www/cgi-bin/cgiMain can be made. All following examples assume the system is configured in this manner. The basic command line format is as follows:
#cfg [option] [option parameter]
2.2.2.2.1 Adding/modifying a variable in the cache file
To add a variable/value pair to the cache, use the following form:
#cfg –a VAR=VALUE
The variable name must not include spaces, and if the value includes spaces they must be “escaped” (\<char>) or the value enclosed in quotes (“val”).
2.2.2.2.2 Deleting (removing) a value from the cache file
To delete a variable/value pair from the cache, use the following form:
#cfg –r VAR
The variable name must not include spaces. If the variable does not exist, no error is generated, but no action is preformed on the cache file. If you remove a variable from the cache file, but do not commit the cache, it will remain in the permanent flash storage and will be defined upon next bootup.
2.2.2.2.3 Committing the cache file to flash
To commit the contents of the cache file to flash, use the following form:
#cfg –c
This copies the entire contents of the cache file to flash. These values will be preserved through boot and power cycles.
2.2.2.2.4 Invalidating the cache file
In order to invalidate the cache file (re-read it from flash), use the following form:
#cfg –i
This re-reads the contents of the flash and overwrites the cache file with the flash values. This effectively eliminates any changes made to the cache file without saving them to flash. Use with caution.
2.2.2.2.5 Translating a file
In order to translate a tagged file into a file with values inserted, use the following form:
#cfg –t<index> <filename>
This performs the translation as defined above. Note that the output is put to stdout, so it must be redirected to the desired destination. The index argument on the option indicates the index value to use for variables with the “#” tag. An example of usage:
#cfg –t2 /etc/wpa2/open_bss.ap > /tmp/sec2.cfg
This will translate the file /etc/wpa2/openbss.ap, inserting tags and using the value of “_2” as the substation for “#” tags, and output the file to /tmp/sec2.cfg. The original file is not affected.
PRELIMINARY
15
2.2.2.2.6 Exporting
variables
In order to use the variables in scripts, they need to be exported. The form for doing this is:
#cfg –e
This will output all variables in the form “export VAR=VALUE” for all variables in the cache. To use this in a script file, you can put the following line in the script:
`cfg –e`
and all variable/value pairs will be in the environment for use.
2.2.2.2.7 Resetting to factory defaults
Resetting to factory defaults is a two step process. First, all current variables must be deleted. This is done by using the –x option as in the following form:
#cfg -x
This deletes everything in cache and in flash. To reset the default values, execute the apcfg script to re-populate the defaults. Note that this will be done by the apup script automatically:
#/etc/ath/apcfg
2.3 Environmental Variables
All configuration information is stored in the form of environmental variables that can be displayed by the “cfg –e” command. Error! Reference source not found. outlines the various environmental variables, their default values (if applicable), and their effects.
Table 2 AP Environmental Variable
Variable Default Description
ATH_countrycode Identifies the specific regulatory table to use for the country of
interest. Used for testing regulatory compliance.
AP_IPADDR 192.168.1.2 The IP address of the LAN interface; typically assigned to the bridge
interface, because the LAN is always included in the br0 bridge interface with the ath interfaces.
AP_NETMASK 255.255.255.0 Provides the netmask for the LAN/bridge interface; defines the
number of IP address that can be addressed on the local LAN interface.
WAN_MODE bridged
Indicates the mode for the WAN.
bridged Indicates that the WAN interface is included on br0
static Indicates that the WAN interface is to be given the IP
address specified by WAN_IPADDR
dhcp Indicates that the WAN interface should get its IP
address from the network it is connected to
WAN_IPADDR 192.168.2.1 IP address for the WAN
WAN_NETMASK 255.255.255.0 Netmask
PRIDNS Primary DNS server IP address
SECDNS Secondary DNS server IP address
WLAN_ON_BOOT N Indicates that the WLAN should be activated as part of the rcS script
on bootup. Only valid with the default parameters specified in the apcfg file. This will be more useful with future enhancements.
PRELIMINARY
16
Indicates the specific channel to set the AP to. Setting to a value of
pg
“11ng” will cause the AP to scan for a free 11g (2.4 GHz) channel.
gg()
A value of “11na” will cause the AP to scan for a free 11a (5 GHz)
(
c
)
,g g()
c
channel (PLUS or MINUS) mode
(
c
AP_STARTMODE standard
Mode for apup execution.
standard Creates a single AP
rootap Creates a single WDS mode AP
client Creates a single WDS station instance.
repeater Creates a WDS repeater containing an AP and client
multi Creates a multiple VAP configuration
multivlan Puts each VAP on a desired VLAN interface
dual On platforms capable of dual concurrent operations set
VAP0 to 2.4 GHz on radio 0, and VAP1 to 5.0 GHz band on radio 1
AP_RADIO_ID# 0 1For dual concurrent devices, the radio ID (0 for the “lower” slot, and
1 for the “upper” slot) must be identified for each VAP. When dual concurrent mode (as opposed to multi mode) is selected, the radio ID of the first VAP (ath0) is set to 0 and the second VAP (ath1) is set to 1. In the following entries the radio parameters with the _2 suffix refer to settings for Radio 1 (the “second” radio).
AP_MODE# ap
For each VAP, the “mode” of the AP is required. The mode is used to initialize the VAP. The following are the available modes:
ap Infrastructure access point
sta Simple station VAP (not normally used alone)
ap-wds WDS (4 address frame) format interface that WDS
stations can connect to. See ROOTAP_MAC.
sta-wds Client WDS interface that connects to an Infrastructure
WDS interface, creating a WDS bridge between the two devices. Also see ROOTAP_MAC.
AP_PRIMARY_CH
AP_PRIMARH_CH_2
40
6
Indicates the specific channel to set the AP to. Setting to a value of “11ng” will cause the AP to scan for a free 11g (2.4 GHz) channel. A value of “11na” will cause the AP to scan for a free 11a (5 GHz) channel, and a value of “11ng” will scan for a free 11g (2.4 GHz)
hannel, and a value of “11ng” will scan for a free 11g (2.4 GHz
channel. Note that the selected channel should match the extension
hannel. Note that the selected channel should match the extension
AP_CHMODE
AP_CHMODE_2
11NGHT20
11NAHT40PLUS
channel (PLUS or MINUS) mode appropriate for the selected channel/regulatory mode.
hannel/regulatory mode.
Specifies the channel operating mode. See Table 7 Channel Operating Modes
appropriate for the selected
and section 3.1.3 for details.
ROOTAP_MAC This is used for clients, and will set the preferred MAC address for
the repeater client to associate to. In WDS mode, this is provided to the client device, and is the MAC address of the WDS VAP on the root AP device.
AP_VLAN# For each VAP that is associated to a VLAN, this parameter
identifies the VLAN ID for the VAP.
PRELIMINARY
17
AP_BRNAME When assigning a VLAN to a VAP, a bridge instance is created for
the VLAN. This identifies the “name” of the bridge.
TXQUEUELEN 1000 Provides the number of transmit descriptors to be allocated for the
ath object. These are shared for all VAPs
SHORTGI
1 Enables the short gating interval.
SHORTGI_2
AMPDUENABLE
AMPDUENABLE_2
AMPDUFRAMES
AMPDUFRAMES_2
AMPDULIMIT
1 Enables AMPDU aggregation; applies to all VAPs attached to the
radio.
32 Maximum number of frames to include in the aggregated frame.
Applies to all VAPs attached to the radio.
50000 Number of bytes for the maximum size of the AMPDU packet.
AMPDULIMIT_2
AMPDUMIN
32768 Minimum number of bytes to include in an AMPDU frame.
AMPDUMIN_2
CWMMODE
CWMMODE_2
1
Setting for channel width management.
0 HT20 only
1 HT20/40
2 HT40 only
RATECTL auto
Specifies if rate control is to be controlled automatically through the rate control module.
auto Automatic rate control
manual Manually set the rates and retry limits
MANRATE 0x8c8c8c8c This 32 bit hex number encodes the 4 rate table entries that are tried
on the link. This if manual rate control is enabled.
MANRETRIES 0x04040404 Number of retries on each rate interval to attempt before changing.
Only applicable if manual rate control
RX_CHAINMASK
RX_CHAINMASK_2
5 for 3 chain device 3 for 2 chain device
Selects the chain mask to apply to the Receive path. The lowest 3 bits indicate the three antenna chains. This is for a “by 2” configuration. This setting will override the setting in the EEPROM of the device.
TX_CHAINMASK
TX_CHAINMASK_2
5 for 3 chain device 3 for 2 chain device
Selects the chain mask to apply to the Transmit path. The lowest 3 bits indicate the transmit chains to include. This is for a “2 by” configuration. . This setting will override the setting in the EEPROM of the device.
AP_SSID# Atheros_Xspan_2G
Atheros_Xspan_5G
For the single VAP configurations, or the repeater case, only AP_SSID is used. Default setting is as indicated.
For multiple VAP configurations, specifies the SSID for each VAP instance (AP_SSID is VAP 1). If any of the variables are not defined, the associated VAP will not be created. The AP_SSID_x variables should be defined in order. If AP_SSID_2 is not defined, AP_SSID_3 should not be defined. For example, if you are creating 3 VAPs, do not define AP_SSID_4. If you are only creating two VAPs, do not define AP_SSID_3 and AP_SSID_4.
AP_SECMODE# NONE Selects the security mode for the indicated VAP. One of “WEP”,
“WPA”, “WSC”, or “NONE”
PRELIMINARY
18
AP_SECFILE# Indicates which security configuration file to use for the VAP. See
section 2.1for a description of the configuration files.
AP_VLAN# Used to configure VLAN tags for SSIDs AP_SSID, AP_SSID_2,
AP_SSID_3 and AP_SSID_4 respectively. To configure VLANs. AP_STARTMODE should be set to multivlan. No default values are assumed for these configuration items.
WEPKEY_1 WEPKEY_2 WEPKEY_3 WEPKEY_4
These are the 4 WEP keys that are defined in the first 4 slots. Note
that they are the same for ALL VAPs. The length of the key indicates the strength of the cipher (10 hex digits or 4 characters for 64 bit, 26 hex digits or 13 characters for 128 bit). To indicate ASCII entry, prepend “s:” to the string
AP_PRIKEY Primary WEP key to use.
AP_WPA# WPA mode. This indicates if WPA-1 or WPA-2 (or both) are to be
used in WPA operations.
AP_CYPHER# Which pairwise ciphers to use for WPA operations. CCMP is AES
encryption where TKIP is WEP. Specifying both indicates auto selection based on the client.
PSK_KEY# A 9 to 64 bit value used for the PSK generation. This is an ASCII
value.
PSK_KEY_HEX# A 9 to 64 bit value used for the PSK generation. This is an ASCII
value.
AP_AUTH_SVR# IP address of the Radius server used for EAP authentication
methods.
AP_AUTH_PORT# Port number on the Radius server used for EAP authentication login
AP_AUTH_SECRET# Password for logging onto the EAP server for authentication.
WSC_PIN In WSC mode, the PIN number used by the client to authenticate
with the WSC server.
WSC_NAME Simple network name for the AP in WSC mode.
PRELIMINARY
19
2.4 Web Interface
The Atheros AP reference design includes a simplified web interface that can be used to configure the AP in various modes. These pages provide both configuration and status information. All pages are processed using the cgiMain program described in section 2.2. Each of these pages contains related information that can be used to configure the AP.
Note that default values are automatically provided to the web interface. These defaults are encoded in the /etc/ath/apcfg file, and can be modified as required for a particular implementation
Each web page has the buttons:
Update This button accepts the changes on the current page. If the current page is switched, the
Reboot This button will reboot the AP. This performs a quick reboot, without closing any open files.
Commit This button commits the parameters in the parameter cache (/tmp/.apcfg) to the flash area.
Start This starts the AP using the /etc/ath/apup script. This script reads configuration information
Stop This brings the AP driver and hostapd software down using the /etc/ath/apdown script. This
updates are NOT saved, so click update if you want to save what you changed on the page.
Use with care.
This saves the parameters through reboot cycles.
from flash/cache, and applies the parameters using the sub-scripts described in the following sections.
performs a graceful shutdown of the AP.
In addition, the main network page includes a “factory reset” button that reapplies the parameters encoded in the /etc/ath/apcfg file.
PRELIMINARY
20
2.4.1 Network Page
The network page is the default initial page, and provides for general network settings. The network page is shown in Figure 3.
Figure 3 Network Configuration Page
The parameters on this page allow the user to set specific environmental variables with a “point and click” interface:
Table 3 Network Configuration: Page Parameters
Parameter Env Var Description
Bridge Mode
Startup Mode AP_STARTMODE Sets the startup mode that the scripts use to initialize the AP. The modes are described in the
LocalIP addr
Local Netmask
Gateway IP
WAN IP Addr
WAN Netmask
Primary DNS
Secondary DNS
WAN_MODE
AP_IPADDR
AP_NETMASK
IPGW
WAN_IPADDR
WAN_NETMASK
PRIDNS
SECDNS
Selects the bridge mode. Bridged means that the WLAN, WAN, and LAN interfaces are all bridged together, and use the Local IP Addr as the IP address of the device. DHCP means that the WAN IP address will be set via DHCP. Static means that the WAN interface will use the IP address and mask specified under WAN IP Settings
parameter description for AP_STARTMODE
This is the IP address used for bridged mode, or it’s the IP address on the LAN interface in DHCP mode
Network mask for the LAN network.
IP address for the network gateway for Bridged mode, or the gateway on the WAN link for DHCP mode.
IP address for the WAN interface when static mode is used
Netmask of the WAN interface when static mode is used
Primary DNS server on the WAN interface
Secondary DNS server on the WAN interface
PRELIMINARY
21
2.4.2
Radio Configuration Page
This page includes the radio parameters for each radio on the AP. This example is for a dual concurrent AP, a single radio AP would only show a single column. Note that indexed variables here are per Radio as opposed to per VAP.
Figure 4 Radio Configuration Page
Table 4 Radio Configuration: Page Parameters
Parameter Env Var Description
Channel AP_PRIMARY_CH
AP_PRIMARY_CH_2
Mode AP_CHMODE
AP_CHMODE_2
Gating Index SHORT_GI
SHORT_GI_2
Aggregation AMPDUENABLE
AMPDUENABLE_2
Agg Frames AMPDUFRAMES
AMPDUFRAMES_2
Agg Size AMPDULIMIT
AMPDULIMIT_2
Agg Min Size: AMPDUMIN
AMPDUMIN_2
Channel Width CWMMODE
CWMMODE_2
Tx Chainmask TX_CHAINMASK
TX_CHAINMASK_2
Rx Chainmask RX_CHAINMASK
RX_CHAINMASK_2
Indicates the channel selected for the AP. Invalid channels will cause the AP to fail on startup.
Specifies the channel operating mode. See Table 7
and section 3.1.3 for details
Enables half period Gating Index. Disable forces full period gating index.
Enables/Disables aggregation for the radio
Maximum number of frames to include in an aggregate.
Maximum size (in bytes) of an aggregate
Minimum number of bytes to send as an aggregate
Channel Width Mode (PHY mode). 0 sets to static 20 MHz mode, 1 sets to dynamic 20/40 MHz mode, and 2 sets to static 40 MHz mode.
Transmit chainmask. Selections vary between devices
Receive chainmask. The number of receive chains to use (not necessarily antennas). Selections vary between devices.
Channel Operating Modes
PRELIMINARY
22
2.4.3 Virtual AP (VAP) Configuration Page
For each VAP (1-4) its individual parameters can be configured through this page. Note that there are selections for VAP 1-4 on the left panel. These parameters specify things like the ESSID string, which radio to use (for dual concurrent platforms), VLAN information, initialization mode, and Security Modes.
In this document the various sections of the page are shown in two sections, because a readable screen shot of the entire page was not possible. The web interface presents all parameters as a single page.
Figure 5 VAP Configuration Page (1 of 2)
Table 5 VAP Configuration: Page Parameters
Parameter Env Var Description
ESSID String AP_SSID# SSID String for the Virtual interface. For Client mode VAPs, this is the ESSID of the BSS to
Radio AP_RADIO_ID# ID of the radio that this VAP is assigned to. Virtual interface to physical interface mapping.
VLAN ID AP_VLAN# If this VAP is to be included in a VLAN group, the VLAN ID number of the group
VLAN Bridge AP_BRNAME Name of the bridge that is used by this VLAN. Ethernet instances will be added to the bridge
VAP Mode AP_MODE# Indicates the operating mode for the VAP. See table 1 for details
Root AP MAC Address
ROOTAP_MAC#
join to. For AP’s, this is the SSID advertised in the beacon.
for the VLAN
Identifies the MAC address of the WDS root when creating a VAP for WDS Client mode.
PRELIMINARY
23
Figure 6 VAP Configuration Page (2 of 2)
PRELIMINARY
24
Table 6 VAP Configuration: Page Parameters
Parameter Env Var Description
Security Modes
Security Submodes
WEP Mode
WEP Keys
Primary Key AP_PRIMARY_KEY Indicates the key to use as the primary transmit key.
WPA Mode AP_WPA# Indicates the WPA modes to support: 802.1x (WEP),WPA (WPA-1), WPA2, or Auto
WPA Cypher AP_CYPHER Key policy, either TKIP or CCMP (AES). Auto indicates detect either
WPA Rekey Int AP_WPA_GROUP_REKEY# Interval for group rekey
WPA Master Rekey AP_WPA_GMK_REKEY# Master rekey interval
WEP Rekey Interval AP_WEP_REKEY# When WEP is used with 802.1x mode (not advised), this provides the rekey interval
PSK KEY PSK_KEY PSK value (8-64 characters) to use as a passphrase. String
RSN Preauth AP_RSN_ENA_PREAUTH# Enable RSN preauthorization between APs (for roaming)
RSN Interface AP_WPA_PREAUTH_IF# Interface to use for preauthorization (e.g. eth0)
EAP Reauth Period AP_EAP_REAUTH_PER When using a RADIUS server, the interval to reauthenticate with the server
Auth Server AP_AUTH_SERVER# IP address of the RADIUS server
Auth Port AP_AUTH_PORT# Port number that the RADIUS server is serving on.
Secret AP_AUTH_SECRET# Authentication password for communicating with the RADIUS server
AP PIN WSC_PIN PIN number for static PIN method of WPS setup
Device Name WSC_NAME Name of the device as advertised in PnP messages
Enrollee’s PIN AP_ENROLLEE PIN of the Enrollee when using the remote PIN method
StartPINMethod Button that starts the remote PIN method for enrolling
Soft Push Button Button that emulates the WPS pushbutton on the board.
AP_SECMODE#
AP_SECFILE
AP_WEP_MODE
WEPKEY_1 WEPKEY_2 WEPKEY_3 WEPKEY_4
Vertical set of radio buttons that select the security mode
Open No Security
WEP WEP Security (only 1 instance per radio allowed)
WPA WPA (and WDS) security modes
For WPA Security Mode, the following sub modes are defined:
Personal Shared Key User creates a passphrase for authentication. No outside server
required.
Enterprise/Radius Security using 802.1x security modes requiring an authentication
server.
WiFi Protected Setup Security using new WPS standards. AP can be configured from
client.
Indicates the mode to operate the WEP security in: Open, Shared, or Auto (detect)
WEP keys expressed as either 10, 26, or 52 digit Hex numbers, or after the s: marker, as 5, 13, or 26 character strings.
(detect either).
PRELIMINARY
25
2.4.4 Statu
This page shows the output of the command “iwconfig” with no parameters
s Page
Figure 7 AP Status Page
2.4.5 Channel Page
This page shows the output of the “wlanconfig athx list channel” command. See section 2.5.3 for details.
Figure 8 Channel Page
Loading...
+ 58 hidden pages