Difference between revisions of "Network configuration/Wireless"

From ArchWiki
Jump to navigation Jump to search
Line 97: Line 97:
The drivers should now load after a reboot, and running 'ifconfig' from a terminal should report '''wlan0''' as a new network interface.
The drivers should now load after a reboot, and running 'ifconfig' from a terminal should report '''wlan0''' as a new network interface.
Note: if the iwlwifi drivers, being "experimental", do not work, know that the windows NETw4x32 driver works with ndiswrapper just fine.
====ipw3945 (Alternate Method)====
====ipw3945 (Alternate Method)====

Revision as of 19:15, 4 September 2007

Template:I18n links start Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n links end

First steps

  1. Check to see if Linux supports your hardware. You can find out what your card is with lshwd.
    • zd1201-based card like ZyXEL B-220
    • wlan-ng supports quite a lot of chipsets; check here first.
    • madwifi for Atheros chipsets (AR5210, AR5211, AR5212 and AR5213)
    • rt2x00 for Ralink's rt2400, rt2500, and rt2570 chipsets.
    • RT73 for Ralink's RT73 USB chipsets
    • ipw2100 for Intel Pro/Wireless 2100 Mini PCI
    • ipw2200 for Intel Pro/Wireless 2200 Mini PCI
    • ipw3945 for Intel Pro/Wireless 3945 AB/G Mini PCI-E
    • orinoco for some Prism 2-based cards
    • prism54 for Prism 54-based cards
    • bcm43xx for Broadcom 43xx-based cards
    • Check the Linux Wireless Support page for your hardware or in The Linux Questions hardware compatibility list (HCL), which also has a good list of Linux-friendly hardware
  2. If the hardware is supported only under Windows
    • ndiswrapper for hardware supported only under Windows (some Broadcom, 3com, etc)
    • You will need the .inf and .sys files from your Windows driver - check here
  3. If your hardware is not listed anywhere
    • I think you may be screwed....
    • Try a web search for the exact model name of your hardware with the word "linux" - and feel free to ask for help on the forums


First off, make sure you grab wireless-tools from pacman

pacman -S wireless_tools

You cannot initialize wireless hardware without these tools.


Here are the details of how to get the drivers for your card. You may find that there are several options open to you, so remember you can check the HCL for help on selecting the best driver.


pacman -S wlan-ng24


pacman -S wlan-ng26


Unified driver for Ralink chipsets (will ultimately replace rt2500,rt61,rt73 etc). Compatible with stable wpa_supplicant using the wext driver interface. This driver is currently in development and is likely to appear in the mainline kernel in the fairly near future.

pacman -S rt2x00-cvs

(from unstable repository)

See the rt2x00 wiki page.


For certain Ralink chipsets.

pacman -S rt2500

Supports standard iwconfig tools for unencrypted and WEP connections, although it can be quite sensitive to the order of commands. wpa_supplicant is not supported using the standard wext interface. The driver does support WPA (using hardware encryption), but in a non-standard way. The trunk version of wpa_supplicant (0.6.x) appears to include special support for this driver, and it is also possible to negotiate a WPA connection manually using iwpriv commands. See these instructions for details. The same applies for RT61 and RT73 below.


See the RT61 wiki page.


See the RT73 wiki page.


pacman -S madwifi

The module is called ath_pci. You may need to use the countrycode option when loading the MadWifi driver in order to use channels and transmit power settings that are legal in your country/region. In the Netherlands, for example, you would load the module like this:

modprobe ath_pci countrycode=528

You can verify the settings with the iwlist command. See man iwlist and the CountryCode page on the MadWifi wiki. To have this setting automatically applied during boot, add the following to /etc/modprobe.conf:

options ath_pci countrycode=528

ATTENTION: I had to remove the countrycode option completely or the ath0 device wasn't created (andyrtr, kernel 2.6.21)!

ipw2100 and ipw2200

Depending on which of the chips you have, use either:

pacman -S ipw2100-fw


pacman -S ipw2200-fw

ipw3945 and ipw4965

Intel's new iwlwifi project drivers will work for both chipsets, simply choose the microcode that corresponds to yours:

pacman -S iwlwifi iwlwifi-3945-ucode


pacman -S iwlwifi iwlwifi-4965-ucode

Add the kernel driver to your startup:

nano /etc/rc.conf

in the modules=() array, add iwl3945 or iwl4965 to the list, depending on your chipset

CTRL + X, Y to close and save.

The drivers should now load after a reboot, and running 'ifconfig' from a terminal should report wlan0 as a new network interface.

Note: if the iwlwifi drivers, being "experimental", do not work, know that the windows NETw4x32 driver works with ndiswrapper just fine.

ipw3945 (Alternate Method)

