| 132 | | These wifi devices will reject ifconfig and iwconfig commands. |
|---|
| 133 | | |
|---|
| 134 | | The next step is to bring one or more ath%d device into existence. |
|---|
| 135 | | All of the usual commands - ifconfig, iwconfig, iwpriv - should operate |
|---|
| 136 | | on the ath%d devices as expected with exceptions noted below. |
|---|
| 137 | | |
|---|
| 138 | | Here is one example, but for more information, see the man page for |
|---|
| 139 | | wlanconfig. It is installed when you run "make install". |
|---|
| 140 | | |
|---|
| 141 | | Station mode: |
|---|
| 142 | | |
|---|
| 143 | | wlanconfig ath0 create wlandev wifi0 wlanmode sta |
|---|
| 144 | | iwconfig ath0 essid ANY |
|---|
| 145 | | ifconfig ath0 up |
|---|
| 146 | | |
|---|
| 147 | | This will create a device named ath0 to be associated with wireless |
|---|
| 148 | | device wifi0 and set it to be a station. The iwconfig command will set |
|---|
| 149 | | the device to choose any available essid, and then ifconfig up will |
|---|
| 150 | | start the device and begin scanning so that you can begin to send |
|---|
| 151 | | packets over the interface. |
|---|
| 152 | | |
|---|
| 153 | | |
|---|
| 154 | | You can lock the operating mode to one of 11a, 11b, or 11g if you have |
|---|
| 155 | | a multi-mode card (if you do not lock the mode then the driver will |
|---|
| 156 | | select a mode for you; usually 11a). You can use the following commands: |
|---|
| | 143 | These wifi devices will reject ifconfig and iwconfig commands. The |
|---|
| | 144 | wifi interface provides indicates the existance of a physical Madwifi |
|---|
| | 145 | device, but is not of any functional interest other than as a target |
|---|
| | 146 | for VAP creation via wlanconfig (see Virtual AP section below). |
|---|
| | 147 | |
|---|
| | 148 | By default, an ath%d Managed mode interface is also created. This |
|---|
| | 149 | device is a "virtual ap" (VAP) of the wifi%d physical device, and is |
|---|
| | 150 | configurable by the standard networking tools - ifconfig, iwconfig, |
|---|
| | 151 | iwpriv. |
|---|
| | 152 | |
|---|
| | 153 | The autocreation function can be manipulated to automatically create |
|---|
| | 154 | any one of the other supported device types by using the |
|---|
| | 155 | autocreate=mode option when the ath_pci module is first loaded. The |
|---|
| | 156 | following example will cause ath%d to be in Master mode: |
|---|
| | 157 | |
|---|
| | 158 | modprobe ath_pci autocreate=ap |
|---|
| | 159 | |
|---|
| | 160 | Autocreation can be disabled: |
|---|
| | 161 | |
|---|
| | 162 | modprobe ath_pci autocreate=none |
|---|
| | 163 | |
|---|
| | 164 | Please see the following link for more information: |
|---|
| | 165 | http://madwifi.org/wiki/UserDocs/autocreate |
|---|
| | 166 | |
|---|
| | 167 | Virtual AP's (VAP's) and wlanconfig |
|---|
| | 168 | =================================== |
|---|
| | 169 | An interesting feauture of Madwifi is Virtual AP (VAP) mode, which |
|---|
| | 170 | allows the operation of multiple concurrent (virtual) access points, |
|---|
| | 171 | and concurrent interfaces running in both AP and station mode. To |
|---|
| | 172 | manipulate VAP's, Madwifi comes with a tool called wlanconfig which |
|---|
| | 173 | is used to create and destroy VAPS with various different modes. |
|---|
| | 174 | |
|---|
| | 175 | The following examples assume that the "autocreate=none" option has |
|---|
| | 176 | been parsed to the module at load time. This allows fine control over |
|---|
| | 177 | management of VAP's, as the creation of a Managed mode station should |
|---|
| | 178 | be delayed until all other required VAP's are first created, as only |
|---|
| | 179 | one sta mode VAP can exist per physical device. |
|---|
| | 180 | |
|---|
| | 181 | To create an access point, use: |
|---|
| | 182 | |
|---|
| | 183 | wlanconfig ath0 create wlandev wifi0 wlanmode ap |
|---|
| | 184 | |
|---|
| | 185 | To create an access point and a station, use: |
|---|
| | 186 | |
|---|
| | 187 | wlanconfig ath0 create wlandev wifi0 wlanmode ap |
|---|
| | 188 | wlanconfig ath1 create wlandev wifi0 wlanmode sta nosbeacon |
|---|
| | 189 | |
|---|
| | 190 | To create APs which share a single MAC address, use the -bssid flag |
|---|
| | 191 | when creating the VAPs: |
|---|
| | 192 | |
|---|
| | 193 | wlanconfig ath0 create wlandev wifi0 wlanmode ap -bssid |
|---|
| | 194 | wlanconfig ath1 create wlandev wifi0 wlanmode ap -bssid |
|---|
| | 195 | |
|---|
| | 196 | Finally, to destroy a VAP, issue the command: |
|---|
| | 197 | |
|---|
| | 198 | wlanconfig ath0 destroy |
|---|
| | 199 | |
|---|
| | 200 | For more information about Virtual AP's, please refer to the |
|---|
| | 201 | users-guide document distributed with the Madwifi source code. |
|---|
| | 202 | |
|---|
| | 203 | For more information about wlanconfig, see its manpage, it is |
|---|
| | 204 | installed when you run "make install". |
|---|
| | 205 | |
|---|
| | 206 | Operating Mode |
|---|
| | 207 | ============== |
|---|
| | 208 | To lock the operating mode to one of 11a, 11b, or 11g if you have |
|---|
| | 209 | a multi-mode card, issue one of the following commands: |
|---|