Difference between revisions of "Wireless network configuration"

From ArchWiki
Jump to: navigation, search
(rtl8811au/rtl8812au/rtl8814au/rtl8821au: Notes and new title)
 
(568 intermediate revisions by 100 users not shown)
Line 1: Line 1:
[[Category:Wireless Networking]]
+
[[Category:Wireless networking]]
[[cs:Wireless Setup]]
+
[[cs:Wireless network configuration]]
[[de:(W)LAN_und_Arch_Linux]]
+
[[de:(W)LAN und Arch Linux]]
[[es:Wireless Setup]]
+
[[el:Wireless network configuration]]
 +
[[es:Wireless network configuration]]
 +
[[fa:تنظیمات شبکه ی بی سیم]]
 
[[fr:Wifi]]
 
[[fr:Wifi]]
[[it:Wireless Setup]]
+
[[it:Wireless network configuration]]
[[ja:Wireless Setup]]
+
[[ja:ワイヤレス設定]]
[[nl:Wireless Setup]]
+
[[nl:Wireless network configuration]]
 
[[ro:Wireless]]
 
[[ro:Wireless]]
[[ru:Wireless Setup]]
+
[[ru:Wireless network configuration]]
[[th:Wireless Setup]]
+
[[th:Wireless network configuration]]
[[tr:Kablosuz_bağlantı]]
+
[[tr:Kablosuz bağlantı]]
[[zh-CN:Wireless Setup]]
+
[[zh-hans:Wireless network configuration]]
{{Article summary start}}
+
{{Related articles start}}
{{Article summary text|A complete guide to enabling and configuring wireless networking.}}
+
{{Related|Network configuration}}
{{Article summary heading|Overview}}
+
{{Related|Software access point}}
{{Article summary text|{{Networking overview}}}}
+
{{Related|Ad-hoc networking}}
{{Article summary end}}
+
{{Related|Internet sharing}}
 +
{{Related|Wireless bonding}}
 +
{{Related|Network Debugging}}
 +
{{Related articles end}}
  
{{Poor writing|Article too large, drivers specific guidelines should be moved to a dedicated page.}}
+
Configuring wireless is a two-part process; the first part is to identify and ensure the correct driver for your wireless device is installed (they are available on the installation media, but often have to be installed explicitly), and to configure the interface. The second is choosing a method of managing wireless connections. This article covers both parts, and provides additional links to wireless management tools.
  
Configuring wireless is a two-part process; the first part is to identify and ensure the correct driver for your wireless device is installed (they are available on the installation media, so make sure you install them), and to configure the interface. The second is choosing a method of managing wireless connections.  This article covers both parts, and provides additional links to wireless management tools.
+
== Device driver ==
  
'''About new Arch Linux systems:''' Most wireless drivers and tools are available during Arch set-up under the {{grp|base}} group. Be sure to install the proper driver for your card. [[Udev]] will usually load the appropriate module, thereby creating the wireless interface, in the initial live system of the installer, as well as the newly installed system on your hard drive. If you are configuring your wireless functionality after, and not during, Arch Linux installation, simply ensure the required packages are installed with [[pacman]], (driver, firmware if needed, {{Pkg|wireless_tools}}, {{Pkg|iw}}, {{Pkg|wpa_supplicant}}, etc.) and follow the guidelines below. Note that {{Pkg|wireless_tools}} may be optional depending on how recent your wireless hardware is.
+
The default Arch Linux kernel is ''modular'', meaning many of the drivers for machine hardware reside on the hard drive and are available as [[Kernel modules|modules]]. At boot, [[udev]] takes an inventory of your hardware and loads appropriate modules (drivers) for your corresponding hardware, which will in turn allow creation of a network ''interface''.
  
