2006-10-16 10:38:08 +08:00
|
|
|
The WiFi settings are configured in the file \texttt{/etc/config/wireless}
|
2007-01-04 09:29:01 +08:00
|
|
|
(currently supported on Broadcom and Atheros). When booting the router for the first time
|
2006-10-16 10:38:08 +08:00
|
|
|
it should detect your card and create a sample configuration that looks like this:
|
|
|
|
|
2007-01-04 09:29:01 +08:00
|
|
|
\paragraph{Sample Broadcom wireless config:}
|
|
|
|
|
2006-10-16 10:38:08 +08:00
|
|
|
\begin{Verbatim}
|
2006-11-07 07:37:55 +08:00
|
|
|
config wifi-device "wl0"
|
|
|
|
option type "broadcom"
|
|
|
|
option channel "5"
|
2006-10-16 10:38:08 +08:00
|
|
|
|
|
|
|
config wifi-iface
|
2006-11-07 07:37:55 +08:00
|
|
|
option device "wl0"
|
|
|
|
option mode "ap"
|
|
|
|
option ssid "OpenWrt"
|
|
|
|
option hidden "0"
|
|
|
|
option encryption "none"
|
2006-10-16 10:38:08 +08:00
|
|
|
\end{Verbatim}
|
|
|
|
|
2007-01-04 09:29:01 +08:00
|
|
|
\paragraph{Sample Atheros wireless config:}
|
|
|
|
|
|
|
|
\begin{Verbatim}
|
|
|
|
config wifi-device "wifi0"
|
|
|
|
option type "atheros"
|
|
|
|
option channel "5"
|
|
|
|
option mode "11g"
|
|
|
|
|
|
|
|
config wifi-iface
|
|
|
|
option device "wifi0"
|
|
|
|
option mode "ap"
|
|
|
|
option ssid "OpenWrt"
|
|
|
|
option hidden "0"
|
|
|
|
option encryption "none"
|
|
|
|
\end{Verbatim}
|
|
|
|
|
2006-10-16 10:38:08 +08:00
|
|
|
There are two types of config sections in this file. The '\texttt{wifi-device}' refers to
|
|
|
|
the physical wifi interface and '\texttt{wifi-iface}' configures a virtual interface on top
|
|
|
|
of that (if supported by the driver).
|
|
|
|
|
|
|
|
\paragraph{Options for the \texttt{wifi-device}:}
|
|
|
|
|
|
|
|
\begin{itemize}
|
2006-11-07 07:37:55 +08:00
|
|
|
\item \texttt{type} \\
|
|
|
|
The driver to use for this interface.
|
2007-01-04 09:29:01 +08:00
|
|
|
|
|
|
|
\item \texttt{mode} \\
|
|
|
|
The frequency band (\texttt{b}, \texttt{g}, \texttt{bg}, \texttt{a})
|
2006-11-07 07:37:55 +08:00
|
|
|
|
|
|
|
\item \texttt{country} \\
|
|
|
|
The country code used to determine the regulatory settings.
|
|
|
|
|
|
|
|
\item \texttt{channel} \\
|
2007-01-04 09:29:01 +08:00
|
|
|
The wifi channel (e.g. 1-14, depending on your country setting).
|
2006-11-07 07:37:55 +08:00
|
|
|
|
|
|
|
\item \texttt{maxassoc} \\
|
|
|
|
Maximum number of associated clients
|
2006-10-16 10:38:08 +08:00
|
|
|
|
|
|
|
\end{itemize}
|
|
|
|
|
|
|
|
\paragraph{Options for the \texttt{wifi-iface}:}
|
|
|
|
|
|
|
|
\begin{itemize}
|
2006-11-07 07:37:55 +08:00
|
|
|
\item \texttt{mode} \\
|
|
|
|
Operating mode:
|
|
|
|
|
|
|
|
\begin{itemize}
|
|
|
|
\item \texttt{ap} \\
|
|
|
|
Access point mode
|
|
|
|
|
|
|
|
\item \texttt{sta} \\
|
|
|
|
Client mode
|
|
|
|
|
|
|
|
\item \texttt{adhoc} \\
|
|
|
|
Ad-Hoc mode
|
|
|
|
|
|
|
|
\item \texttt{wds} \\
|
|
|
|
WDS point-to-point link
|
|
|
|
|
|
|
|
\end{itemize}
|
2007-01-04 09:29:01 +08:00
|
|
|
|
2006-11-07 07:37:55 +08:00
|
|
|
\item \texttt{network} \\
|
|
|
|
Selects the interface section from \texttt{/etc/config/network} to be
|
|
|
|
used with this interface
|
|
|
|
|
|
|
|
\item \texttt{encryption} \\
|
|
|
|
Encryption setting. Accepts the following values:
|
|
|
|
|
|
|
|
\begin{itemize}
|
|
|
|
\item \texttt{psk}, \texttt{psk2} \\
|
|
|
|
WPA(2) Pre-shared Key
|
|
|
|
|
|
|
|
\item \texttt{wpa}, \texttt{wpa2} \\
|
|
|
|
WPA(2) RADIUS
|
|
|
|
|
|
|
|
\end{itemize}
|
|
|
|
|
|
|
|
\item \texttt{key} (wpa and psk) \\
|
|
|
|
Either the WPA key (PSK mode) or the RADIUS shared secret (WPA RADIUS mode)
|
|
|
|
|
|
|
|
\item \texttt{server} (wpa) \\
|
|
|
|
The RADIUS server address
|
|
|
|
|
|
|
|
\item \texttt{port} (wpa) \\
|
|
|
|
The RADIUS server port
|
2006-10-16 10:38:08 +08:00
|
|
|
|
|
|
|
\end{itemize}
|
|
|
|
|
|
|
|
\paragraph{Limitations:}
|
|
|
|
|
2007-01-04 09:29:01 +08:00
|
|
|
Only the following mode combinations are supported:
|
|
|
|
|
2006-10-16 10:38:08 +08:00
|
|
|
\begin{itemize}
|
2006-11-07 07:37:55 +08:00
|
|
|
\item \textbf{Broadcom}: \\
|
|
|
|
\begin{itemize}
|
|
|
|
\item 1x \texttt{sta}, 0-3x \texttt{ap}
|
|
|
|
\item 1-4x \texttt{ap}
|
|
|
|
\item 1x \texttt{adhoc}
|
|
|
|
\end{itemize}
|
|
|
|
|
|
|
|
WDS links can only be used in pure AP mode and can't use WEP (except when sharing the
|
|
|
|
settings with the master interface, which is done automatically).
|
2006-10-16 10:38:08 +08:00
|
|
|
|
2007-01-04 09:29:01 +08:00
|
|
|
\item \textbf{Atheros}: \\
|
|
|
|
\begin{itemize}
|
|
|
|
\item 1x \texttt{sta}, 0-4x \texttt{ap}
|
|
|
|
\item 1-4x \texttt{ap}
|
|
|
|
\item 1x \texttt{adhoc}
|
|
|
|
\end{itemize}
|
|
|
|
|
2006-10-16 10:38:08 +08:00
|
|
|
\end{itemize}
|
|
|
|
|
|
|
|
|