summaryrefslogtreecommitdiff
path: root/docs/wireless.tex
blob: 6b3ffbac7aaff1cd9e38aa4d266e89b3273ba34d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
The WiFi settings are configured in the file \texttt{/etc/config/wireless}
(currently supported on Broadcom and Atheros). When booting the router for the first time
it should detect your card and create a sample configuration that looks like this:

\paragraph{Sample Broadcom wireless config:}

\begin{Verbatim}
config wifi-device      "wl0"
    option type         "broadcom"
    option channel      "5"

config wifi-iface
    option device       "wl0"
    option mode         "ap"
    option ssid         "OpenWrt"
    option hidden       "0"
    option encryption   "none"
\end{Verbatim}

\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}

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}
    \item \texttt{type} \\
        The driver to use for this interface.
	
	\item \texttt{mode} \\
		The frequency band (\texttt{b}, \texttt{g}, \texttt{bg}, \texttt{a})

    \item \texttt{country} \\
        The country code used to determine the regulatory settings.

    \item \texttt{channel} \\
        The wifi channel (e.g. 1-14, depending on your country setting).

    \item \texttt{maxassoc} \\
        Maximum number of associated clients

\end{itemize}

\paragraph{Options for the \texttt{wifi-iface}:}

\begin{itemize}
    \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}

    \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

\end{itemize}

\paragraph{Limitations:}

Only the following mode combinations are supported:

\begin{itemize}
    \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).

    \item \textbf{Atheros}: \\
        \begin{itemize}
            \item 1x \texttt{sta}, 0-4x \texttt{ap}
            \item 1-4x \texttt{ap}
            \item 1x \texttt{adhoc}
        \end{itemize}

\end{itemize}