== Part I: Identify Card/Install Driver ==
+
Some wireless chipsets also require firmware, in addition to a corresponding driver. Many firmware images are provided by the {{Pkg|linux-firmware}} package which is installed by default, however, proprietary firmware images are not included and have to be installed separately. This is described in [[#Installing driver/firmware]].
  
=== Identify and Discover if Supported ===
+
{{Note|Udev is not perfect. If the proper module is not loaded by udev on boot, simply [[Kernel modules#Manual module handling|load it manually]]. Note also that udev may occasionally load more than one driver for a device, and the resulting conflict will prevent successful configuration. Make sure to [[blacklist]] the unwanted module.}}
  
First you will need to check and see if the Linux kernel has support for your card or if a user-space driver is available for it.
+
{{Tip|Though not strictly required, it's a good idea to first install user-space tools mentioned in [[#Manual setup]], especially when some problem should appear.}}
  
==== Identify your card ====
+
=== Check the driver status ===
  
You can find your card type by command:
+
To check if the driver for your card has been loaded, check the output of the {{ic|lspci -k}} or {{ic|lsusb -v}} command, depending on if the card is connected by PCI(e) or USB. You should see that some kernel driver is in use, for example:
# lspci | grep -i net
 
  
Or, if you have a USB device, run:
+
{{hc|$ lspci -k|<nowiki>
  # lsusb
+
06:00.0 Network controller: Intel Corporation WiFi Link 5100
 +
Subsystem: Intel Corporation WiFi Link 5100 AGN
 +
Kernel driver in use: iwlwifi
 +
Kernel modules: iwlwifi
 +
</nowiki>}}
 +
 
 +
{{Note|If the card is a USB device, running {{ic|<nowiki>dmesg | grep usbcore</nowiki>}} should give something like {{ic|usbcore: registered new interface driver rtl8187}} as output.}}
 +
 
 +
Also check the output of {{ic|ip link}} command to see if a wireless interface ([[Network configuration#Device names|usually]] it starts with the letter "w", e.g. {{ic|wlp2s1}}) was created. Then bring the interface up with {{ic|ip link set ''interface'' up}}. For example, assuming the interface is {{ic|wlan0}}:
 +
 
 +
  # ip link set wlan0 up
 +
 
 +
If you get this error message: {{ic|SIOCSIFFLAGS: No such file or directory}}, it most certainly means that your wireless chipset requires a firmware to function.
 +
 
 +
Check kernel messages for firmware being loaded:
 +
 
 +
{{hc|<nowiki>$ dmesg | grep firmware</nowiki>|<nowiki>
 +
[  7.148259] iwlwifi 0000:02:00.0: loaded firmware version 39.30.4.1 build 35138 op_mode iwldvm
 +
</nowiki>}}
 +
 
 +
If there is no relevant output, check the messages for the full output for the module you identified earlier ({{ic|iwlwifi}} in this example) to identify the relevant message or further issues:
  
{{Note|The internal Wi-Fi card in some laptops may actually be a USB device, so make sure you check both commands.}}
+
{{hc|<nowiki>$ dmesg | grep iwlwifi</nowiki>|<nowiki>
 +
[  12.342694] iwlwifi 0000:02:00.0: irq 44 for MSI/MSI-X
 +
[  12.353466] iwlwifi 0000:02:00.0: loaded firmware version 39.31.5.1 build 35138 op_mode iwldvm
 +
[  12.430317] iwlwifi 0000:02:00.0: CONFIG_IWLWIFI_DEBUG disabled
 +
...
 +
[  12.430341] iwlwifi 0000:02:00.0: Detected Intel(R) Corporation WiFi Link 5100 AGN, REV=0x6B
 +
</nowiki>}}
  
==== Discover if the card is supported ====
+
If the kernel module is successfully loaded and the interface is up, you can skip the next section.
  
 +
=== Installing driver/firmware ===
 +
 +
Check the following lists to discover if your card is supported:
 +
 +
* See the table of [https://wireless.wiki.kernel.org/en/users/drivers existing Linux wireless drivers] and follow to the specific driver's page, which contains a list of supported devices. There is also a [https://wikidevi.com/wiki/List_of_Wi-Fi_Device_IDs_in_Linux List of Wi-Fi Device IDs in Linux].
 
* The [https://help.ubuntu.com/community/WifiDocs/WirelessCardsSupported Ubuntu Wiki] has a good list of wireless cards and whether or not they are supported either in the Linux kernel or by a user-space driver (includes driver name).
 
* The [https://help.ubuntu.com/community/WifiDocs/WirelessCardsSupported Ubuntu Wiki] has a good list of wireless cards and whether or not they are supported either in the Linux kernel or by a user-space driver (includes driver name).
* [http://linux-wless.passys.nl/ Linux Wireless Support] and The Linux Questions' [http://www.linuxquestions.org/hcl/index.php?cat=10 Hardware Compatibility List] (HCL) also have a good database of kernel-friendly hardware.  
+
* [http://linux-wless.passys.nl/ Linux Wireless Support] and The Linux Questions' [http://www.linuxquestions.org/hcl/index.php?cat=10 Hardware Compatibility List] (HCL) also have a good database of kernel-friendly hardware.
* The [http://wireless.kernel.org/en/users/Devices kernel page] additionally has a matrix of supported hardware.
+
 
 +
Note that some vendors ship products that may contain different chip sets, even if the product identifier is the same. Only the usb-id (for USB devices) or pci-id (for PCI devices) is authoritative.
 +
 
 +
If your wireless card is listed above, follow the [[#Troubleshooting drivers and firmware]] subsection of this page, which contains information about installing drivers and firmware of some specific wireless cards. Then [[#Check the driver status|check the driver status]] again.
 +
 
 +
If your wireless card is not listed above, it is likely supported only under Windows (some Broadcom, 3com, etc). For these, you can try to use [[#ndiswrapper]].
 +
 
 +
== Wireless management ==
 +
 
 +
The [[#Manual setup]] uses command-line tools to manually manage your network interface. The [[#Automatic setup]] section describes several programs that can be used to automatically manage your wireless interface, some of which include a GUI and all of which include support for network profiles (useful when frequently switching wireless networks, like with laptops).
 +
 
 +
=== Manual setup ===
 +
 
 +
Just like other network interfaces, the wireless ones are controlled with ''ip'' from the {{Pkg|iproute2}} package.
 +
 
 +
You will need to install a basic set of tools for managing the wireless connection. [[Install]] one of the following:
 +
* {{app|iw|''iw'' only supports the nl80211 (netlink) standard. It does not support the older WEXT (Wireless EXTentions) standard. If ''iw'' does not see your card, this may be the reason.|https://wireless.kernel.org/en/users/Documentation/iw|{{Pkg|iw}}}}
 +
* {{app|wireless_tools|''wireless_tools'' is deprecated but still widely supported. Use this for modules using the WEXT standard.|http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html|{{pkg|wireless_tools}}}}
 +
 
 +
{{Tip|For a comparison of commands between ''iw'' and ''wireless_tools'', see [[#iw and wireless_tools comparison]].}}
 +
 
 +
For WPA/WPA2 encryption, you will also need:
 +
* {{app|[[WPA supplicant]]|wpa_supplicant is a cross-platform supplicant with support for WEP, WPA and WPA2 (IEEE 802.11i / RSN (Robust Secure Network)). It is suitable for desktops, laptops and embedded systems and works with both WEXT and nl80211.|http://hostap.epitest.fi/wpa_supplicant/|{{Pkg|wpa_supplicant}}}}
 +
 
 +
{{Note|
 +
* Note that most of the commands have to be executed with [[Users and groups|root permissions]]. Executed with normal user rights, some of the commands (e.g. ''iwlist''), will exit without error but not produce the correct output either, which can be confusing.
 +
* Depending on your hardware and encryption type, some of these steps may not be necessary. Some cards are known to require interface activation and/or access point scanning before being associated to an access point and being given an IP address. Some experimentation may be required. For instance, WPA/WPA2 users may try to directly activate their wireless network from step [[#Connect to an access point]].}}
 +
 
 +
Examples in this section assume that your wireless device interface is {{ic|''interface''}} and that you are connecting to {{ic|''your_essid''}} wifi access point. Replace both accordingly.
 +
 
 +
==== Get the name of the interface ====
 +
 
 +
{{Tip|See [http://wireless.kernel.org/en/users/Documentation/iw official documentation] of the ''iw'' tool for more examples.}}
 +
 
 +
To get the name of your wireless interface do:
 +
 
 +
$ iw dev
 +
 
 +
The name of the interface will be output after the word "Interface". For example, it is commonly {{ic|wlan0}}.
 +
 
 +
==== Get the status of the interface ====
 +
 
 +
To check link status, use following command.
 +
 
 +
$ iw dev ''interface'' link
 +
 
 +
You can get statistic information, such as the amount of tx/rx bytes, signal strength etc., with following command:
 +
 
 +
$ iw dev ''interface'' station dump
 +
 
 +
==== Activate the interface ====
 +
 
 +
{{Tip|Usually this step is not required.}}
 +
 
 +
Some cards require that the kernel interface be activated before you can use ''iw'' or ''wireless_tools'':
 +
 
 +
# ip link set ''interface'' up
 +
 
 +
{{Note|If you get errors like {{ic|RTNETLINK answers: Operation not possible due to RF-kill}}, make sure that hardware switch is ''on''. See [[#Rfkill caveat]] for details.}}
 +
 
 +
To verify that the interface is up, inspect the output of the following command:
 +
 
 +
{{hc|# ip link show ''interface''|
 +
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state DOWN mode DORMANT group default qlen 1000
 +
    link/ether 12:34:56:78:9a:bc brd ff:ff:ff:ff:ff:ff
 +
}}
 +
 
 +
The {{ic|UP}} in {{ic|<BROADCAST,MULTICAST,UP,LOWER_UP>}} is what indicates the interface is up, not the later {{ic|state DOWN}}.
 +
 
 +
==== Discover access points ====
 +
 
 +
To see what access points are available:
 +
 
 +
# iw dev ''interface'' scan | less
 +
 
 +
{{Note|If it displays {{ic|Interface does not support scanning}}, then you probably forgot to install the firmware. In some cases this message is also displayed when not running ''iw'' as root.}}
 +
 
 +
{{Tip|Depending on your location, you might need to set the correct [[#Respecting the regulatory domain|regulatory domain]] in order to see all available networks.}}
  
==== If your card is not listed ====
+
The important points to check:
 +
* '''SSID:''' the name of the network.
 +
* '''Signal:''' is reported in a wireless power ratio in dBm (e.g. from -100 to 0). The closer the negative value gets to zero, the better the signal. Observing the reported power on a good quality link and a bad one should give an idea about the individual range.
 +
* '''Security:''' it is not reported directly, check the line starting with {{ic|capability}}. If there is {{ic|Privacy}}, for example {{ic|capability: ESS Privacy ShortSlotTime (0x0411)}}, then the network is protected somehow.
 +
** If you see an {{ic|RSN}} information block, then the network is protected by [[Wikipedia:IEEE 802.11i-2004|Robust Security Network]] protocol, also known as WPA2.
 +
** If you see an {{ic|WPA}} information block, then the network is protected by [[Wikipedia:Wi-Fi Protected Access|Wi-Fi Protected Access]] protocol.
 +
** In the {{ic|RSN}} and {{ic|WPA}} blocks you may find the following information:
 +
*** '''Group cipher:''' value in TKIP, CCMP, both, others.
 +
*** '''Pairwise ciphers:''' value in TKIP, CCMP, both, others. Not necessarily the same value than Group cipher.
 +
*** '''Authentication suites:''' value in PSK, 802.1x, others. For home router, you will usually find PSK (''i.e.'' passphrase). In universities, you are more likely to find 802.1x suite which requires login and password. Then you will need to know which key management is in use (e.g. EAP), and what encapsulation it uses (e.g. PEAP). See [[WPA2 Enterprise]] and [[Wikipedia:Authentication protocol]] for details.
 +
** If you see neither {{ic|RSN}} nor {{ic|WPA}} blocks but there is {{ic|Privacy}}, then WEP is used.
  
If your wireless hardware is not listed above, likely it is supported only under Windows (some Broadcom, 3com, etc). For these, you will need to use [http://ndiswrapper.sourceforge.net/wiki/index.php/List ndiswrapper].
+
==== Set operating mode ====
  
Ndiswrapper is a wrapper script that allows you to use some Windows drivers in Linux. See the compatibility list [http://ndiswrapper.sourceforge.net/mediawiki/index.php/List here]. You will need the {{ic|.inf}} and {{ic|.sys}} files from your Windows install. If you have a newer card, or a more exotic card, you might want to look up your exact model name and 'linux' and search the Internet before doing this step.
+
You might need to set the proper operating mode of the wireless card. More specifically, if you are going to connect an [[Ad-hoc networking|ad-hoc network]], you need to set the operating mode to {{ic|ibss}}:
  
===Install user space tools ===
+
# iw dev ''interface'' set type ibss
  
====If you have wired Internet access available====
+
{{Note|Changing the operating mode on some cards might require the wireless interface to be ''down'' ({{ic|ip link set ''interface'' down}}).}}
If you have wired Ethernet available and are simply adding wireless functionality to an existing system, and you did not include {{Pkg|wireless_tools}} during initial installation, then [[pacman|install]] the package {{Pkg|wireless_tools}}.
 
  
{{Note|{{Pkg|wireless_tools}} may not be required depending on the age of your hardware and whether your hardware/drivers support {{Pkg|wpa_supplicant}}. If your configuration is supported well enough to work using only {{Pkg|wpa_supplicant}}, then it is recommended to stick with wpa_supplicant only.}}
+
==== Connect to an access point ====
  
The drivers' corresponding package names are either highlighted in '''bold''' or via {{ic|monospaced font}} on this page. The packages can be installed during initial package selection on the Arch Linux installation media and can also be [[pacman|installed]] later.
+
Depending on the encryption, you need to associate your wireless device with the access point to use and pass the encryption key:
  
====If you have only wireless internet available====
+
* '''No encryption''' {{bc|# iw dev ''interface'' connect "''your_essid''"}}
The {{Pkg|wireless_tools}} package is now available as part of the base system and is also on the live installation media (CD/USB stick image) under the [[Beginners%27_Guide#Install_the_base_system|base-devel]] group.
+
* '''WEP'''
 +
** using a hexadecimal or ASCII key (the format is distinguished automatically, because a WEP key has a fixed length): {{bc|# iw dev ''interface'' connect "''your_essid''" key 0:''your_key''}}
 +
** using a hexadecimal or ASCII key, specifying the third set up key as default (keys are counted from zero, four are possible): {{bc|# iw dev ''interface'' connect "''your_essid''" key d:2:''your_key''}}
 +
* '''WPA/WPA2''' According to what you got from [[#Discover access points]], issue this command: {{bc|# wpa_supplicant -i ''interface'' -c <(wpa_passphrase "''your_SSID''" "''your_key''")}}
  
You cannot initialize wireless hardware without these user-space tools, so ensure they are installed from the [[Beginners%27_Guide#Install_the_base_system|installer media]], especially if you have no means of networking other than wirelessly. Otherwise, you will be stuck in a "catch 22" when you reboot your newly installed Arch Linux system: you will need {{Pkg|wireless_tools}} and drivers, but in order to get them, you will need {{Pkg|wireless_tools}} and drivers.
+
If this does not work, you may need to adjust the options.  
 +
If connected successfully, continue in a new terminal (or quit {{ic|wpa_supplicant}} with {{ic|Ctrl+c}} and add the {{ic|-B}} switch to the above command to run it in the background). [[WPA supplicant]] contains more information on options and on how to create a permanent configuration file for the wireless access point.
 +
 +
Regardless of the method used, you can check if you have associated successfully:
  
===Drivers and firmware===
+
# iw dev ''interface'' link
  
The default Arch Linux kernel is ''modular'', meaning many of the drivers for machine hardware reside on the hard drive and are available as ''[[Kernel modules|modules]]''. At boot, [[udev]] takes an inventory of your hardware. Udev will load appropriate modules (drivers) for your corresponding hardware, and the driver, in turn, will allow creation of a kernel ''interface''.
+
==== Get an IP address ====
  
The interface name for different drivers and chipsets will vary. Some examples are ''wlan0'', ''eth1'', and ''ath0''.
+
Follow the instructions in [[Network configuration#Manual assignment]] for more information on the following examples.
  
{{Note|Udev is not perfect. If the proper module is not loaded by udev on boot, simply {{ic|modprobe}} it and add the module name in a {{ic|.conf}} file in {{ic|/etc/modules-load.d/}}. Note also that udev may occasionally load more than one driver for a device, and the resulting conflict will prevent successful configuration. Be sure to [[Kernel_modules#Blacklisting|blacklist]] the unwanted module.}}
+
===== Example =====
  
Methods and procedures for installing kernel modules for various chipsets are covered below. In addition, certain chipsets require the installation of corresponding ''firmware'' (also covered below). Read [[Kernel modules]] for general informations on operations with modules.
+
Here is a complete example of setting up a wireless network with WPA supplicant and DHCP.
  
====rt2860 and rt2870====
+
# ip link set dev wlan0 up
 +
# wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
 +
# dhcpcd wlan0
  
From Linux kernel 3.0, the staging driver {{ic|rt2860sta}} is replaced by the mainline driver {{ic|rt2800pci}}, and {{ic|rt2870sta}} is replaced by {{ic|rt2800usb}}. As a result, the staging drivers are deleted. Source: [https://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=fefecc6989b4b24276797270c0e229c07be02ad3 Kernel commit]. The rt2800 driver automatically works with devices using the rt2870 chipset.
+
And then to close the connection, you can simply disable the interface:
  
It has a wide range of options that can be configured with {{ic|iwpriv}}. These are documented in the [http://web.ralinktech.com/ralink/Home/Support/Linux.html source tarballs] available from Ralink.
+
# ip link set dev wlan0 down
  
====rt3090====
+
For a static IP, you would replace the ''dhcpcd'' invocation with
For devices which are using the rt3090 chipset it should be possible to use {{ic|rt2860sta}} driver. The mainline driver {{ic|rt2800pci}} is not working with this chipset very well (e.g. sometimes it's not possible to use higher rate than 2Mb/s).
 
  
The best way is to use the {{AUR|rt3090}} driver from [[AUR]]. Compile the {{AUR|rt3090}} driver from [[AUR]], delete/move the /etc/Wireless/RT2860STA/RT2860STA.dat firmware file to allow installation of the compiled RT3090 package, [[Kernel modules#Blacklisting|blacklist]] the rt2860sta module and setup the rt3090sta module to [[Kernel modules#Loading|load]] at boot.
+
# ip addr add 192.168.0.10/24 broadcast 192.168.0.255 dev wlan0
 +
# ip route add default via 192.168.0.1
  
Note: This driver also works for rt3062 chipsets.
+
And before disabling the interface you would first flush the IP address and gateway:
  
====rt2x00====
+
# ip addr flush dev wlan0
Unified driver for Ralink chipsets (replaces {{ic|rt2500}}, {{ic|rt61}}, {{ic|rt73}}, etc). This driver has been in the Linux kernel since 2.6.24, but some devices may require extra firmware. It can be configured using the standard {{Pkg|wpa_supplicant}} and {{ic|iwconfig}} tools.
+
# ip route flush dev wlan0
  
Some chips require a firmware file, which is installed by default in Arch Linux via the package {{Pkg|linux-firmware}}.
+
=== Automatic setup ===
  
See: [[Using the new rt2x00 beta driver]]
+
There are many solutions to choose from, but remember that all of them are mutually exclusive; you should not run two daemons simultaneously. The following table compares the different connection managers, additional notes are in subsections below.
  
====rt3573====
+
{| class="wikitable"
New chipset as of 2012. It may require proprietary drivers from Ralink. Different manufacturers use it, see [https://bbs.archlinux.org/viewtopic.php?pid=1164228#p1164228 Belkin N750 example]
+
! Connection manager || Network <br>profiles <br>support || Roaming <br>(auto connect dropped <br>or changed location) || [[Wikipedia:Point-to-Point Protocol|PPP]] support <br>(e.g. 3G modem) || [[Archiso]] [https://git.archlinux.org/archiso.git/tree/configs/releng/packages.both]  || Official <br>GUI || Console tools || Systemd units
====rt5572====
+
|-
New chipset as of 2012 with support for 5 Ghz bands. It may require proprietary drivers from Ralink and some effort to compile them. At the time of writing a how-to on compilation is available for a DLINK DWA-160 rev. B2 [http://bernaerts.dyndns.org/linux/229-ubuntu-precise-dlink-dwa160-revb2 here].
+
| [[ConnMan]] || {{Yes}} || {{Yes}} || {{Yes}} || {{No}} || {{No}} || {{ic|connmanctl}} || {{ic|connman.service}}
 +
|-
 +
| [[netctl]] || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} ({{grp|base}}) || {{No}} || {{ic|netctl}},{{ic|wifi-menu}} || {{ic|netctl-auto@''interface''.service}}
 +
|-
 +
| [[NetworkManager]] || {{Yes}} || {{Yes}} || {{Yes}} || {{No}} || {{Yes}} || {{ic|nmcli}},{{ic|nmtui}} || {{ic|NetworkManager.service}}
 +
|-
 +
| [[Wicd]] || {{Yes}} || {{Yes}} || {{No}} || {{No}} || {{Yes}} || {{ic|wicd-curses}} || {{ic|wicd.service}}
 +
|-
 +
| [[Wifi Radar]] || {{Yes}} || {{Yes}} || {{No}} || {{No}} || {{Yes}} || {{ic|wifi-radar}} ||
 +
|}
 +
 
 +
See also [[List of applications/Internet#Network managers]].
 +
 
 +
== WPA2 Enterprise ==
 +
 
 +
''WPA2 Enterprise'' is a mode of [[Wikipedia:Wi-Fi_Protected_Access|Wi-Fi Protected Access]]. It provides better security and key management than ''WPA2 Personal'', and supports other enterprise-type functionality, such as VLANs and [[wikipedia:Network Access Protection|NAP]]. However, it requires an external authentication server, called [[wikipedia:RADIUS|RADIUS]] server to handle the authentication of users. This is in contrast to Personal mode which does not require anything beyond the wireless router or access points (APs), and uses a single passphrase or password for all users.
 +
 
 +
The Enterprise mode enables users to log onto the Wi-Fi network with a username and password and/or a digital certificate. Since each user has a dynamic and unique encryption key, it also helps to prevent user-to-user snooping on the wireless network, and improves encryption strength.
 +
 
 +
This section describes the configuration of [[List of applications#Network managers|network clients]] to connect to a wireless access point with WPA2 Enterprise mode. See [[Software access point#RADIUS]] for information on setting up an access point itself.
 +
 
 +
{{Note|Enterprise mode requires a more complex client configuration, whereas Personal mode only requires entering a passphrase when prompted. Clients likely need to install the server’s CA certificate (plus per-user certificates if using EAP-TLS), and then manually configure the wireless security and 802.1X authentication settings.}}
 +
 
 +
For a comparison of protocols see the following [http://deployingradius.com/documents/protocols/compatibility.html table].
 +
 
 +
{{Warning|It is possible to use WPA2 Enterprise without the client checking the server CA certificate. However, you should always seek to do so, because without authenticating the access point the connection can be subject to a man-in-the-middle attack. This may happen because while the connection handshake itself may be encrypted, the most widely used setups transmit the password itself either in plain text or the easily breakable [[#MS-CHAPv2]]. Hence, the client might send the password to a malicious access point which then proxies the connection.}}
 +
 
 +
=== eduroam ===
 +
 
 +
[[Wikipedia:eduroam|eduroam]] is an international roaming service for users in research, higher education and further education, based on WPA2 Enterprise.
 +
 
 +
{{Note|
 +
* Check connection details '''first''' with your institution before applying any profiles listed in this section. Example profiles are not guaranteed to work or match any security requirements.
 +
* When storing connection profiles unencrypted, it is recommended restrict read access to the root account by specifying {{ic|chmod 600 ''profile''}} as root.
 +
}}
 +
 
 +
{{Tip|Configuration for [[NetworkManager]] and [[#wpa_supplicant]] can be generated with the [https://cat.eduroam.org/ eduroam Configuration Assistant Tool].}}
 +
 
 +
=== Manual/automatic setup ===
 +
 
 +
==== wpa_supplicant ====
 +
 
 +
[[WPA supplicant#Advanced usage|WPA supplicant]] can be configured directly and used in combination with a DHCP client or with systemd. See the examples in {{ic|/usr/share/doc/wpa_supplicant/wpa_supplicant.conf}} for configuring the connection details.
 +
 
 +
==== NetworkManager ====
 +
 
 +
[[NetworkManager]] can generate WPA2 Enterprise profiles with [[NetworkManager#Front-ends|graphical front ends]]. ''nmcli'' and ''nmtui'' do not support this, but may use existing profiles.
 +
 
 +
==== connman ====
 +
 
 +
[[ConnMan]] needs a separate configuration file before [[ConnMan#Wi-Fi|connecting]] to the network. See {{man|5|connman-service.config}} and [[ConnMan#Connecting_to_eduroam_.28802.1X.29|Connman#Connecting to eduroam]] for details.
 +
 
 +
==== netctl ====
 +
 
 +
[[netctl]] supports [[#wpa_supplicant]] configuration through blocks included with {{ic|1=WPAConfigSection=}}. See {{man|5|netctl.profile}} for details.
 +
 
 +
{{Warning|Special quoting rules apply: see the {{ic|''SPECIAL QUOTING RULES''}} section in {{man|5|netctl.profile}}.}}
 +
 
 +
{{Tip|Custom certificates can be specified by adding the line {{ic|1='ca_cert="/path/to/special/certificate.cer"'}} in {{ic|WPAConfigSection}}.}}
 +
 
 +
=== Troubleshooting ===
 +
 
 +
==== MS-CHAPv2 ====
 +
 
 +
WPA2-Enterprise wireless networks demanding MSCHAPv2 type-2 authentication with PEAP sometimes require {{Pkg|pptpclient}} in addition to the stock {{Pkg|ppp}} package. [[netctl]] seems to work out of the box without ppp-mppe, however. In either case, usage of MSCHAPv2 is discouraged as it is highly vulnerable, although using another method is usually not an option. See also [https://www.cloudcracker.com/blog/2012/07/29/cracking-ms-chap-v2/] and [http://research.edm.uhasselt.be/~bbonne/docs/robyns14wpa2enterprise.pdf].
  
====w322u====
+
== Tips and tricks ==
Treat this Tenda card as an {{ic|rt2870sta}} device. See: [[rt2870]]
 
  
====rtl8180====
+
=== Respecting the regulatory domain ===
Realtek rtl8180 PCI/Cardbus 802.11b is now fully supported in the kernel. It can be configured using the standard {{Pkg|wpa_supplicant}} and {{ic|iwconfig}} tools.
 
  
====rtl8187====
+
The [[wikipedia:IEEE_802.11#Regulatory_domains_and_legal_compliance|regulatory domain]], or "regdomain", is used to reconfigure wireless drivers to make sure that wireless hardware usage complies with local laws set by the FCC, ETSI and other organizations. Regdomains use [[wikipedia:ISO_3166-1_alpha-2|ISO 3166-1 alpha-2 country codes]]. For example, the regdomain of the United States would be "US", China would be "CN", etc.
See: [[Rtl8187_wireless|rtl8187]]
 
  
====rtl8192e====
+
Regdomains affect the availability of wireless channels. In the 2.4GHz band, the allowed channels are 1-11 for the US, 1-14 for Japan, and 1-13 for most of the rest of the world. In the 5GHz band, the rules for allowed channels are much more complex. In either case, consult [[wikipedia:List_of_WLAN_channels|this list of WLAN channels]] for more detailed information.
  
The driver is part of the current kernel package. It can be configured using the standard {{Pkg|wpa_supplicant}} and {{ic|iwconfig}} tools.
+
Regdomains also affect the limit on the [[wikipedia:Equivalent_isotropically_radiated_power|effective isotropic radiated power (EIRP)]] from wireless devices. This is derived from transmit power/"tx power", and is measured in [[wikipedia:DBm|dBm/mBm (1dBm=100mBm) or mW (log scale)]]. In the 2.4GHz band, the maximum is 30dBm in the US and Canada, 20dBm in most of Europe, and 20dB-30dBm for the rest of the world. In the 5GHz band, maximums are usually lower. Consult the [http://git.kernel.org/cgit/linux/kernel/git/linville/wireless-regdb.git/tree/db.txt wireless-regdb] for more detailed information (EIRP dBm values are in the second set of brackets for each line).
  
{{Note|[[wicd]] may cause excessive dropped connections with this driver, while [[NetworkManager]] appears to work better.}}
+
Misconfiguring the regdomain can be useful - for example, by allowing use of an unused channel when other channels are crowded, or by allowing an increase in tx power to widen transmitter range. However, '''this is not recommended''' as it could break local laws and cause interference with other radio devices.
  
=====Module initialization fails=====
+
To configure the regdomain, install {{Pkg|crda}} and reboot (to reload the {{ic|cfg80211}} module and all related drivers). Check the boot log to make sure that CRDA is being called by {{ic|cfg80211}}:
  
The module initialization may fail at boot giving this error message :
+
$ dmesg | grep cfg80211
  
rtl819xE:ERR in CPUcheck_firmware_ready()
+
The current regdomain can be set to the United States with:
rtl819xE:ERR in init_firmware() step 2
 
rtl819xE:ERR!!! _rtl8192_up(): initialization is failed!
 
r8169 0000:03:00.0: eth0: link down
 
  
A workaround is to simply unload the module:
+
  # iw reg set US
  # modprobe -r r8192e_pci
 
and reload the module (after a pause):
 
# modprobe r8192e_pci
 
  
====rtl8192s====
+
And queried with:
  
The driver is part of the current kernel package. Firmware may need to be added manually if {{ic|/usr/lib/firmware/RTL8192SU/rtl8192sfw.bin}} does not exist. ({{ic|dmesg}} will report ''"rtl819xU:FirmwareRequest92S(): failed"'' if the firmware is missing)
+
$ iw reg get
  
To download and install firmware:
+
{{Note|Your device may be set to country "00", which is the "world regulatory domain" and contains generic settings. If this cannot be unset, CRDA may be misconfigured.}}
$ wget http://launchpadlibrarian.net/33927923/rtl8192se_linux_2.6.0010.1012.2009.tar.gz
 
# mkdir /lib/firmware/RTL8192SU
 
# tar -xzOf rtl8192se_linux_2.6.0010.1012.2009.tar.gz \
 
  rtl8192se_linux_2.6.0010.1012.2009/firmware/RTL8192SE/rtl8192sfw.bin > \
 
  /lib/firmware/RTL8192SU/rtl8192sfw.bin
 
  
{{Note|An alternate version of the firmware may be found [http://launchpadlibrarian.net/37387612/rtl8192sfw.bin.gz here], but this version may cause dropped connections.}}
+
However, setting the regdomain may not alter your settings. Some devices have a regdomain set in firmware/EEPROM, which dictates the limits of the device, meaning that setting regdomain in software [http://wiki.openwrt.org/doc/howto/wireless.utilities#iw can only increase restrictions], not decrease them. For example, a CN device could be set in software to the US regdomain, but because CN has an EIRP maximum of 20dBm, the device will not be able to transmit at the US maximum of 30dBm.
  
{{Note|[[wicd]] may cause excessive dropped connections with this driver, while [[NetworkManager]] appears to work better.}}
+
For example, to see if the regdomain is being set in firmware for an Atheros device:
  
====madwifi-ng====
+
$ dmesg | grep ath:
There are three modules maintained by the MadWifi team:
 
* {{ic|ath_pci}} is the older driver.
 
* [[#ath5k|{{ic|ath5k}}]] will eventually phase out {{ic|ath_pci}}. Currently a better choice for some chipsets, but not all chipsets are supported (see below)
 
* [[#ath9k|{{ic|ath9k}}]] is the new, official, superior driver for newer Atheros hardware (see below)
 
  
For old {{ic|ath_pci}} driver, install package {{AUR|madwifi}} and optionally {{AUR|madwifi-utils-svn}}. Then:
+
For other chipsets, it may help to search for "EEPROM", "regdomain", or simply the name of the device driver.
# modprobe ath_pci
 
  
If using {{ic|ath_pci}}, you may need to blacklist {{ic|ath5k}}. See [[Kernel_modules#Blacklisting]] for instructions.
+
To see if your regdomain change has been successful, and to query the number of available channels and their allowed transmit power:
  
Some users '''may need''' to use the {{ic|countrycode}} option when loading the MadWifi driver in order to use channels and transmit power settings that are legal in their country/region. In the Netherlands, for example, you would load the module like this:
+
$ iw list | grep -A 15 Frequencies:
# modprobe ath_pci countrycode=528
 
  
You can verify the settings with the {{ic|iwlist}} command. See {{ic|man iwlist}} and the [http://madwifi-project.org/wiki/UserDocs/CountryCode CountryCode page on the MadWifi wiki]. To have this setting automatically applied during boot, refer to [[Kernel_modules#Configuration]], and note the following module option setting:
+
A more permanent configuration of the regdomain can be achieved through editing {{ic|/etc/conf.d/wireless-regdom}} and uncommenting the appropriate domain. {{ic|wpa_supplicant}} can also use a regdomain in the {{ic|1=country=}} line of {{ic|/etc/wpa_supplicant/wpa_supplicant.conf}}.
options ath_pci countrycode=528
 
  
====ath5k====
+
It is also possible to configure the [http://wireless.kernel.org/en/developers/Documentation/cfg80211 cfg80211] kernel module to use a specific regdomain by adding, for example, {{ic|1=options cfg80211 ieee80211_regdom=EU}} as [[Kernel_modules#Setting module options|module options]]. However, this is part of the [http://wireless.kernel.org/en/developers/Regulatory#The_ieee80211_regdom_module_parameter old regulatory implementation].
{{ic|ath5k}} is the preferred driver for AR5xxx chipsets including those which are already working with {{ic|madwifi-ng}} and for some chipsets older than AR5xxx.  
 
  
If {{ic|ath5k}} is conflicting with {{ic|ath_pci}} on your system, [[Kernel_modules#Blacklisting|blacklist]] (and unload using {{ic|rmmod}} or reboot) the following drivers:
+
For further information, read the [http://wireless.kernel.org/en/developers/Regulatory/ wireless.kernel.org regulatory documentation].
ath_hal
 
ath_pci
 
ath_rate_amrr
 
ath_rate_onoe
 
ath_rate_sample
 
wlan
 
wlan_acl
 
wlan_ccmp
 
wlan_scan_ap
 
wlan_scan_sta
 
wlan_tkip
 
wlan_wep
 
wlan_xauth
 
  
then {{ic|modprobe ath5k}} manually or reboot. ''wlan0'' (or ''wlanX'') in sta mode should spawn and become ready to use.
+
=== iw and wireless_tools comparison ===
  
If the device is unable to lease an IP after being loaded, try {{ic|modprobe ath5k nohwcrypt<nowiki>=</nowiki>1}}. See below for details about the nohwcrypt option.
+
The table below gives an overview of comparable commands for ''iw'' and ''wireless_tools''. See [http://wireless.kernel.org/en/users/Documentation/iw/replace-iwconfig iw replaces iwconfig] for more examples.
  
Info:
+
{| class="wikitable"
* http://wireless.kernel.org/en/users/Drivers/ath5k
+
! ''iw'' command
* http://wiki.debian.org/ath5k
+
! ''wireless_tools'' command
 +
! Description
 +
|-
 +
| iw dev ''wlan0'' link
 +
| iwconfig ''wlan0''
 +
| Getting link status.
 +
|-
 +
| iw dev ''wlan0'' scan
 +
| iwlist ''wlan0'' scan
 +
| Scanning for available access points.
 +
|-
 +
| iw dev ''wlan0'' set type ibss
 +
| iwconfig ''wlan0'' mode ad-hoc
 +
| Setting the operation mode to ''ad-hoc''.
 +
|-
 +
| iw dev ''wlan0'' connect ''your_essid''
 +
| iwconfig ''wlan0'' essid ''your_essid''
 +
| Connecting to open network.
 +
|-
 +
| iw dev ''wlan0'' connect ''your_essid'' 2432
 +
| iwconfig ''wlan0'' essid ''your_essid'' freq 2432M
 +
| Connecting to open network specifying channel.
 +
|-
 +
| rowspan="2" | iw dev ''wlan0'' connect ''your_essid'' key 0:''your_key''
 +
| iwconfig ''wlan0'' essid ''your_essid'' key ''your_key''
 +
| Connecting to WEP encrypted network using hexadecimal key.
 +
|-
 +
| iwconfig ''wlan0'' essid ''your_essid'' key s:''your_key''
 +
| Connecting to WEP encrypted network using ASCII key.
 +
|-
 +
| iw dev ''wlan0'' set power_save on
 +
| iwconfig ''wlan0'' power on
 +
| Enabling power save.
 +
|}
 +
 
 +
== Troubleshooting ==
 +
 
 +
This section contains general troubleshooting tips, not strictly related to problems with drivers or firmware. For such topics, see next section [[#Troubleshooting drivers and firmware]].
  
{{Note|1=Some laptop have problems with their wireless LED indicator flickering red and blue. To solve this problem, do:
+
=== Temporary internet access ===
echo none > "/sys/class/leds/ath5k-phy0::tx/trigger"
 
echo none > "/sys/class/leds/ath5k-phy0::rx/trigger"
 
  
For alternatives, look [https://bugzilla.redhat.com/show_bug.cgi?id=618232 here].}}
+
If you have problematic hardware and need internet access to, for example, download some software or get help in forums, you can make use of Android's built-in feature for internet sharing via USB cable. See [[Android tethering#USB tethering]] for more information.
  
{{Note|1=If you find web pages randomly loading very slow in Firefox/Opera/Chromium, or if the adapter has problems leasing an IP, try to switch from hardware to software encryption:
+
=== Rfkill caveat ===
rmmod ath5k
 
modprobe ath5k nohwcrypt
 
  
And restart your connection. If it helps, make the change permanent by adding into {{ic|/etc/modprobe.d/010-ath5k.conf}}:
+
Many laptops have a hardware button (or switch) to turn off wireless card, however, the card can also be blocked by kernel. This can be handled by {{Pkg|rfkill}}. Use ''rfkill'' to show the current status:
options ath5k nohwcrypt
 
  
More about modprobe options: [[Modprobe#Options]]
+
{{hc|# rfkill list|
 +
0: phy0: Wireless LAN
 +
Soft blocked: yes
 +
Hard blocked: yes
 
}}
 
}}
  
====ath9k====
+
If the card is ''hard-blocked'', use the hardware button (switch) to unblock it. If the card is not ''hard-blocked'' but ''soft-blocked'', use the following command:
{{ic|ath9k}} is Atheros' officially supported driver for the newer 802.11n chipsets. All of the chips with 802.11n capabilities are supported, with a maximum throughput around 180 Mbps. To see a complete list of supported hardware, check this [http://wireless.kernel.org/en/users/Drivers/ath9k page].
 
  
Working modes: Station, AP and Adhoc.
+
# rfkill unblock wifi
  
{{ic|ath9k}} has been part of the Linux kernel as of v2.6.27. (In the unlikely event that you have stability issues that trouble you, you could try using the [http://wireless.kernel.org/en/users/Download compat-wireless] package.
+
{{Note|It is possible that the card will go from ''hard-blocked'' and ''soft-unblocked'' state into ''hard-unblocked'' and ''soft-blocked'' state by pressing the hardware button (i.e. the ''soft-blocked'' bit is just switched no matter what). This can be adjusted by tuning some options of the {{ic|rfkill}} [[kernel module]].}}
An [https://lists.ath9k.org/mailman/listinfo/ath9k-devel ath9k mailing list] exists for support and development related discussions.)
 
  
Info:
+
Hardware buttons to toggle wireless cards are handled by a vendor specific [[kernel module]], frequently these are [https://lwn.net/Articles/391230/ WMI] modules. Particularly for very new hardware models, it happens that the model is not fully supported in the latest stable kernel yet. In this case it often helps to search the kernel bug tracker for information and report the model to the maintainer of the respective vendor kernel module, if it has not happened already.
* http://wireless.kernel.org/en/users/Drivers/ath9k
+
 
* http://wiki.debian.org/ath9k
+
See also: http://askubuntu.com/questions/62166/siocsifflags-operation-not-possible-due-to-rf-kill
  
====ath9k_htc====
+
=== Observing Logs ===
{{ic|ath9k_htc}} is Atheros' officially supported driver for 802.11n USB devices. Station and Ad-Hoc modes are supported. The driver is included in the kernel. For more information, see http://wireless.kernel.org/en/users/Drivers/ath9k_htc .
 
  
====ipw2100 and ipw2200====
+
A good first measure to troubleshoot is to analyze the system's logfiles first. In order not to manually parse through them all, it can help to open a second terminal/console window and watch the kernels messages with
These modules are fully supported in the kernel, but they require additional firmware. It can be configured using the standard {{Pkg|wpa_supplicant}} and {{ic|iwconfig}} tools.
+
$ dmesg -w
 +
while performing the action, e.g. the wireless association attempt.  
  
Depending on which of the chipsets you have, [[pacman|install]] either {{Pkg|ipw2100-fw}} or {{Pkg|ipw2200-fw}}.
+
When using a tool for network management, the same can be done for systemd with
 +
# journalctl -f
  
If installing after initial Arch Linux installation, the module may need to be reloaded for the firmware to be loaded; run the following as root:
+
Frequently a wireless error is accompanied by a deauthentication with a particular reason code, for example:  
  rmmod ipw2200
+
  wlan0: deauthenticating from XX:XX:XX:XX:XX:XX by local choice (reason=3)
modprobe ipw2200
 
  
=====Enabling the radiotap interface=====
+
Looking up [http://www.aboutcher.co.uk/2012/07/linux-wifi-deauthenticated-reason-codes/ the reason code] might give a first hint. Maybe it also helps you to look at the control message [https://wireless.wiki.kernel.org/en/developers/documentation/mac80211/auth-assoc-deauth flowchart], the journal messages will follow it.
Launch the following as root:
+
   
  rmmod ipw2200
+
The individual tools used in this article further provide options for more detailed debugging output, which can be used in a second step of the analysis, if required.
modprobe ipw2200 rtap_iface=1
 
  
=====Enabling the LED=====
+
=== Power saving ===
Most laptops will have a front LED to indicate when the wireless is connected (or not). Add the following to {{ic|/etc/modprobe.d/ipw2200.conf}}:
 
options ipw2200 led=1
 
  
====iwl3945, iwl4965 and iwl5000-series====
+
See [[Power saving#Network interfaces]].
'''I'''ntel's open source '''W'''i-Fi drivers for '''L'''inux (See [http://intellinuxwireless.org iwlwifi]) will work for both the 3945 and 4965 chipsets since kernel 2.6.24. And iwl5000-series chipsets (including 5100BG, 5100ABG, 5100AGN, 5300AGN and 5350AGN) have been supported since '''kernel 2.6.27''', by the in-tree driver '''iwlagn'''.
 
  
Since the 2.6.34 kernel update, the firmware files were moved to the {{ic|linux-firmware}} package. Manually installing firmware packages is not required.
+
=== Failed to get IP address ===
  
=====Loading the Driver=====
+
* If getting an IP address repeatedly fails using the default {{Pkg|dhcpcd}} client, try installing and using {{Pkg|dhclient}} instead. Do not forget to select ''dhclient'' as the primary DHCP client in your [[#Automatic setup|connection manager]]!
[[udev]] should load the driver automatically. To manually load the driver at start-up, read [[Kernel modules#Loading]], and add {{ic|iwl3945}} or {{ic|iwl4965}} respectively to the new file. For example:
 
# Load Intel Wi-Fi modules
 
iwl3945
 
  
The drivers should now load after a reboot, and running {{ic|ip addr}} from a terminal should report ''wlan0'' as a new network interface.
+
* If you can get an IP address for a wired interface and not for a wireless interface, try disabling the wireless card's [[#Power saving|power saving]] features (specify {{ic|off}} instead of {{ic|on}}).
  
=====Disabling LED blink=====
+
* If you get a timeout error due to a ''waiting for carrier'' problem, then you might have to set the channel mode to {{ic|auto}} for the specific device:
  
The default settings on the module are to have the LED blink on activity. Some people find this extremely annoying. To have the LED on solid when Wi-Fi is active:
+
# iwconfig wlan0 channel auto
  
# echo 'w /sys/class/leds/phy0-led/trigger - - - - phy0radio' > /etc/tmpfiles.d/phy0-led.conf
+
Before changing the channel to auto, make sure your wireless interface is down. After it has successfully changed it, you can bring the interface up again and continue from there.
# systemd-tmpfiles --create phy0-led.conf
 
  
To see all the possible trigger values for this LED:
+
=== Valid IP address but cannot resolve host ===
  
# cat /sys/class/leds/phy0-led/trigger
+
If you are on a public wireless network that may have a [[wikipedia:Captive_portal|captive portal]], make sure to query an HTTP page (not an HTTPS page) from your web browser, as some captive portals only redirect HTTP. If this is not the issue, it may be necessary to remove any custom DNS servers from [[resolv.conf]].
  
Here is an example for the old way, if you do not have {{ic|/sys/class/leds/phy0-led}}:
+
=== Setting RTS and fragmentation thresholds ===
  
# echo "options iwlcore led_mode=1" >> /etc/modprobe.d/modprobe.conf
+
Wireless hardware disables RTS and fragmentation by default. These are two different methods of increasing throughput at the expense of bandwidth (i.e. reliability at the expense of speed). These are useful in environments with wireless noise or many adjacent access points, which may create interference leading to timeouts or failing connections.  
# rmmod iwlagn
 
# rmmod iwlcore
 
# modprobe iwlcore
 
# modprobe iwlagn
 
  
On Linux kernels 2.6.39.1-1 and up, the {{ic|iwlcore}} module was deprecated. Use {{ic|1=options iwlagn led_mode=1}} or {{ic|1=options iwl_legacy led_mode=1}} instead (find out what module is loaded with {{ic|lsmod}}).
+
Packet fragmentation improves throughput by splitting up packets with size exceeding the fragmentation threshold. The maximum value (2346) effectively disables fragmentation since no packet can exceed it. The minimum value (256) maximizes throughput, but may carry a significant bandwidth cost.
  
{{Note| iwl_legacy was renamed iwlegacy in Linux kernel 3.3.1. For this version, use {{ic|1=options iwlegacy led_mode=1}}.}}
+
# iw phy0 set frag 512
  
=====Other Notes=====
+
[[Wikipedia:IEEE 802.11 RTS/CTS|RTS]] improves throughput by performing a handshake with the access point before transmitting packets with size exceeding the RTS threshold. The maximum threshold (2347) effectively disables RTS since no packet can exceed it. The minimum threshold (0) enables RTS for all packets, which is probably excessive for most situations.
* The MS Windows NETw4x32 driver can be used with ndiswrapper as an alternative to the {{ic|iwl3945}} and {{ic|ipw3945}} drivers.
 
* In some cases (specifically a [[Dell Latitude D620]] with Arch 2008.06, though it could happen elsewhere), after installation you may have both {{ic|iwl3945}} and {{ic|ipw3945}} modules loaded. The card will not work with both modules loaded, so you will have to [[Kernel modules#Blacklisting|blacklist]] the {{ic|ipw3945}} module.
 
* By default, {{ic|iwl3945}} is configured to only work with networks on channels 1-11. Higher frequency bands are not allowed in some parts of the world (e.g. the US). In the EU however, channels 12 and 13 are used quite commonly (and Japan allows for channel 14). To make {{ic|iwl3945}} scan for all channels, add {{ic|1=options cfg80211 ieee80211_regdom=EU}} to {{ic|/etc/modprobe.d/modprobe.conf}}. With {{ic|iwlist f}} you can check which channels are allowed.
 
* If you want to enable more channels on Intel Wifi 5100 (and quite possible other cards too), you can do that with the {{pkg|crda}} package. After installing the package, edit {{ic|/etc/conf.d/wireless-regdom}} and uncomment the line where your country code is found. When executing {{ic|sudo iwlist wlan0 channel}}, you should now have access to more channels (depending on your location).
 
  
====orinoco====
+
# iw phy0 set rts 500
This should be a part of the kernel package and be installed already.
 
  
{{Note|1=Some Orinoco chipsets are Hermes I/II. You can use the AUR package {{AUR|wl_lkm}} to replace the {{ic|orinoco}} driver and gain WPA support. See [http://ubuntuforums.org/showthread.php?p=2154534#post2154534 this post] for more information.}}
+
{{Note|{{ic|phy0}} is the name of the wireless device as listed by {{ic|$ iw phy}}.}}
  
To use the driver, [[Kernel modules#Blacklisting|blacklist]] {{ic|orinoco_cs}}, and then add {{ic|wlags49_h1_cs}}.
+
=== Random disconnections ===
  
====ndiswrapper====
+
==== Cause #1 ====
Ndiswrapper is not a real driver, but you can use it when there are no native Linux kernel drivers for your wireless chipset, so it is very useful in some situations. To use it, you need the {{ic|*.inf}} file from your Windows driver (the {{ic|*.sys}} file must also be present in the same directory). Be sure to use drivers appropriate to your architecture (e.g. 32/64bit). If you need to extract these files from an {{ic|*.exe}} file, you can use {{pkg|cabextract}}.
 
  
Follow these steps to configure ndiswrapper.
+
If dmesg says {{ic|1=wlan0: deauthenticating from MAC by local choice (reason=3)}} and you lose your Wi-Fi connection, it is likely that you have a bit too aggressive power-saving on your Wi-Fi card[http://us.generation-nt.com/answer/gentoo-user-wireless-deauthenticating-by-local-choice-help-204640041.html]. Try disabling the wireless card's [[#Power saving|power saving]] features (specify {{ic|off}} instead of {{ic|on}}).
  
1. Install the driver to {{ic|/etc/ndiswrapper/*}}
+
If your card does not support enabling/disabling power save mode, check the BIOS for power management options. Disabling PCI-Express power management in the BIOS of a Lenovo W520 resolved this issue.
ndiswrapper -i filename.inf
 
2. List all installed drivers for ndiswrapper
 
ndiswrapper -l
 
3. Write configuration file in {{ic|/etc/modprobe.d/ndiswrapper.conf}}
 
ndiswrapper -m
 
depmod -a
 
  
Now the ndiswrapper install is almost finished; follow the instructions on [[Kernel modules#Loading]] to automatically load the module at boot.
+
==== Cause #2 ====
  
The important part is making sure that ndiswrapper exists on this line, so just add it alongside the other modules. It would be best to test that ndiswrapper will load now, so:
+
If you are experiencing frequent disconnections and dmesg shows messages such as
modprobe ndiswrapper
 
iwconfig
 
  
and ''wlan0'' should now exist. Check this page if you are having problems:
+
{{ic|1=ieee80211 phy0: wlan0: No probe response from AP xx:xx:xx:xx:xx:xx after 500ms, disconnecting}}
[http://ndiswrapper.sourceforge.net/joomla/index.php?/component/option,com_openwiki/Itemid,33/id,installation/ Ndiswrapper installation wiki].
 
  
====prism54====
+
try changing the channel bandwidth to {{ic|20MHz}} through your router's settings page.
Download the firmware driver for your appropriate card from [http://linuxwireless.org/en/users/Drivers/p54 this site]. Rename the firmware file to {{ic|isl3890}}.
 
If non-existent, create the directory {{ic|/usr/lib/firmware}} and move the file {{ic|isl3890}} inside it. This should do the trick. [https://bbs.archlinux.org/viewtopic.php?t=16569&start=0&postdays=0&postorder=asc&highlight=siocsifflags+such+file++directory]
 
  
If that did not work, try this:
+
==== Cause #3 ====
  
*Reload the prism module ({{ic|modprobe p54usb}} or {{ic|modprobe p54pci}}, depending on your hardware)
+
On some laptop models with hardware rfkill switches (e.g., Thinkpad X200 series), due to wear or bad design, the switch (or its connection to the mainboard) might become loose over time resulting in seemingly random hardblocks/disconnects when you accidentally touch the switch or move the laptop.
Alternatively, remove your Wi-Fi card and then reconnect it.
+
There is no software solution to this, unless your switch is electrical and the BIOS offers the option to disable the switch.
*Use the {{ic|dmesg}} command, and look at the end of the output it prints out.
+
If your switch is mechanical (most are), there are lots of possible solutions, most of which aim to disable the switch: Soldering the contact point on the mainboard/wifi-card, glueing or blocking the switch, using a screw nut to tighten the switch or removing it altogether.
Look for a section similar to this:  
 
firmware: requesting '''isl3887usb_bare'''
 
p54: LM86 firmware
 
p54: FW rev 2.5.8.0 - Softmac protocol 3.0
 
and try renaming the firmware file to the name corresponding to the part bolded here.
 
  
If you get the message
+
==== Cause #4 ====
SIOCSIFFLAGS: Operation not permitted
 
when performing {{ic|ip link set wlan0 up}} OR
 
prism54: Your card/socket may be faulty, or IRQ line too busy :(
 
appears in {{ic|dmesg}}'s output this may be because you have both the deprecated kernel module {{ic|prism54}} and one of the newer kernel modules ({{ic|p54pci}} or {{ic|p54usb}}) loaded at the same time and they are fighting over ownership of the IRQ. Use the command {{ic|<nowiki>lsmod | grep prism54</nowiki>}} to see if the deprecated module is being loaded. If so, you need to stop {{ic|prism54}} from loading by [[blacklisting]] it (there are several ways to do this which are described elsewhere). Once blacklisted, you may find you have to rename the firmware as {{ic|prism54}} and {{ic|p54pci}}/{{ic|p54usb}} look for different firmware filenames (i.e. recheck the {{ic|dmesg}} output after performing {{ic|ip link set eth0 up}}).
 
  
====ACX100/111====
+
Another cause for frequent disconnects or a complete failure to connect may also be a sub-standard router, incomplete settings of the router, or interference by other wireless devices.
Packages: {{ic|tiacx}} {{ic|tiacx-firmware}}
 
  
The driver should tell you which firmware it needs; check {{ic|/var/log/messages.log}} or use the {{ic|dmesg}} command.
+
To troubleshoot, first best try to connect to the router with no authentication.  
  
Link the appropriate firmware to {{ic|/usr/lib/firmware}}:
+
If that works, enable WPA/WPA2 again but choose fixed and/or limited router settings. For example:
ln -s /usr/share/tiacx/acx111_2.3.1.31/tiacx111c16 /usr/lib/firmware
+
* If the router is considerably older than the wireless device you use for the client, test if it works with setting the router to one wireless mode
 +
* Disable mixed-mode authentication (e.g. only WPA2 with AES, or TKIP if the router is old)
 +
* Try a fixed/free channel rather than "auto" channel (maybe the router next door is old and interfering)
 +
* Disable WPS
 +
* Disable {{ic|40Mhz}} channel bandwidth (lower throughput but less likely collisions)
 +
* If the router has quality of service settings, check completeness of settings (e.g. Wi-Fi Multimedia (WMM) is part of optional QoS flow control. An erroneous router firmware may advertise its existence although the setting is not enabled)
  
For another way to determine which firmware revision number to use, see the [http://acx100.sourceforge.net/wiki/Firmware "Which firmware" section] of the acx100.sourceforge wiki. For ACX100, you can follow the links provided there to a table of card model numbers vs. "firmware files known to work"; you can figure out the rev. number you need, by looking at the suffix there. For example, a dlink_dwl650+ uses "1.9.8.b", in which case you would do this:
+
== Troubleshooting drivers and firmware ==
ln -s /usr/share/tiacx/acx100_1.9.8.b/* /usr/lib/firmware
 
  
If you find that the driver is spamming your kernel log, for example because you are running Kismet with channel-hopping, you could put this in {{ic|/etc/modprobe.d/modprobe.conf}}:
+
This section covers methods and procedures for installing kernel modules and ''firmware'' for specific chipsets, that differ from generic method.
options acx debug=0
 
  
{{Note|The open-source {{ic|acx}} driver does not support WPA/RSN encryption. Ndiswrapper will have to be used with the Windows driver to enable the enhanced encryption. See ndiswrapper, this page, for more details.}}
+
See [[Kernel modules]] for general informations on operations with modules.
  
==== b43, broadcom-wl and brcmsmac (previously brcm80211)====
+
=== Ralink/Mediatek ===
See the [[Broadcom_wireless|Broadcom wireless]] page.
 
  
====zd1211rw====
+
==== rt2x00 ====
[http://zd1211.wiki.sourceforge.net/ {{ic|zd1211rw}}] is a driver for the ZyDAS ZD1211 802.11b/g USB WLAN chipset, and it is included in recent versions of the Linux kernel. See [http://www.linuxwireless.org/en/users/Drivers/zd1211rw/devices] for a list of supported devices. You only need to [[pacman|install]] the firmware for the device, provided by the {{Pkg|zd1211-firmware}} package.
 
  
====carl9170====
+
Unified driver for Ralink chipsets (it replaces {{ic|rt2500}}, {{ic|rt61}}, {{ic|rt73}}, etc). This driver has been in the Linux kernel since 2.6.24, you only need to load the right module for the chip: {{ic|rt2400pci}}, {{ic|rt2500pci}}, {{ic|rt2500usb}}, {{ic|rt61pci}} or {{ic|rt73usb}} which will autoload the respective {{ic|rt2x00}} modules too.
[http://wireless.kernel.org/en/users/Drivers/carl9170/ {{ic|carl9170}}] is the 802.11n USB driver with GPLv2 firmware for Atheros USB AR9170 devices. It supports these [http://wireless.kernel.org/en/users/Drivers/carl9170#available_devices devices]. The '''firmware''' is not yet part of the {{Pkg|linux-firmware}} package; it is available in the [[AUR]] ({{AUR|carl9170-fw}}). The '''driver''' is a part of the Linux kernel v2.6.37 and higher.
 
  
In order to use this driver, the following older driver modules must be [[Kernel_modules#Blacklisting|blacklisted]]:
+
A list of devices supported by the modules is available at the project's [http://rt2x00.serialmonkey.com/wiki/index.php/Hardware homepage]{{Dead link|2016|08|02}}.
*{{ic|arusb_lnx}}
 
*{{ic|ar9170usb}}
 
  
====hostap_cs====
+
; Additional notes
Host AP is the Linux driver for Prism2/2.5/3 like WCP11. {{ic|hostap_cs}} should be a part of the {{ic|linux}} package and should be installed already.
+
* Since kernel 3.0, rt2x00 includes also these drivers: {{ic|rt2800pci}}, {{ic|rt2800usb}}.
 +
* Since kernel 3.0, the staging drivers {{ic|rt2860sta}} and {{ic|rt2870sta}} are replaced by the mainline drivers {{ic|rt2800pci}} and {{ic|rt2800usb}}<sup>[https://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=fefecc6989b4b24276797270c0e229c07be02ad3]</sup>.
 +
* Some devices have a wide range of options that can be configured with {{ic|iwpriv}}. These are documented in the [http://web.ralinktech.com/ralink/Home/Support/Linux.html source tarballs] available from Ralink.
  
{{ic|orinico_cs}} can cause problems, so it must be [[Kernel_modules#Blacklisting|blacklisted]]. After blacklisting, the driver should work.
+
==== rt3090 ====
  
More information:[http://hostap.epitest.fi/ Home page]
+
For devices which are using the rt3090 chipset it should be possible to use {{ic|rt2800pci}} driver, however, is not working with this chipset very well (e.g. sometimes it is not possible to use higher rate than 2Mb/s).
  
====compat-drivers-patched====
+
==== rt3290 ====
Patched compat wireless drivers correct the "fixed-channel -1" issue, whilst providing better injection. Please install the {{AUR|compat-drivers-patched}} package from the [[Arch User Repository|AUR]].
 
  
{{AUR|compat-drivers-patched}} does not conflict with any other package and the modules built reside in {{ic|/usr/lib/modules/''your_kernel_version''/updates}}.
+
The rt3290 chipset is recognised by the kernel {{ic|rt2800pci}} module. However, some users experience problems and reverting to a patched Ralink driver seems to be beneficial in these [https://bbs.archlinux.org/viewtopic.php?id=161952 cases].
  
These patched drivers come from the [http://wireless.kernel.org/ Linux Wireless project] and support many of the above mentioned chips such as:
+
==== rt3573 ====
  
ath5k ath9k_htc carl9170 b43 zd1211rw rt2x00 wl1251 wl12xx ath6kl brcm80211
+
New chipset as of 2012. It may require proprietary drivers from Ralink. Different manufacturers use it, see the [https://bbs.archlinux.org/viewtopic.php?pid=1164228#p1164228 Belkin N750 DB wireless usb adapter] forums thread.
  
Supported groups:
+
==== rt5572 ====
  
atheros ath iwlagn rtl818x rtlwifi wl12xx atlxx bt
+
New chipset as of 2012 with support for 5 Ghz bands. It may require proprietary drivers from Ralink and some effort to compile them. At the time of writing a how-to on compilation is available for a DLINK DWA-160 rev. B2 [http://bernaerts.dyndns.org/linux/229-ubuntu-precise-dlink-dwa160-revb2 here].
  
It is also possible to build a specific module/driver or a group of drivers by editing the [[PKGBUILD]], particularly uncommenting the '''line #46'''. Here is an example of building the atheros group:
+
==== mt7612u ====
  
scripts/driver-select atheros
+
New chipset as of 2014, released under their new commercial name Mediatek. It is an AC1200 or AC1300 chipset. Manufacturer provides drivers for Linux on their [https://www.mediatek.com/products/broadbandWifi/mt7612u support page]
  
Please read the package's [[PKGBUILD]] for any other possible modifications prior to compilation and installation.
+
=== Realtek ===
  
===Test installation===
+
See [https://wikidevi.com/wiki/Realtek] for a list of Realtek chipsets and specifications.
After loading your driver, run {{ic|ip link}} to ensure a wireless interface (e.g. ''wlanX'', ''ethX'', ''athX'') is created.
 
  
If no such interface is visible, modprobing it might work. To start your driver, use the {{ic|rmmod}} and {{ic|modprobe}} commands. If {{ic|rmmod}} fails, continue with {{ic|modprobe}}. See [[Kernel modules]] for more info.
+
==== rtl8192cu ====
  
Example: If your driver is called "driverXXX", you would run the following commands:
+
The driver is now in the kernel, but many users have reported being unable to make a connection although scanning for networks does work.
# rmmod driverXXX
 
# modprobe driverXXX
 
  
Bring the interface up with {{ic|ip link set <interface> up}}. For example, assuming the interface is ''wlan0'':
+
{{AUR|8192cu-dkms}} includes many patches, try this if it does not work fine with the driver in kernel.
# ip link set wlan0 up
 
  
If you get this error message: {{ic|SIOCSIFFLAGS: No such file or directory}}, it most certainly means your wireless chipset requires a firmware to function, which you need to install as explained above.
+
==== rtl8723ae/rtl8723be ====
  
==Part II: Wireless management==
+
The {{ic|rtl8723ae}} and {{ic|rtl8723be}} modules are included in the mainline Linux kernel.
Assuming that your drivers are installed and working properly, you will need to choose a method for managing your wireless connections. The following subsections will help you decide the best way to do just that.
 
  
Procedure and tools required will depend on several factors:
+
Some users may encounter errors with powersave on this card. This is shown with occasional disconnects that are not recognized by high level network managers ([[netctl]], [[NetworkManager]]). This error can be confirmed by running {{ic|dmesg -w}} or {{ic|journalctl -f}} and looking for output related to powersave and the {{ic|rtl8723ae}}/{{ic|rtl8723be}} module. If you are having this issue, use the {{ic|1=fwlps=0}} kernel option, which should prevent the WiFi card from automatically sleeping and halting connection.
* The desired nature of configuration management; from a completely manual command line setup procedure to a software-managed, automated solution.
 
* The encryption type (or lack thereof) which protects the wireless network.
 
* The need for network profiles, if the computer will frequently change networks (such as a laptop).
 
  
The manual method requires more work from you, but gives you much more control over your configuration.
+
{{hc|/etc/modprobe.d/rtl8723ae.conf|2=
Usually you will have to enter a set of commands which have no persistant effect, i.e. they won't apply after a reboot.
+
options rtl8723ae fwlps=0
Either you enter those commands on every boot which may be quite cumbersome, or you put all these commands in a shell script to automate the process. This script can even be executed automatically at boot time. See [[Arch Boot Process]].
+
}}
 +
or
 +
{{hc|/etc/modprobe.d/rtl8723be.conf|2=
 +
options rtl8723be fwlps=0
 +
}}
  
===Management methods===
+
If you have very poor signal maybe your device has only one antenna connected and auto mode does not work. You can force the antenna with {{ic|1=ant_sel=1}} or {{ic|1=ant_sel=2}} kernel option.
The following table shows the different methods that can be used to activate and manage a wireless network connection, depending on the encryption and management types, and the various tools that are required. Although there may be other possibilities, these are the most frequently used:
+
 
{| border="1"
+
==== rtl88xxau ====
! Management || No encryption/WEP || WPA/WPA2 PSK
+
 
|-
+
Realtek chipsets rtl8811au/rtl8812au/rtl8814au/rtl8821au designed for various USB adapters ranging from AC600 to AC1900.
| Manual || {{pkg|iproute2}} + {{ic|iwconfig}} + {{ic|dhcpcd}}/{{ic|iproute2}} || {{ic|iproute2}} + {{ic|iwconfig}} + [[WPA supplicant|wpa_supplicant]] + {{ic|dhcpcd}}/{{ic|iproute2}}
 
|-
 
| Automatically managed, with network profiles support || colspan="2" align="center" | [[netcfg]], [[Wicd]], [[NetworkManager]], etc.
 
|}
 
  
More choice guide:  
+
Several packages provide the kernel drivers:
  
{| border="1"
+
{| class="wikitable"
! - || netcfg || Wicd || [[NetworkManager]] + {{pkg|network-manager-applet}}
+
! Chipset || Driver version || [[AUR]] package || Notes
 
|-
 
|-
| auto connect at boot || with [[Netcfg#Net-Profiles|net-profiles]] service || yes || yes
+
| rtl8812au || 5.2.9 || {{AUR|rtl8812au-dkms-git}} || Latest driver version for rtl8812au only
 
|-
 
|-
| auto connect if dropped <br>or changed location || with [[Netcfg#Net-Auto-Wireless|net-auto-wireless]] service || yes || yes
+
| rtl8811au, rtl8812au and rtl8821au || 5.1.5 || {{AUR|rtl8821au-dkms-git}} || This driver works for rtl8812au but driver v5.2.9 is recommended
 
|-
 
|-
| support 3G Modem || || || yes
+
| rtl8814au || 4.3.21 || {{AUR|rtl8814au-dkms-git}} || Possibly works for rtl8813au too
|-
 
| GUI (proposes to manage and connect/disconnect<br> profiles from a systray icon. <br>Automatic wireless detection is also available) || with ArchAssistant || yes || yes
 
|-
 
| console tools || with {{ic|wifi-select}} || {{ic|wicd-curses}} (part of {{pkg|wicd}} package) || {{ic|nmcli}}
 
 
|}
 
|}
  
Please note that the Linux wireless extensions and corresponding commands like {{ic|iwconfig}} or {{ic|iwlist}} become deprecated and replaced by {{ic|iw}}, which has to be installed seperately from the core-repository. This is not fully reflected in this wiki yet and both work still. A comparison of common commands is found on [http://linuxwireless.org/en/users/Documentation/iw/replace-iwconfig Linuxwireless].
+
These require [[DKMS]] so make sure you have your proper kernel headers installed.
 +
 
 +
=== Atheros ===
 +
 
 +
The [http://madwifi-project.org/ MadWifi team] currently maintains three different drivers for devices with Atheros chipset:
 +
 
 +
* {{ic|madwifi}} is an old, obsolete driver. Not present in Arch kernel since 2.6.39.1<sup>[https://mailman.archlinux.org/pipermail/arch-dev-public/2011-June/020669.html]</sup>.
 +
* {{ic|ath5k}} is newer driver, which replaces the {{ic|madwifi}} driver. Currently a better choice for some chipsets, but not all chipsets are supported (see below)
 +
* {{ic|ath9k}} is the newest of these three drivers, it is intended for newer Atheros chipsets. All of the chips with 802.11n capabilities are supported.
 +
 
 +
There are some other drivers for some Atheros devices. See [http://wireless.kernel.org/en/users/Drivers/Atheros#PCI_.2F_PCI-E_.2F_AHB_Drivers Linux Wireless documentation] for details.
 +
 
 +
==== ath5k ====
 +
 
 +
External resources:
 +
* http://wireless.kernel.org/en/users/Drivers/ath5k
 +
* http://wiki.debian.org/ath5k
  
Whatever your choice, '''you should really try to connect using the manual method first'''. This will help you understand the different steps that are required and debug them in case a problem arose. Another tip: if possible (e.g. if you manage your Wi-Fi access point), try connecting with no encryption, to check everything works. Then try using encryption, either WEP (simpler to configure -- but crackable in a matter of seconds, so it is hardly more secure than an unencrypted connection), WPA, or WPA2.
+
If you find web pages randomly loading very slow, or if the device is unable to lease an IP address, try to switch from hardware to software encryption by loading the {{ic|ath5k}} module with {{ic|1=nohwcrypt=1}} option. See [[Kernel modules#Setting module options]] for details.
  
When it comes to ease of use, NetworkManager (with GNOME's {{pkg|network-manager-applet}}) and {{ic|wicd}} have good GUI's and can provide a list of available networks to connect, and they prompt for passwords, which is straightforward and highly recommended. WPA Supplicant has also a GUI configuration tool, {{pkg|wpa_supplicant_gui}}.
+
Some laptops may have problems with their wireless LED indicator flickering red and blue. To solve this problem, do:
  
{{Note|GNOME's {{pkg|network-manager-applet}} also works under [[Xfce]] if you install {{AUR|xfce4-xfapplet-plugin}} first. {{AUR|xfce4-xfapplet-plugin}} is in the [[Arch User Repository|AUR]], but it is orphaned and may not work. Additionally, there are applets available for [[KDE]].}}
+
# echo none > /sys/class/leds/ath5k-phy0::tx/trigger
 +
# echo none > /sys/class/leds/ath5k-phy0::rx/trigger
  
===Manual setup===
+
For alternatives, see [https://bugzilla.redhat.com/show_bug.cgi?id=618232 this bug report].
The programs provided by the package {{pkg|wireless_tools}} are the basic set of tools to set up a wireless network. Additionally the {{pkg|iw}} package provides the new tool. Moreover, if you use WPA/WPA2 encryption, you will need the package {{pkg|wpa_supplicant}}. These powerful user-space console tools work extremely well and allow complete, manual control from the shell.
 
  
These examples assume your wireless device is ''wlan0''. Replace ''wlan0'' with the appropriate device name.
+
==== ath9k ====
{{Note|Depending on your hardware and encryption type, some of these steps may not be necessary. Some cards are known to require interface activation and/or access point scanning before being associated to an access point and being given an IP address. Some experimentation may be required. For instance, WPA/WPA2 users may directly try to activate their wireless network from step 3.}}
 
  
====Operating mode====
+
External resources:
''(Optional, may be required)'' At this step you may need to set the proper operating mode of the wireless card. More specifically, if you are going to connect an ad-hoc network, you might need to set the operating mode to ''ad-hoc:''
+
* http://wireless.kernel.org/en/users/Drivers/ath9k
 +
* http://wiki.debian.org/ath9k
  
  # iw wlan0 set type ibss
+
As of Linux 3.15.1, some users have been experiencing a decrease in bandwidth. In some cases this can fixed by editing {{ic|/etc/modprobe.d/ath9k.conf}} and adding the line:
 +
  options ath9k nohwcrypt=1
  
{{Note|Ideally, you should already know which type of network you are going to connect to. If you do not, scan the network as described in step 2 below, then, if necessary, return back to this step and change the mode. Also, please keep in mind that changing the operating mode might require the wireless interface to be ''down'' ({{ic|ip link set wlan0 down}}).}}
+
{{Note|Check with the command lsmod what module(-name) is in use and change it if named otherwise (e.g. ath9k_htc).}}
  
====Interface activation====
+
In the unlikely event that you have stability issues that trouble you, you could try using the {{AUR|backports-patched}} package. An [https://lists.ath9k.org/mailman/listinfo/ath9k-devel ath9k mailing list] exists for support and development related discussions.
''(Also optional, may be required)'' Some cards require that the kernel interface be activated before you can use the {{ic|wireless_tools}}:
+
 
# ip link set wlan0 up
+
===== Power saving =====
 +
 
 +
Although [http://wireless.kernel.org/en/users/Documentation/dynamic-power-save Linux Wireless] says that dynamic power saving is enabled for Atheros ath9k single-chips newer than AR9280, for some devices (e.g. AR9285) {{Pkg|powertop}} might still report that power saving is disabled. In this case enable it manually.
 +
 
 +
On some devices (e.g. AR9285), enabling the power saving might result in the following error:
 +
 
 +
{{hc|# iw dev wlan0 set power_save on|
 +
command failed: Operation not supported (-95)
 +
}}
 +
 
 +
The solution is to set the {{ic|1=ps_enable=1}} option for the {{ic|ath9k}} module:
 +
 
 +
{{hc|/etc/modprobe.d/ath9k.conf|2=
 +
options ath9k ps_enable=1
 +
}}
 +
 
 +
=== Intel ===
 +
 
 +
==== ipw2100 and ipw2200 ====
 +
 
 +
These modules are fully supported in the kernel, but they require additional firmware. Depending on which of the chipsets you have, [[install]] either {{Pkg|ipw2100-fw}} or {{Pkg|ipw2200-fw}}. Then [[Kernel modules#Manual module handling|reload]] the appropriate module.
 +
 
 +
{{Tip|You may use the following [[Kernel modules#Setting module options|module options]]:
 +
* use the {{ic|1=rtap_iface=1}} option to enable the radiotap interface
 +
* use the {{ic|1=led=1}} option to enable a front LED indicating when the wireless is connected or not
 +
}}
 +
 
 +
==== iwlegacy ====
 +
 
 +
[http://wireless.kernel.org/en/users/Drivers/iwlegacy iwlegacy] is the wireless driver for Intel's 3945 and 4965 wireless chips. The firmware is included in the {{Pkg|linux-firmware}} package.
 +
 
 +
[[udev]] should load the driver automatically, otherwise load {{ic|iwl3945}} or {{ic|iwl4965}} manually. See [[Kernel modules]] for details.
 +
 
 +
If you have problems connecting to networks in general or your link quality is very poor, try to disable 802.11n:
 +
 
 +
{{hc|/etc/modprobe.d/iwl4965.conf|2=
 +
options iwl4965 11n_disable=1
 +
}}
 +
 
 +
==== iwlwifi ====
 +
 
 +
[http://wireless.kernel.org/en/users/Drivers/iwlwifi iwlwifi] is the wireless driver for Intel's current wireless chips, such as 5100AGN, 5300AGN, and 5350AGN. See the [http://wireless.kernel.org/en/users/Drivers/iwlwifi#Supported_Devices full list of supported devices]. The firmware is included in the {{Pkg|linux-firmware}} package. The {{Aur|linux-firmware-iwlwifi-git}} may contain some updates sooner.
 +
 
 +
If you have problems connecting to networks in general or your link quality is very poor, try to disable 802.11n, and perhaps also enable software encryption:
 +
 
 +
{{hc|/etc/modprobe.d/iwlwifi.conf|2=
 +
options iwlwifi 11n_disable=1
 +
options iwlwifi swcrypto=1
 +
}}
 +
 
 +
If you have a problem with slow uplink speed in 802.11n mode, for example 20Mbps, try to enable antenna aggregation:
 +
 
 +
{{hc|/etc/modprobe.d/iwlwifi.conf|2=
 +
options iwlwifi 11n_disable=8
 +
}}
 +
 
 +
Do not be confused with the option name, when the value is set to {{ic|8}} it does not disable anything but re-enables transmission antenna aggregation.[http://forums.gentoo.org/viewtopic-t-996692.html?sid=81bdfa435c089360bdfd9368fe0339a9] [https://bugzilla.kernel.org/show_bug.cgi?id=81571]
 +
 
 +
In case this does not work for you, you may try disabling [[Power saving#Network interfaces|power saving]] for your wireless adapter.
  
====Access point discovery====
+
[http://ubuntuforums.org/showthread.php?t=2183486&p=12845473#post12845473 Some] have never gotten this to work. [http://ubuntuforums.org/showthread.php?t=2205733&p=12935783#post12935783 Others] found salvation by disabling N in their router settings after trying everything. This is known to have be the only solution on more than one occasion. The second link there mentions a 5ghz option that might be worth exploring.
See what access points are available:
 
# iw dev wlan0 scan | less
 
or
 
$ iwlist wlan0 scanning | less
 
{{Note|If it displays "''Interface doesn't support scanning''" then you probably forgot to install the firmware. You can also try bringing up the interface first as shown in point 1. In some cases this message is also displayed when not running iw as root.  
 
Also, your wireless network card may be soft-blocked. Try getting {{pkg|rfkill}} and running {{ic|rfkill list all}} to check.}}
 
  
The important points to check:
+
===== Bluetooth coexistence =====
* ESSID: the "name" of the access point.
 
* Quality: in general try something above 40/70.
 
* Encryption key: if it is "on", check if you can see any line regarding
 
** WEP, WPA, or RSN. Note that RSN and WPA2 are different names for the protocol.
 
** Group cipher: value in TKIP, CCMP, both, others.
 
** Pairwise ciphers: value in TKIP, CCMP, both, others. Not necessarily the same value than Group cipher.
 
** Authentication Suites: value in PSK, 802.1x, others. For home router, you'll usually find PSK (''i.e.'' passphrase). In universities, you are more likely to find 802.1x suite which requires login and password. Then you will need to know which key management is in use (e.g. EAP), and what encapsulation it uses (e.g. PEAP). Find more details at [[Wikipedia:List_of_authentication_protocols]] and the sub-articles.
 
  
====Association====
+
If you have difficulty connecting a bluetooth headset and maintaining good downlink speed, try disabling bluetooth coexistence [https://wireless.wiki.kernel.org/en/users/Drivers/iwlwifi#wifibluetooth_coexistence]:
Depending on the encryption, you need to associate your wireless device with the access point to use and pass the encryption key.
 
  
Assuming you want to use the ESSID {{ic|MyEssid}}:
+
{{hc|/etc/modprobe.d/iwlwifi.conf|2=
{{Note|The essid is usually just the name of the network you want to connect to.}}
+
options iwlwifi bt_coex_active=0
* '''No encryption'''
+
}}
# iwconfig wlan0 essid "MyEssid"
 
Or, alternatively, for the new netlink interface
 
# iw wlan0 connect MyEssid
 
* '''WEP'''
 
using a hexadecimal key:
 
# iwconfig wlan0 essid "MyEssid" key 1234567890
 
using an ASCII key:
 
# iwconfig wlan0 essid "MyEssid" key s:asciikey
 
* '''WPA/WPA2'''
 
  
You need to edit the {{ic|/etc/wpa_supplicant.conf}} file as described in [[WPA_Supplicant]] and according to what you got from [[#Access point discovery]]. Then, issue this command:
+
==== Disabling LED blink ====
# wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf
 
  
This is assuming your device uses the {{ic|wext}} driver. If this does not work, you may need to adjust these options.
+
{{Note|This works with the {{ic|iwlegacy}} and {{ic|iwlwifi}} drivers.}}
If connected successfully, continue in a new terminal (or quit {{ic|wpa_supplicant}} with {{Keypress|Ctrl+c}} and add the {{ic|-B}} switch to the above command to run it in the background). [[WPA_Supplicant]] contains more information and troubleshooting.
 
  
Regardless of the method used, you can check if you have associated successfully as follows:
+
The default settings on the module are to have the LED blink on activity. Some people find this extremely annoying. To have the LED on solid when Wi-Fi is active, you can use the [[systemd#Temporary files|systemd-tmpfiles]]:
# iwconfig wlan0
 
Or, alternatively, for the new netlink interface
 
# iw dev wlan0 link
 
  
{{Note|In some setups it may still display "Access Point: Not-Associated", continue on to the next step.}}
+
{{hc|/etc/tmpfiles.d/phy0-led.conf|
 +
w /sys/class/leds/phy0-led/trigger - - - - phy0radio
 +
}}
  
====Getting an IP address====
+
Run {{ic|systemd-tmpfiles --create phy0-led.conf}} for the change to take effect, or reboot.
Finally, provide an IP address to the network interface. Simple examples are:
+
 
# dhcpcd wlan0
+
To see all the possible trigger values for this LED:
for DHCP, or
 
# ip addr add 192.168.0.2/24 dev wlan0
 
# ip route add default via 192.168.0.1
 
for static IP addressing.
 
  
{{Note|If you get a timeout error due to a ''waiting for carrier'' problem, then you might have to set the channel mode to {{ic|auto}} for the specific device.}}
+
  # cat /sys/class/leds/phy0-led/trigger
  # iwconfig wlan0 channel auto
 
Before changing the channel to auto, make sure your wireless interface (in this case, 'wlan0') is '''down'''. After it has successfully changed it, you can again bring the interface up and continue from there.
 
  
{{Note|Although the manual configuration method will help troubleshoot wireless problems, you will have to re-type every command each time you reboot. You can also quickly write a shell script to automate the whole process, which is still a quite convenient way of managing networks while keeping full control over your configuration.}}
+
{{Tip|If you do not have {{ic|/sys/class/leds/phy0-led}}, you may try to use the {{ic|1=led_mode="1"}} [[Kernel modules#Setting module options|module option]]. It should be valid for both {{ic|iwlwifi}} and {{ic|iwlegacy}} drivers.}}
  
====Manual wireless connection at boot using systemd and dhcpcd====
+
=== Broadcom ===
To have [[systemd]] connect to a manually configured wireless network at boot:
 
  
Create {{ic|/etc/conf.d/network}} to store your interface or static IP settings in:
+
See [[Broadcom wireless]].
{{hc|/etc/conf.d/network|<nowiki>
 
interface=wlan0
 
address=192.168.0.10
 
netmask=24
 
broadcast=192.168.0.255
 
gateway=192.168.0.1
 
</nowiki>}}
 
  
Create a systemctl unit e.g: {{ic|/etc/systemd/system/network.service}}. This example uses dhcpcd and [[WPA supplicant]].
+
=== Other drivers/devices ===
{{hc|/etc/systemd/system/network.service|<nowiki>
 
[Unit]
 
Description=Network Connectivity
 
Wants=network.target
 
Before=network.target
 
BindsTo=sys-subsystem-net-devices-${interface}.device
 
After=sys-subsystem-net-devices-${interface}.device
 
     
 
[Service]
 
Type=oneshot
 
RemainAfterExit=yes
 
EnvironmentFile=/etc/conf.d/network
 
ExecStart=/sbin/ip link set dev ${interface} up
 
ExecStart=/usr/sbin/wpa_supplicant -B -i ${interface} -c /etc/wpa_supplicant.conf
 
ExecStart=/sbin/dhcpcd ${interface}
 
       
 
[Install]
 
WantedBy=multi-user.target
 
</nowiki>}}
 
  
Or without {{ic|/etc/conf.d/network}}:
+
==== Tenda w322u ====
{{hc|/etc/systemd/system/network.service|<nowiki>
 
[Unit]
 
Description=Network Connectivity
 
Wants=network.target
 
Before=network.target
 
BindsTo=sys-subsystem-net-devices-wlan0.device
 
After=sys-subsystem-net-devices-wlan0.device
 
     
 
[Service]
 
Type=oneshot
 
RemainAfterExit=yes
 
ExecStart=/sbin/ip link set dev wlan0 up
 
ExecStart=/usr/sbin/wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf
 
ExecStart=/sbin/dhcpcd wlan0
 
       
 
[Install]
 
WantedBy=multi-user.target
 
</nowiki>}}
 
  
Do not forget to enable it!
+
Treat this Tenda card as an {{ic|rt2870sta}} device. See [[#rt2x00]].
# systemctl enable network
 
  
To test, reboot or make sure all other network daemons are stopped and then issue as superuser
+
==== orinoco ====
# systemctl start network
 
  
====Systemd with wpa_supplicant and static IP====
+
This should be a part of the kernel package and be installed already.
This example configuration uses the new systemd-197 interface naming scheme.
 
  
See http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames
+
Some Orinoco chipsets are Hermes II. You can use the {{ic|wlags49_h2_cs}} driver instead of {{ic|orinoco_cs}} and gain WPA support. To use the driver, [[blacklist]] {{ic|orinoco_cs}} first.
  
https://mailman.archlinux.org/pipermail/arch-dev-public/2013-January/024231.html
+
==== prism54 ====
  
Run this script as non-root to find your interface names:
+
The driver {{ic|p54}} is included in kernel, but you have to download the appropriate firmware for your card from [http://linuxwireless.org/en/users/Drivers/p54#firmware this site] and install it into the {{ic|/usr/lib/firmware}} directory.
  
for i in /sys/class/net/*; do
+
{{Note|There is also older, deprecated driver {{ic|prism54}}, which might conflict with the newer driver ({{ic|p54pci}} or {{ic|p54usb}}). Make sure to [[blacklist]] {{ic|prism54}}.}}
  echo "==$i"
 
  udevadm test-builtin net_id "$i";
 
  echo
 
done 2>/dev/null
 
  
Create {{ic|/etc/conf.d/network}}
+
==== ACX100/111 ====
{{hc|/etc/conf.d/network|<nowiki>
 
interface=wlp0s26f7u3
 
address=192.168.0.10
 
netmask=24
 
broadcast=192.168.0.255
 
gateway=192.168.0.1
 
</nowiki>}}
 
  
Install {{ic|wpa_supplicant}} and create {{ic|/etc/wpa_supplicant.conf}}. See [[WPA supplicant]]
+
{{Warning|The drivers for these devices [https://mailman.archlinux.org/pipermail/arch-dev-public/2011-June/020669.html are broken] and do not work with newer kernel versions.}}
{{hc|/etc/wpa_supplicant.conf|<nowiki>
 
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=network
 
update_config=1
 
network={
 
        ssid="My-Wireless"
 
        psk=b705a6bfcd5639d5c40cd972cd4048cfb94572987f30d324c82036317b91a138
 
}
 
</nowiki>}}
 
  
Create a systemd unit file containing the name of the interface: {{ic|/etc/systemd/system/network@wlp0s26f7u3.service}}
+
Packages: {{ic|tiacx}} {{ic|tiacx-firmware}} (deleted from official repositories and AUR)
{{hc|/etc/systemd/system/network@wlp0s26f7u3.service|<nowiki>
 
[Unit]
 
Description=Network Connectivity (%i)
 
Wants=network.target
 
Before=network.target
 
BindsTo=sys-subsystem-net-devices-%i.device
 
After=sys-subsystem-net-devices-%i.device
 
  
[Service]
+
See [http://sourceforge.net/apps/mediawiki/acx100/index.php?title=Main_Page official wiki] for details.
Type=oneshot
 
RemainAfterExit=yes
 
EnvironmentFile=/etc/conf.d/network
 
ExecStart=/usr/sbin/ip link set dev ${interface} up
 
ExecStart=/usr/sbin/wpa_supplicant -B -i ${interface} -c /etc/wpa_supplicant.conf
 
ExecStart=/usr/sbin/ip addr add ${address}/${netmask} broadcast ${broadcast} dev ${interface}
 
ExecStart=/usr/sbin/ip route add default via ${gateway}
 
ExecStop=/usr/sbin/ip addr flush dev ${interface}
 
ExecStop=/usr/sbin/ip link set dev ${interface} down
 
  
[Install]
+
==== zd1211rw ====
WantedBy=multi-user.target
 
</nowiki>}}
 
  
Enable the unit and start it.
+
[http://zd1211.wiki.sourceforge.net/ {{ic|zd1211rw}}] is a driver for the ZyDAS ZD1211 802.11b/g USB WLAN chipset, and it is included in recent versions of the Linux kernel. See [http://www.linuxwireless.org/en/users/Drivers/zd1211rw/devices] for a list of supported devices. You only need to [[install]] the firmware for the device, provided by the {{Pkg|zd1211-firmware}} package.
# systemctl enable network@wlp0s26f7u3.service
 
# systemctl start network@wlp0s26f7u3.service
 
  
===Automatic setup===
+
==== hostap_cs ====
There are many solutions to choose from, but remember that all of them are mutually exclusive; you should not run two daemons simultaneously.
 
  
====Netcfg====
+
[http://hostap.epitest.fi/ Host AP] is a Linux driver for wireless LAN cards based on Intersil's Prism2/2.5/3 chipset. The driver is included in Linux kernel.
{{ic|netcfg}} provides a ''versatile, robust and fast'' solution to networking on Arch Linux.
 
  
netcfg uses a profile based setup and is capable of detection and connection to a wide range of network types. This is no harder than using graphical tools.
+
{{Note|Make sure to [[blacklist]] the {{ic|orinico_cs}} driver, it may cause problems.}}
  
See: [[Netcfg]]
+
=== ndiswrapper ===
  
====Wicd====
+
Ndiswrapper is a wrapper script that allows you to use some Windows drivers in Linux. You will need the {{ic|.inf}} and {{ic|.sys}} files from your Windows driver.  
Wicd is a network manager that can handle both wireless and wired connections. It is written in Python and Gtk with fewer dependencies than NetworkManager, making it an ideal solution for lightweight desktop users. Wicd is available in the [[Official Repositories|official repositories]].
+
{{Warning|Be sure to use drivers appropriate to your architecture (x86 vs. x86_64).}}
  
See: [[Wicd]]
+
{{Tip|If you need to extract these files from an {{ic|*.exe}} file, you can use {{Pkg|cabextract}}.}}
  
====NetworkManager====
+
Follow these steps to configure ndiswrapper.
NetworkManager is an advanced network management tool that is enabled by default in most popular GNU/Linux distributions. In addition to managing wired connections, NetworkManager provides worry-free wireless roaming with an easy-to-use GUI program for selecting your desired network.
 
  
If you do not use [[GNOME]] but use a window manager like [[Openbox]] or [[xmonad]], do not forget to [[pacman|install]] {{Pkg|polkit-gnome}}, {{Pkg|gnome-keyring}}, {{Pkg|libgnome-keyring}}, and {{Pkg|pyxdg}} to manage WEP, WPA, and WPA2 connections.
+
1. Install {{pkg|ndiswrapper-dkms}}
  
See: [[NetworkManager]]
+
2. Install the driver to {{ic|/etc/ndiswrapper/*}}
 +
# ndiswrapper -i filename.inf
  
====WiFi Radar====
+
3. List all installed drivers for ndiswrapper
WiFi Radar is a Python/PyGTK2 utility for managing wireless profiles (and ''only'' wireless). It enables you to scan for available networks and create profiles for your preferred networks.
+
$ ndiswrapper -l
  
See: [[Wifi Radar]]
+
4. Let ndiswrapper write its configuration in {{ic|/etc/modprobe.d/ndiswrapper.conf}}:
 +
# ndiswrapper -m
 +
# depmod -a
  
====wlassistant====
+
Now the ndiswrapper install is almost finished; follow the instructions on [[Kernel modules#Automatic module handling]] to automatically load the module at boot.
wlassistant is a very intuitive and straight-forward GUI application for managing your wireless connections.  
 
  
Install the {{AUR|wlassistant}} package from the [[Arch User Repository|AUR]].
+
The important part is making sure that ndiswrapper exists on this line, so just add it alongside the other modules. It would be best to test that ndiswrapper will load now, so:
 +
# modprobe ndiswrapper
 +
# iwconfig
  
wlassistant must be run with root privileges:
+
and ''wlan0'' should now exist. If you have problems, some help is available at:
# wlassistant
+
[http://sourceforge.net/p/ndiswrapper/ndiswrapper/HowTos/ ndiswrapper howto] and [http://sourceforge.net/p/ndiswrapper/ndiswrapper/FAQ/ ndiswrapper FAQ].
  
{{out of date|References {{ic|/etc/rc.conf}} which is deprecated and does not give clear instructions for configuration outside of {{ic|/etc/rc.conf}}.}}
+
=== backports-patched ===
One method of using wlassistant is to configure your wireless card within {{ic|/etc/rc.conf}}, specifying the access point you use most often. On start-up, your card will automatically be configured for this ESSID, but if other wireless networks are needed/available, {{ic|wlassistant}} can then be invoked to access them. Background the {{ic|network}} daemon in {{ic|/etc/rc.conf}}, by prefixing it with a {{ic|@}} to avoid boot-up delays.
 
  
==Power saving==
+
{{AUR|backports-patched}} provide drivers released on newer kernels backported for usage on older kernels. The project started since 2007 and was originally known as compat-wireless, evolved to compat-drivers and was recently renamed simply to backports.
  
See [[Power_saving#Wireless_power_saving]].
+
If you are using old kernel and have wireless issue, drivers in this package may help.
  
==See also==
+
== See also ==
*[[Sharing PPP Connection]]
 
*[[Ad-hoc networking]]
 
  
==External links==
+
* [http://wireless.kernel.org/ The Linux Wireless project]
*[http://www.gnome.org/projects/NetworkManager/ NetworkManager] -- The official website for NetworkManager
+
* [http://aircrack-ng.org/doku.php?id=install_drivers Aircrack-ng guide on installing drivers]
*[http://wicd.sourceforge.net/ WICD] -- The official website for WICD
 
*[http://wifi-radar.berlios.de/ WiFi Radar] -- WiFi Radar information page
 
*[http://madwifi-project.org/wiki/UserDocs/FirstTimeHowTo The MadWifi project's method of installing] -- Recommended if you are having trouble after reading this article
 

Latest revision as of 20:30, 18 September 2017

Configuring wireless is a two-part process; the first part is to identify and ensure the correct driver for your wireless device is installed (they are available on the installation media, but often have to be installed explicitly), and to configure the interface. The second is choosing a method of managing wireless connections. This article covers both parts, and provides additional links to wireless management tools.

Contents

Device driver

The default Arch Linux kernel is modular, meaning many of the drivers for machine hardware reside on the hard drive and are available as modules. At boot, udev takes an inventory of your hardware and loads appropriate modules (drivers) for your corresponding hardware, which will in turn allow creation of a network interface.

Some wireless chipsets also require firmware, in addition to a corresponding driver. Many firmware images are provided by the linux-firmware package which is installed by default, however, proprietary firmware images are not included and have to be installed separately. This is described in #Installing driver/firmware.

Note: Udev is not perfect. If the proper module is not loaded by udev on boot, simply load it manually. Note also that udev may occasionally load more than one driver for a device, and the resulting conflict will prevent successful configuration. Make sure to blacklist the unwanted module.
Tip: Though not strictly required, it's a good idea to first install user-space tools mentioned in #Manual setup, especially when some problem should appear.

Check the driver status

To check if the driver for your card has been loaded, check the output of the lspci -k or lsusb -v command, depending on if the card is connected by PCI(e) or USB. You should see that some kernel driver is in use, for example:

$ lspci -k
06:00.0 Network controller: Intel Corporation WiFi Link 5100
	Subsystem: Intel Corporation WiFi Link 5100 AGN
	Kernel driver in use: iwlwifi
	Kernel modules: iwlwifi
Note: If the card is a USB device, running dmesg | grep usbcore should give something like usbcore: registered new interface driver rtl8187 as output.

Also check the output of ip link command to see if a wireless interface (usually it starts with the letter "w", e.g. wlp2s1) was created. Then bring the interface up with ip link set interface up. For example, assuming the interface is wlan0:

# ip link set wlan0 up

If you get this error message: SIOCSIFFLAGS: No such file or directory, it most certainly means that your wireless chipset requires a firmware to function.

Check kernel messages for firmware being loaded:

$ dmesg | grep firmware
[   7.148259] iwlwifi 0000:02:00.0: loaded firmware version 39.30.4.1 build 35138 op_mode iwldvm

If there is no relevant output, check the messages for the full output for the module you identified earlier (iwlwifi in this example) to identify the relevant message or further issues:

$ dmesg | grep iwlwifi
[   12.342694] iwlwifi 0000:02:00.0: irq 44 for MSI/MSI-X
[   12.353466] iwlwifi 0000:02:00.0: loaded firmware version 39.31.5.1 build 35138 op_mode iwldvm
[   12.430317] iwlwifi 0000:02:00.0: CONFIG_IWLWIFI_DEBUG disabled
...
[   12.430341] iwlwifi 0000:02:00.0: Detected Intel(R) Corporation WiFi Link 5100 AGN, REV=0x6B

If the kernel module is successfully loaded and the interface is up, you can skip the next section.

Installing driver/firmware

Check the following lists to discover if your card is supported:

Note that some vendors ship products that may contain different chip sets, even if the product identifier is the same. Only the usb-id (for USB devices) or pci-id (for PCI devices) is authoritative.

If your wireless card is listed above, follow the #Troubleshooting drivers and firmware subsection of this page, which contains information about installing drivers and firmware of some specific wireless cards. Then check the driver status again.

If your wireless card is not listed above, it is likely supported only under Windows (some Broadcom, 3com, etc). For these, you can try to use #ndiswrapper.

Wireless management

The #Manual setup uses command-line tools to manually manage your network interface. The #Automatic setup section describes several programs that can be used to automatically manage your wireless interface, some of which include a GUI and all of which include support for network profiles (useful when frequently switching wireless networks, like with laptops).

Manual setup

Just like other network interfaces, the wireless ones are controlled with ip from the iproute2 package.

You will need to install a basic set of tools for managing the wireless connection. Install one of the following:

  • iwiw only supports the nl80211 (netlink) standard. It does not support the older WEXT (Wireless EXTentions) standard. If iw does not see your card, this may be the reason.
https://wireless.kernel.org/en/users/Documentation/iw || iw
  • wireless_toolswireless_tools is deprecated but still widely supported. Use this for modules using the WEXT standard.
http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html || wireless_tools
Tip: For a comparison of commands between iw and wireless_tools, see #iw and wireless_tools comparison.

For WPA/WPA2 encryption, you will also need:

  • WPA supplicant — wpa_supplicant is a cross-platform supplicant with support for WEP, WPA and WPA2 (IEEE 802.11i / RSN (Robust Secure Network)). It is suitable for desktops, laptops and embedded systems and works with both WEXT and nl80211.
http://hostap.epitest.fi/wpa_supplicant/ || wpa_supplicant
Note:
  • Note that most of the commands have to be executed with root permissions. Executed with normal user rights, some of the commands (e.g. iwlist), will exit without error but not produce the correct output either, which can be confusing.
  • Depending on your hardware and encryption type, some of these steps may not be necessary. Some cards are known to require interface activation and/or access point scanning before being associated to an access point and being given an IP address. Some experimentation may be required. For instance, WPA/WPA2 users may try to directly activate their wireless network from step #Connect to an access point.

Examples in this section assume that your wireless device interface is interface and that you are connecting to your_essid wifi access point. Replace both accordingly.

Get the name of the interface

Tip: See official documentation of the iw tool for more examples.

To get the name of your wireless interface do:

$ iw dev

The name of the interface will be output after the word "Interface". For example, it is commonly wlan0.

Get the status of the interface

To check link status, use following command.

$ iw dev interface link

You can get statistic information, such as the amount of tx/rx bytes, signal strength etc., with following command:

$ iw dev interface station dump

Activate the interface

Tip: Usually this step is not required.

Some cards require that the kernel interface be activated before you can use iw or wireless_tools:

# ip link set interface up
Note: If you get errors like RTNETLINK answers: Operation not possible due to RF-kill, make sure that hardware switch is on. See #Rfkill caveat for details.

To verify that the interface is up, inspect the output of the following command:

# ip link show interface
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state DOWN mode DORMANT group default qlen 1000
    link/ether 12:34:56:78:9a:bc brd ff:ff:ff:ff:ff:ff

The UP in <BROADCAST,MULTICAST,UP,LOWER_UP> is what indicates the interface is up, not the later state DOWN.

Discover access points

To see what access points are available:

# iw dev interface scan | less
Note: If it displays Interface does not support scanning, then you probably forgot to install the firmware. In some cases this message is also displayed when not running iw as root.
Tip: Depending on your location, you might need to set the correct regulatory domain in order to see all available networks.

The important points to check:

  • SSID: the name of the network.
  • Signal: is reported in a wireless power ratio in dBm (e.g. from -100 to 0). The closer the negative value gets to zero, the better the signal. Observing the reported power on a good quality link and a bad one should give an idea about the individual range.
  • Security: it is not reported directly, check the line starting with capability. If there is Privacy, for example capability: ESS Privacy ShortSlotTime (0x0411), then the network is protected somehow.
    • If you see an RSN information block, then the network is protected by Robust Security Network protocol, also known as WPA2.
    • If you see an WPA information block, then the network is protected by Wi-Fi Protected Access protocol.
    • In the RSN and WPA blocks you may find the following information:
      • Group cipher: value in TKIP, CCMP, both, others.
      • Pairwise ciphers: value in TKIP, CCMP, both, others. Not necessarily the same value than Group cipher.
      • Authentication suites: value in PSK, 802.1x, others. For home router, you will usually find PSK (i.e. passphrase). In universities, you are more likely to find 802.1x suite which requires login and password. Then you will need to know which key management is in use (e.g. EAP), and what encapsulation it uses (e.g. PEAP). See WPA2 Enterprise and Wikipedia:Authentication protocol for details.
    • If you see neither RSN nor WPA blocks but there is Privacy, then WEP is used.

Set operating mode

You might need to set the proper operating mode of the wireless card. More specifically, if you are going to connect an ad-hoc network, you need to set the operating mode to ibss:

# iw dev interface set type ibss
Note: Changing the operating mode on some cards might require the wireless interface to be down (ip link set interface down).

Connect to an access point

Depending on the encryption, you need to associate your wireless device with the access point to use and pass the encryption key:

  • No encryption
    # iw dev interface connect "your_essid"
  • WEP
    • using a hexadecimal or ASCII key (the format is distinguished automatically, because a WEP key has a fixed length):
      # iw dev interface connect "your_essid" key 0:your_key
    • using a hexadecimal or ASCII key, specifying the third set up key as default (keys are counted from zero, four are possible):
      # iw dev interface connect "your_essid" key d:2:your_key
  • WPA/WPA2 According to what you got from #Discover access points, issue this command:
    # wpa_supplicant -i interface -c <(wpa_passphrase "your_SSID" "your_key")

If this does not work, you may need to adjust the options. If connected successfully, continue in a new terminal (or quit wpa_supplicant with Ctrl+c and add the -B switch to the above command to run it in the background). WPA supplicant contains more information on options and on how to create a permanent configuration file for the wireless access point.

Regardless of the method used, you can check if you have associated successfully:

# iw dev interface link

Get an IP address

Follow the instructions in Network configuration#Manual assignment for more information on the following examples.

Example

Here is a complete example of setting up a wireless network with WPA supplicant and DHCP.

# ip link set dev wlan0 up
# wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
# dhcpcd wlan0

And then to close the connection, you can simply disable the interface:

# ip link set dev wlan0 down

For a static IP, you would replace the dhcpcd invocation with

# ip addr add 192.168.0.10/24 broadcast 192.168.0.255 dev wlan0
# ip route add default via 192.168.0.1

And before disabling the interface you would first flush the IP address and gateway:

# ip addr flush dev wlan0
# ip route flush dev wlan0

Automatic setup

There are many solutions to choose from, but remember that all of them are mutually exclusive; you should not run two daemons simultaneously. The following table compares the different connection managers, additional notes are in subsections below.

Connection manager Network
profiles
support
Roaming
(auto connect dropped
or changed location)
PPP support
(e.g. 3G modem)
Archiso [1] Official
GUI
Console tools Systemd units
ConnMan Yes Yes Yes No No connmanctl connman.service
netctl Yes Yes Yes Yes (base) No netctl,wifi-menu netctl-auto@interface.service
NetworkManager Yes Yes Yes No Yes nmcli,nmtui NetworkManager.service
Wicd Yes Yes No No Yes wicd-curses wicd.service
Wifi Radar Yes Yes No No Yes wifi-radar

See also List of applications/Internet#Network managers.

WPA2 Enterprise

WPA2 Enterprise is a mode of Wi-Fi Protected Access. It provides better security and key management than WPA2 Personal, and supports other enterprise-type functionality, such as VLANs and NAP. However, it requires an external authentication server, called RADIUS server to handle the authentication of users. This is in contrast to Personal mode which does not require anything beyond the wireless router or access points (APs), and uses a single passphrase or password for all users.

The Enterprise mode enables users to log onto the Wi-Fi network with a username and password and/or a digital certificate. Since each user has a dynamic and unique encryption key, it also helps to prevent user-to-user snooping on the wireless network, and improves encryption strength.

This section describes the configuration of network clients to connect to a wireless access point with WPA2 Enterprise mode. See Software access point#RADIUS for information on setting up an access point itself.

Note: Enterprise mode requires a more complex client configuration, whereas Personal mode only requires entering a passphrase when prompted. Clients likely need to install the server’s CA certificate (plus per-user certificates if using EAP-TLS), and then manually configure the wireless security and 802.1X authentication settings.

For a comparison of protocols see the following table.

Warning: It is possible to use WPA2 Enterprise without the client checking the server CA certificate. However, you should always seek to do so, because without authenticating the access point the connection can be subject to a man-in-the-middle attack. This may happen because while the connection handshake itself may be encrypted, the most widely used setups transmit the password itself either in plain text or the easily breakable #MS-CHAPv2. Hence, the client might send the password to a malicious access point which then proxies the connection.

eduroam

eduroam is an international roaming service for users in research, higher education and further education, based on WPA2 Enterprise.

Note:
  • Check connection details first with your institution before applying any profiles listed in this section. Example profiles are not guaranteed to work or match any security requirements.
  • When storing connection profiles unencrypted, it is recommended restrict read access to the root account by specifying chmod 600 profile as root.
Tip: Configuration for NetworkManager and #wpa_supplicant can be generated with the eduroam Configuration Assistant Tool.

Manual/automatic setup

wpa_supplicant

WPA supplicant can be configured directly and used in combination with a DHCP client or with systemd. See the examples in /usr/share/doc/wpa_supplicant/wpa_supplicant.conf for configuring the connection details.

NetworkManager

NetworkManager can generate WPA2 Enterprise profiles with graphical front ends. nmcli and nmtui do not support this, but may use existing profiles.

connman

ConnMan needs a separate configuration file before connecting to the network. See connman-service.config(5) and Connman#Connecting to eduroam for details.

netctl

netctl supports #wpa_supplicant configuration through blocks included with WPAConfigSection=. See netctl.profile(5) for details.

Warning: Special quoting rules apply: see the SPECIAL QUOTING RULES section in netctl.profile(5).
Tip: Custom certificates can be specified by adding the line 'ca_cert="/path/to/special/certificate.cer"' in WPAConfigSection.

Troubleshooting

MS-CHAPv2

WPA2-Enterprise wireless networks demanding MSCHAPv2 type-2 authentication with PEAP sometimes require pptpclient in addition to the stock ppp package. netctl seems to work out of the box without ppp-mppe, however. In either case, usage of MSCHAPv2 is discouraged as it is highly vulnerable, although using another method is usually not an option. See also [2] and [3].

Tips and tricks

Respecting the regulatory domain

The regulatory domain, or "regdomain", is used to reconfigure wireless drivers to make sure that wireless hardware usage complies with local laws set by the FCC, ETSI and other organizations. Regdomains use ISO 3166-1 alpha-2 country codes. For example, the regdomain of the United States would be "US", China would be "CN", etc.

Regdomains affect the availability of wireless channels. In the 2.4GHz band, the allowed channels are 1-11 for the US, 1-14 for Japan, and 1-13 for most of the rest of the world. In the 5GHz band, the rules for allowed channels are much more complex. In either case, consult this list of WLAN channels for more detailed information.

Regdomains also affect the limit on the effective isotropic radiated power (EIRP) from wireless devices. This is derived from transmit power/"tx power", and is measured in dBm/mBm (1dBm=100mBm) or mW (log scale). In the 2.4GHz band, the maximum is 30dBm in the US and Canada, 20dBm in most of Europe, and 20dB-30dBm for the rest of the world. In the 5GHz band, maximums are usually lower. Consult the wireless-regdb for more detailed information (EIRP dBm values are in the second set of brackets for each line).

Misconfiguring the regdomain can be useful - for example, by allowing use of an unused channel when other channels are crowded, or by allowing an increase in tx power to widen transmitter range. However, this is not recommended as it could break local laws and cause interference with other radio devices.

To configure the regdomain, install crda and reboot (to reload the cfg80211 module and all related drivers). Check the boot log to make sure that CRDA is being called by cfg80211:

$ dmesg | grep cfg80211

The current regdomain can be set to the United States with:

# iw reg set US

And queried with:

$ iw reg get
Note: Your device may be set to country "00", which is the "world regulatory domain" and contains generic settings. If this cannot be unset, CRDA may be misconfigured.

However, setting the regdomain may not alter your settings. Some devices have a regdomain set in firmware/EEPROM, which dictates the limits of the device, meaning that setting regdomain in software can only increase restrictions, not decrease them. For example, a CN device could be set in software to the US regdomain, but because CN has an EIRP maximum of 20dBm, the device will not be able to transmit at the US maximum of 30dBm.

For example, to see if the regdomain is being set in firmware for an Atheros device:

$ dmesg | grep ath:

For other chipsets, it may help to search for "EEPROM", "regdomain", or simply the name of the device driver.

To see if your regdomain change has been successful, and to query the number of available channels and their allowed transmit power:

$ iw list | grep -A 15 Frequencies:

A more permanent configuration of the regdomain can be achieved through editing /etc/conf.d/wireless-regdom and uncommenting the appropriate domain. wpa_supplicant can also use a regdomain in the country= line of /etc/wpa_supplicant/wpa_supplicant.conf.

It is also possible to configure the cfg80211 kernel module to use a specific regdomain by adding, for example, options cfg80211 ieee80211_regdom=EU as module options. However, this is part of the old regulatory implementation.

For further information, read the wireless.kernel.org regulatory documentation.

iw and wireless_tools comparison

The table below gives an overview of comparable commands for iw and wireless_tools. See iw replaces iwconfig for more examples.

iw command wireless_tools command Description
iw dev wlan0 link iwconfig wlan0 Getting link status.
iw dev wlan0 scan iwlist wlan0 scan Scanning for available access points.
iw dev wlan0 set type ibss iwconfig wlan0 mode ad-hoc Setting the operation mode to ad-hoc.
iw dev wlan0 connect your_essid iwconfig wlan0 essid your_essid Connecting to open network.
iw dev wlan0 connect your_essid 2432 iwconfig wlan0 essid your_essid freq 2432M Connecting to open network specifying channel.
iw dev wlan0 connect your_essid key 0:your_key iwconfig wlan0 essid your_essid key your_key Connecting to WEP encrypted network using hexadecimal key.
iwconfig wlan0 essid your_essid key s:your_key Connecting to WEP encrypted network using ASCII key.
iw dev wlan0 set power_save on iwconfig wlan0 power on Enabling power save.

Troubleshooting

This section contains general troubleshooting tips, not strictly related to problems with drivers or firmware. For such topics, see next section #Troubleshooting drivers and firmware.

Temporary internet access

If you have problematic hardware and need internet access to, for example, download some software or get help in forums, you can make use of Android's built-in feature for internet sharing via USB cable. See Android tethering#USB tethering for more information.

Rfkill caveat

Many laptops have a hardware button (or switch) to turn off wireless card, however, the card can also be blocked by kernel. This can be handled by rfkill. Use rfkill to show the current status:

# rfkill list
0: phy0: Wireless LAN
	Soft blocked: yes
	Hard blocked: yes

If the card is hard-blocked, use the hardware button (switch) to unblock it. If the card is not hard-blocked but soft-blocked, use the following command:

# rfkill unblock wifi
Note: It is possible that the card will go from hard-blocked and soft-unblocked state into hard-unblocked and soft-blocked state by pressing the hardware button (i.e. the soft-blocked bit is just switched no matter what). This can be adjusted by tuning some options of the rfkill kernel module.

Hardware buttons to toggle wireless cards are handled by a vendor specific kernel module, frequently these are WMI modules. Particularly for very new hardware models, it happens that the model is not fully supported in the latest stable kernel yet. In this case it often helps to search the kernel bug tracker for information and report the model to the maintainer of the respective vendor kernel module, if it has not happened already.

See also: http://askubuntu.com/questions/62166/siocsifflags-operation-not-possible-due-to-rf-kill

Observing Logs

A good first measure to troubleshoot is to analyze the system's logfiles first. In order not to manually parse through them all, it can help to open a second terminal/console window and watch the kernels messages with

$ dmesg -w

while performing the action, e.g. the wireless association attempt.

When using a tool for network management, the same can be done for systemd with

# journalctl -f 

Frequently a wireless error is accompanied by a deauthentication with a particular reason code, for example:

wlan0: deauthenticating from XX:XX:XX:XX:XX:XX by local choice (reason=3)

Looking up the reason code might give a first hint. Maybe it also helps you to look at the control message flowchart, the journal messages will follow it.

The individual tools used in this article further provide options for more detailed debugging output, which can be used in a second step of the analysis, if required.

Power saving

See Power saving#Network interfaces.

Failed to get IP address

  • If getting an IP address repeatedly fails using the default dhcpcd client, try installing and using dhclient instead. Do not forget to select dhclient as the primary DHCP client in your connection manager!
  • If you can get an IP address for a wired interface and not for a wireless interface, try disabling the wireless card's power saving features (specify off instead of on).
  • If you get a timeout error due to a waiting for carrier problem, then you might have to set the channel mode to auto for the specific device:
# iwconfig wlan0 channel auto

Before changing the channel to auto, make sure your wireless interface is down. After it has successfully changed it, you can bring the interface up again and continue from there.

Valid IP address but cannot resolve host

If you are on a public wireless network that may have a captive portal, make sure to query an HTTP page (not an HTTPS page) from your web browser, as some captive portals only redirect HTTP. If this is not the issue, it may be necessary to remove any custom DNS servers from resolv.conf.

Setting RTS and fragmentation thresholds

Wireless hardware disables RTS and fragmentation by default. These are two different methods of increasing throughput at the expense of bandwidth (i.e. reliability at the expense of speed). These are useful in environments with wireless noise or many adjacent access points, which may create interference leading to timeouts or failing connections.

Packet fragmentation improves throughput by splitting up packets with size exceeding the fragmentation threshold. The maximum value (2346) effectively disables fragmentation since no packet can exceed it. The minimum value (256) maximizes throughput, but may carry a significant bandwidth cost.

# iw phy0 set frag 512

RTS improves throughput by performing a handshake with the access point before transmitting packets with size exceeding the RTS threshold. The maximum threshold (2347) effectively disables RTS since no packet can exceed it. The minimum threshold (0) enables RTS for all packets, which is probably excessive for most situations.

# iw phy0 set rts 500
Note: phy0 is the name of the wireless device as listed by $ iw phy.

Random disconnections

Cause #1

If dmesg says wlan0: deauthenticating from MAC by local choice (reason=3) and you lose your Wi-Fi connection, it is likely that you have a bit too aggressive power-saving on your Wi-Fi card[4]. Try disabling the wireless card's power saving features (specify off instead of on).

If your card does not support enabling/disabling power save mode, check the BIOS for power management options. Disabling PCI-Express power management in the BIOS of a Lenovo W520 resolved this issue.

Cause #2

If you are experiencing frequent disconnections and dmesg shows messages such as

ieee80211 phy0: wlan0: No probe response from AP xx:xx:xx:xx:xx:xx after 500ms, disconnecting

try changing the channel bandwidth to 20MHz through your router's settings page.

Cause #3

On some laptop models with hardware rfkill switches (e.g., Thinkpad X200 series), due to wear or bad design, the switch (or its connection to the mainboard) might become loose over time resulting in seemingly random hardblocks/disconnects when you accidentally touch the switch or move the laptop. There is no software solution to this, unless your switch is electrical and the BIOS offers the option to disable the switch. If your switch is mechanical (most are), there are lots of possible solutions, most of which aim to disable the switch: Soldering the contact point on the mainboard/wifi-card, glueing or blocking the switch, using a screw nut to tighten the switch or removing it altogether.

Cause #4

Another cause for frequent disconnects or a complete failure to connect may also be a sub-standard router, incomplete settings of the router, or interference by other wireless devices.

To troubleshoot, first best try to connect to the router with no authentication.

If that works, enable WPA/WPA2 again but choose fixed and/or limited router settings. For example:

  • If the router is considerably older than the wireless device you use for the client, test if it works with setting the router to one wireless mode
  • Disable mixed-mode authentication (e.g. only WPA2 with AES, or TKIP if the router is old)
  • Try a fixed/free channel rather than "auto" channel (maybe the router next door is old and interfering)
  • Disable WPS
  • Disable 40Mhz channel bandwidth (lower throughput but less likely collisions)
  • If the router has quality of service settings, check completeness of settings (e.g. Wi-Fi Multimedia (WMM) is part of optional QoS flow control. An erroneous router firmware may advertise its existence although the setting is not enabled)

Troubleshooting drivers and firmware

This section covers methods and procedures for installing kernel modules and firmware for specific chipsets, that differ from generic method.

See Kernel modules for general informations on operations with modules.

Ralink/Mediatek

rt2x00

Unified driver for Ralink chipsets (it replaces rt2500, rt61, rt73, etc). This driver has been in the Linux kernel since 2.6.24, you only need to load the right module for the chip: rt2400pci, rt2500pci, rt2500usb, rt61pci or rt73usb which will autoload the respective rt2x00 modules too.

A list of devices supported by the modules is available at the project's homepage[dead link 2016-08-02].

Additional notes
  • Since kernel 3.0, rt2x00 includes also these drivers: rt2800pci, rt2800usb.
  • Since kernel 3.0, the staging drivers rt2860sta and rt2870sta are replaced by the mainline drivers rt2800pci and rt2800usb[5].
  • Some devices have a wide range of options that can be configured with iwpriv. These are documented in the source tarballs available from Ralink.

rt3090

For devices which are using the rt3090 chipset it should be possible to use rt2800pci driver, however, is not working with this chipset very well (e.g. sometimes it is not possible to use higher rate than 2Mb/s).

rt3290

The rt3290 chipset is recognised by the kernel rt2800pci module. However, some users experience problems and reverting to a patched Ralink driver seems to be beneficial in these cases.

rt3573

New chipset as of 2012. It may require proprietary drivers from Ralink. Different manufacturers use it, see the Belkin N750 DB wireless usb adapter forums thread.

rt5572

New chipset as of 2012 with support for 5 Ghz bands. It may require proprietary drivers from Ralink and some effort to compile them. At the time of writing a how-to on compilation is available for a DLINK DWA-160 rev. B2 here.

mt7612u

New chipset as of 2014, released under their new commercial name Mediatek. It is an AC1200 or AC1300 chipset. Manufacturer provides drivers for Linux on their support page

Realtek

See [6] for a list of Realtek chipsets and specifications.

rtl8192cu

The driver is now in the kernel, but many users have reported being unable to make a connection although scanning for networks does work.

8192cu-dkmsAUR includes many patches, try this if it does not work fine with the driver in kernel.

rtl8723ae/rtl8723be

The rtl8723ae and rtl8723be modules are included in the mainline Linux kernel.

Some users may encounter errors with powersave on this card. This is shown with occasional disconnects that are not recognized by high level network managers (netctl, NetworkManager). This error can be confirmed by running dmesg -w or journalctl -f and looking for output related to powersave and the rtl8723ae/rtl8723be module. If you are having this issue, use the fwlps=0 kernel option, which should prevent the WiFi card from automatically sleeping and halting connection.

/etc/modprobe.d/rtl8723ae.conf
options rtl8723ae fwlps=0

or

/etc/modprobe.d/rtl8723be.conf
options rtl8723be fwlps=0

If you have very poor signal maybe your device has only one antenna connected and auto mode does not work. You can force the antenna with ant_sel=1 or ant_sel=2 kernel option.

rtl88xxau

Realtek chipsets rtl8811au/rtl8812au/rtl8814au/rtl8821au designed for various USB adapters ranging from AC600 to AC1900.

Several packages provide the kernel drivers:

Chipset Driver version AUR package Notes
rtl8812au 5.2.9 rtl8812au-dkms-gitAUR Latest driver version for rtl8812au only
rtl8811au, rtl8812au and rtl8821au 5.1.5 rtl8821au-dkms-gitAUR This driver works for rtl8812au but driver v5.2.9 is recommended
rtl8814au 4.3.21 rtl8814au-dkms-gitAUR Possibly works for rtl8813au too

These require DKMS so make sure you have your proper kernel headers installed.

Atheros

The MadWifi team currently maintains three different drivers for devices with Atheros chipset:

  • madwifi is an old, obsolete driver. Not present in Arch kernel since 2.6.39.1[7].
  • ath5k is newer driver, which replaces the madwifi driver. Currently a better choice for some chipsets, but not all chipsets are supported (see below)
  • ath9k is the newest of these three drivers, it is intended for newer Atheros chipsets. All of the chips with 802.11n capabilities are supported.

There are some other drivers for some Atheros devices. See Linux Wireless documentation for details.

ath5k

External resources:

If you find web pages randomly loading very slow, or if the device is unable to lease an IP address, try to switch from hardware to software encryption by loading the ath5k module with nohwcrypt=1 option. See Kernel modules#Setting module options for details.

Some laptops may have problems with their wireless LED indicator flickering red and blue. To solve this problem, do:

# echo none > /sys/class/leds/ath5k-phy0::tx/trigger
# echo none > /sys/class/leds/ath5k-phy0::rx/trigger

For alternatives, see this bug report.

ath9k

External resources:

As of Linux 3.15.1, some users have been experiencing a decrease in bandwidth. In some cases this can fixed by editing /etc/modprobe.d/ath9k.conf and adding the line:

options ath9k nohwcrypt=1
Note: Check with the command lsmod what module(-name) is in use and change it if named otherwise (e.g. ath9k_htc).

In the unlikely event that you have stability issues that trouble you, you could try using the backports-patchedAUR package. An ath9k mailing list exists for support and development related discussions.

Power saving

Although Linux Wireless says that dynamic power saving is enabled for Atheros ath9k single-chips newer than AR9280, for some devices (e.g. AR9285) powertop might still report that power saving is disabled. In this case enable it manually.

On some devices (e.g. AR9285), enabling the power saving might result in the following error:

# iw dev wlan0 set power_save on
command failed: Operation not supported (-95)

The solution is to set the ps_enable=1 option for the ath9k module:

/etc/modprobe.d/ath9k.conf
options ath9k ps_enable=1

Intel

ipw2100 and ipw2200

These modules are fully supported in the kernel, but they require additional firmware. Depending on which of the chipsets you have, install either ipw2100-fw or ipw2200-fw. Then reload the appropriate module.

Tip: You may use the following module options:
  • use the rtap_iface=1 option to enable the radiotap interface
  • use the led=1 option to enable a front LED indicating when the wireless is connected or not

iwlegacy

iwlegacy is the wireless driver for Intel's 3945 and 4965 wireless chips. The firmware is included in the linux-firmware package.

udev should load the driver automatically, otherwise load iwl3945 or iwl4965 manually. See Kernel modules for details.

If you have problems connecting to networks in general or your link quality is very poor, try to disable 802.11n:

/etc/modprobe.d/iwl4965.conf
options iwl4965 11n_disable=1

iwlwifi

iwlwifi is the wireless driver for Intel's current wireless chips, such as 5100AGN, 5300AGN, and 5350AGN. See the full list of supported devices. The firmware is included in the linux-firmware package. The linux-firmware-iwlwifi-gitAUR may contain some updates sooner.

If you have problems connecting to networks in general or your link quality is very poor, try to disable 802.11n, and perhaps also enable software encryption:

/etc/modprobe.d/iwlwifi.conf
options iwlwifi 11n_disable=1
options iwlwifi swcrypto=1

If you have a problem with slow uplink speed in 802.11n mode, for example 20Mbps, try to enable antenna aggregation:

/etc/modprobe.d/iwlwifi.conf
options iwlwifi 11n_disable=8

Do not be confused with the option name, when the value is set to 8 it does not disable anything but re-enables transmission antenna aggregation.[8] [9]

In case this does not work for you, you may try disabling power saving for your wireless adapter.

Some have never gotten this to work. Others found salvation by disabling N in their router settings after trying everything. This is known to have be the only solution on more than one occasion. The second link there mentions a 5ghz option that might be worth exploring.

Bluetooth coexistence

If you have difficulty connecting a bluetooth headset and maintaining good downlink speed, try disabling bluetooth coexistence [10]:

/etc/modprobe.d/iwlwifi.conf
options iwlwifi bt_coex_active=0

Disabling LED blink

Note: This works with the iwlegacy and iwlwifi drivers.

The default settings on the module are to have the LED blink on activity. Some people find this extremely annoying. To have the LED on solid when Wi-Fi is active, you can use the systemd-tmpfiles:

/etc/tmpfiles.d/phy0-led.conf
w /sys/class/leds/phy0-led/trigger - - - - phy0radio

Run systemd-tmpfiles --create phy0-led.conf for the change to take effect, or reboot.

To see all the possible trigger values for this LED:

# cat /sys/class/leds/phy0-led/trigger
Tip: If you do not have /sys/class/leds/phy0-led, you may try to use the led_mode="1" module option. It should be valid for both iwlwifi and iwlegacy drivers.

Broadcom

See Broadcom wireless.

Other drivers/devices

Tenda w322u

Treat this Tenda card as an rt2870sta device. See #rt2x00.

orinoco

This should be a part of the kernel package and be installed already.

Some Orinoco chipsets are Hermes II. You can use the wlags49_h2_cs driver instead of orinoco_cs and gain WPA support. To use the driver, blacklist orinoco_cs first.

prism54

The driver p54 is included in kernel, but you have to download the appropriate firmware for your card from this site and install it into the /usr/lib/firmware directory.

Note: There is also older, deprecated driver prism54, which might conflict with the newer driver (p54pci or p54usb). Make sure to blacklist prism54.

ACX100/111

Warning: The drivers for these devices are broken and do not work with newer kernel versions.

Packages: tiacx tiacx-firmware (deleted from official repositories and AUR)

See official wiki for details.

zd1211rw

zd1211rw is a driver for the ZyDAS ZD1211 802.11b/g USB WLAN chipset, and it is included in recent versions of the Linux kernel. See [11] for a list of supported devices. You only need to install the firmware for the device, provided by the zd1211-firmware package.

hostap_cs

Host AP is a Linux driver for wireless LAN cards based on Intersil's Prism2/2.5/3 chipset. The driver is included in Linux kernel.

Note: Make sure to blacklist the orinico_cs driver, it may cause problems.

ndiswrapper

Ndiswrapper is a wrapper script that allows you to use some Windows drivers in Linux. You will need the .inf and .sys files from your Windows driver.

Warning: Be sure to use drivers appropriate to your architecture (x86 vs. x86_64).
Tip: If you need to extract these files from an *.exe file, you can use cabextract.

Follow these steps to configure ndiswrapper.

1. Install ndiswrapper-dkms

2. Install the driver to /etc/ndiswrapper/*

# ndiswrapper -i filename.inf

3. List all installed drivers for ndiswrapper

$ ndiswrapper -l

4. Let ndiswrapper write its configuration in /etc/modprobe.d/ndiswrapper.conf:

# ndiswrapper -m
# depmod -a

Now the ndiswrapper install is almost finished; follow the instructions on Kernel modules#Automatic module handling to automatically load the module at boot.

The important part is making sure that ndiswrapper exists on this line, so just add it alongside the other modules. It would be best to test that ndiswrapper will load now, so:

# modprobe ndiswrapper
# iwconfig

and wlan0 should now exist. If you have problems, some help is available at: ndiswrapper howto and ndiswrapper FAQ.

backports-patched

backports-patchedAUR provide drivers released on newer kernels backported for usage on older kernels. The project started since 2007 and was originally known as compat-wireless, evolved to compat-drivers and was recently renamed simply to backports.

If you are using old kernel and have wireless issue, drivers in this package may help.

See also