Note: This ipw3945 driver will be phased out as Intel's iwlwifi project drivers reach maturity.

pacman -S ipw3945

This should install ipw3945-ucode, ipw3945, and ipw3945d (daemon).

To properly initialize the driver on startup...

nano /etc/rc.conf

in the modules=() array, add ipw3945 to the list

in the daemons=() array, add ipw3945d to the list (its order must come BEFORE network and dhcdbd/networkmanager in the array)

CTRL + X, Y to close and save.

The ipw3945 module should load during "Loading Modules.." and "Starting IPW3945d" should appear during daemon initialization, and ethX should be present.

Update: On my HP nc6320 the Bluetooth won't connect unless you unload the ipw3945 module.


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


Ndiswrapper is not a real driver, but you can use it when there are no native Linux drivers for your wireless chips. So it is very useful in some situations. To use it you need the *.inf file from your Windows driver. To install ndiswrapper use the steps below:

To install the ndiswrapper use pacman:

pacman -Sy ndiswrapper ndiswrapper-utils

Note: Beyond kernel needs the packages ndiswrapper-beyond instead of the ndiswrapper package!

Note: If you do not have internet access on the machine running Arch, you can also download the packages to a disk from one of the mirrors, e.g. http://www2.cddc.vt.edu/linux/distributions/archlinux/extra/os/i686/ . You need the ndiswrapper (or ndiswrapper-beyond as it says above) and ndiswrapper-utils packages. You may also have to download the latest kernel26 (or beyond), as the version provided on the CD is not always the latest one.

Once the installation has completed, follow the steps to configure ndiswrapper.

ndiswrapper -i filename.inf
ndiswrapper -l
ndiswrapper -m
depmod -a

Now the ndiswrapper install is almost finished; you just have to update /etc/rc.conf to load the module at boot (below is a sample of my config; yours might look slightly different):

MODULES=(ndiswrapper snd-intel8x0 !usbserial)

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

and wlan0 should exist. Check this page if you're having problems: Ndiswrapper installation wiki.


Download the firmware driver for your appropriate card from this site. Rename the firmware file to 'isl3890'. If nonexistent, create the directory /lib/firmware and place the file 'isl3890' in it. This should do the trick. (forum source)


The ACX100/111 driver can be found at [1]. This can be used for cards based on the Texas Instruments ACX100/111 chipset.

Contrary to what people think, this is relatively easy to setup. There is a huge guide written by Craig here. However, the README that comes with the driver is actually easier to follow.

  1. Download the latest version of the driver.
  2. Extract the archive to a directory of your choice. Beware: The archive does not have a directory inside, so if you don't extract within a directory, a lot of files will spill out everywhere.
  3. Change to the directory containing the extracted files.
  4. Execute
    make -C /lib/modules/`uname -r`/build M=`pwd`
  5. Change to root user.
  6. Execute
    make -C /lib/modules/`uname -r`/build M=`pwd` modules_install
  7. Execute
    depmod -ae
    so the kernel detects the new module.
  8. Insert the driver CD that came with the card into the CD/DVD drive on your computer.
  9. Mount the drive with
    mount <device>
  10. Copy the firmware from the CD to /lib/firmware.
  11. Rename the firmware to 'tiacxNNNcMM' (NNN=100/111, MM=radio module ID (in uppercase hex)) for the PCI driver or tiacxNNNusbcMM for the USB driver.
  12. Load the acx module with
    modprobe acx
  13. Add the acx module to the MODULES array in /etc/rc.conf so it gets loaded on startup.
  14. Follow the instructions for connecting to your network with iwconfig.

Note: It is also possible to compile the driver inside the kernel tree. This is documented in the README file with the driver.


Broadcom users that have 43xx series chipsets have a new alternative to ndiswrapper. In kernel version 2.6.17, the bcm43xx driver was introduced.

  1. Run
    hwd -s
    to determine that you have an appropriate card. My output of hwd -s looked like this:
    Network    : Broadcom Corp.|BCM94306 802.11g NIC module: unknown
  2. Run
    pacman -Sy bcm43xx-fwcutter
    to install the firmware cutter application.
  3. Download the Windows driver file for your card from which to extract the firmware.
    • I initially downloaded the driver from Dell's support site. When that didn't work I found a link on the Ubuntu Wiki and used that file instead: [2]. I just saved this file to my desktop; you won't need it after the next step.
  4. Run
    bcm43xx-fwcutter -w /lib/firmware /home/<user>/Desktop/wl_apsta.o
    You may have to create /lib/firmware first.
  5. Restart, and configure your device as normal. You may want to add bcm43xx into the modules section of your rc.conf file. Good luck!


See the rtl8187 wiki page.

Setup and Boot

Arch Linux provides two methods for enabling wireless connections. The first method is based on the existing network script and should be used for non-roaming wireless access. If you're on only one wireless network, this is the best setup to use. However, if you continually roam from network to network, the Network Profiles setup would be best, though slightly more complicated.

Using the Arch Linux Wireless Network settings

  • Typical Arch Linux Wireless configuration is rather straightforward. The network itself is configured in the exact same way a non-wireless network is in /etc/rc.conf. For example:
# /etc/rc.conf
INTERFACES=(lo eth0 wlan0)
  • Beyond this, the networking scripts need some way to determine that wlan0 is a wireless interface (as not all wireless interfaces are wlan*). This is done in the /etc/conf.d/wireless file. The setup here is very simple. For each wireless interface, you simply declare a setting called wlan_<interface name>. If your wireless interface is "wlan0", it uses wlan_wlan0. If your wireless interface is "eth1", wlan_eth1 is what you need. The value for this setting is simply the parameters to iwconfig (see man iwconfig for details) including the interface name.
  • A simple, non-encrypted setup for the above would look like:
# /etc/conf.d/wireless
wlan_wlan0="wlan0 essid MyEssid"
  • phrakture's trick
    • My personal trick isn't much of a trick at all; it just simplifies a lot of the process. While /etc/conf.d/wireless is sourced (included) in the network script, it is not a requirement for having a wireless interface. Therefore, the actual settings for the wireless interface can exist in anything sourced by the network script. For that reason, I put all my settings in /etc/rc.conf:
# /etc/rc.conf
wlan_wlan0="wlan0 essid MyEssid"
#wlan_wlan0="wlan0 essid MyEssid key 12345678"
#wlan_wlan0="wlan0 essid MyEssid key s:wirelesspassword"
INTERFACES=(lo eth0 wlan0)

If your wireless card is eth0 so you change wlan_wlan0 in wlan_eth0="eth0 essid ...."

Using the Archlinux Roaming Network Profiles

Quick Setup

  1. Create new profile
    1. Create a new network profile in /etc/network-profiles/ based on the template file. Let's call it home. Remember the filename you choose! We'll use it to refer to our new profile later.
    2. Adjust the settings in the new profile to your needs.
  2. Remove outdated settings from rc.conf
    1. Remove all interfaces that should be managed by the Network Profiles in the future from INTERFACES.
    2. Remove any relevant routes from ROUTES.
    3. Leave the "lo" interface in place.
  3. Add Network Profile settings to rc.conf
    1. Add the name of your new network profile to NET_PROFILES=()

So much for the quick setup... You can also set NET_PROFILES to "menu" and it will present a dialog/ncurses menu (which requires the dialog package installed) at bootup where you can pick the profile you want. This doesn't work if you use @network (starting network in the background).

Alternatively, you can pass a NET= value on the kernel boot line, telling netcfg which profile you wish to start with.

vmlinuz root=/dev/hda3 vga=773 ro NET=home

Picked from Judd's explanation.

If you want to change your network profile after boot, you can run 'netcfg' as root.

Simple Wireless Autodetection iphitus created an autodetection patch for the official initscripts which has now been imported as standard. Please see here for an explanation of how it works.

There is a workaround for another wireless autodetection that scans the air for known APs and starts the associated profile.

WPA support phydeaux created a great patch for WPA support which has been adopted straight into the main tree and will be in the next release (after 0.7.1). For information about how to use WPA with the Network Profiles see also Ndiswrapper and wpa supplicant.

Netcfg GUI A simple GUI script to switch network profiles from GNOME (or another window manager) can be found in the AUR. (Screenshots)


Wifi-radar This is a nifty little GUI program that lets you switch wireless networks with ease. Simply do the following:

  1. # pacman -S wifi-radar
  2. # visudo
   Here, add the following line: 
       yourusername     ALL=(ALL) NOPASSWD: /usr/bin/wifi-radar
   Press ESC, then colon (:), then x, then ENTER to save and exit.
  1. Now, just add wifi-radar to your daemons list in /etc/rc.conf and run wifi-radar from your internet menu, and you're all set. :) If you want to view the available networks or to configure your setup, simply run sudo wifi-radar.
  2. You might need to edit /etc/conf.d/wifi-radar to set the particular network interface that you want to use.

NB!: I had to set 'Ifup required' to ON to be able to get it to work with my line. Before this, the internet would not connect.


NetworkManager A more advanced network management system for Linux. This is included in various Linux distributions and now can be used in Arch Linux. It is very painless for roaming users, and includes an easy-to-use GUI program for selecting your desired network. One caveat however is that you are prompted for your keyring password every time you log into gnome and the program starts. This most likely won't be fixed until later versions, and can be quite annoying. More information on NetworkManager can be found at: Networkmanager.

Misc Links