Sunday, 15 August 2010

Connecting to wireless LAN on Arch linux

Recently, I successfully accessed wireless LAN on my Arch linux. This post shall be a documentation of the same.
Following is the part of lspci -k output of interest here.

02:00.0 Network controller: Broadcom Corporation BCM4311 802.11b/g WLAN (rev 02)
        Subsystem: Hewlett-Packard Company BCM4311 802.11b/g Wireless LAN Controller
        Kernel driver in use: b43-pci-bridge
        Kernel modules: ssb

To get the driver, I followed the steps in the wiki. I edited the MODULES line of my rc.conf as follows:

MODULES=(acpi-cpufreq cpufreq_ondemand cpufreq_conservative cpufreq_powersave cpufreq_performance !pcspkr !snd_pcsp !b43legacy b43)

Using wireless LAN was fairly simple with the following sequence of commands:

# wake up the interface
ifconfig wlan0 up
# scan for wireless networks in range
iwlist scan
# join the desired network based on their essid
iwconfig wlan0 essid "<name>" key <password>
# for automatic detection
iwconfig wlan0 channel auto
# obtain the lease of an IP
dhcpcd wlan0

It is also easy to end a wireless session.

# release the interface
dhcpcd -k wlan0
# exit dhcp
dhcpcd -x
# turn off the interface
ifconfig wlan0 down

No comments: