Tony Lukasavage

Caffeine. Whiskey. Code. Mostly the last one.

Setting Up Wireless on Centos 5

Centos isn’t exactly the best Linux desktop distro. Ubuntu, Fedora, or Mint jump to mind as better alternatives. But that’s not Centos’s fault as its core focus is stability. For this reason, Centos is purposely a bit behind the times and only adds proven functionality to its core, as well as its published package repositories.

Unfortunately, though, I need a C++ development environment that will suit a Centos server project I’m working on. Wireless network connectivity was the first hurdle I ran into. No out of the box support for my HP laptop. In fact, when trying to enable the wireless interface on my laptop I got nothing but a very cryptic error message:

[root@localhost ~]# ifup wlan0
Determining IP information for wlan0...SIOCSIFFLAGS: No such file or directory.

Helpful, I know. But with a little bit of research I found the setting up wireless section of the Centos laptop FAQs. In here it states Centos does not come with the required wireless firmware for any laptops that don’t allow its free distribution. This then leaves it up to us, the users, to track it down and install it. Here’s how:

  1. Open up your /etc/sysconfig/hwconf and find the entry for your wireless card.  You can speed this up by searching for the device name of your card, wlan0 in my case, or entries that have the class NETWORK. The entry you want will look something like this:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    
    class: NETWORK
    bus: PCI
    detached: 0
    device: wlan0
    driver: iwl3945
    desc: "Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection"
    network.hwaddr: xx:xx:xx:xx:xx:xx
    vendorId: 8086
    deviceId: 4222
    subVendorId: 103c
    subDeviceId: 135b
    pciType: 1
    pcidom:    0
    pcibus:  2
    pcidev:  0
    pcifn:  0
  2. In your wireless card’s entry, locate the name of the driver used.  In my case it was iwl3945.
    1
    
    driver: iwl3945
  3. Goto http://wiki.centos.org/HowTos/Laptops/Wireless and follow the instructions for your particular wireless driver.  In most cases this involves setting up RPMForge for yum, using yum to install driver firmware, then enabling the driver module.
  4. (OPTIONAL) Disable your network and wpa_supplicant services and enable the NetworkManager.
    1
    2
    3
    4
    5
    6
    
    [root@localhost ~]# chkconfig network off
    [root@localhost ~]# service network stop
    [root@localhost ~]# chkconfig wpa_supplicant off
    [root@localhost ~]# service wpa_supplicant stop
    [root@localhost ~]# chkconfig NetworkManager on
    [root@localhost ~]# service NetworkManager start

And there you have it, wireless connectivity on your Centos 5 desktop. Not exactly a breeze, but it’s not rocket science either once you know the steps involved. Why do I have a feeling this will soon become a series or articles related to things that should be easy but aren’t on desktop Centos?