Tuesday, November 29, 2011

How to make your wireless card work with Network Manager after Debian 6.0.3 "squeeze" installation

I have a pretty old HP Pavilion dv1000 laptop with a Intel Pentium M Processor 740 at 1.7 GHz. I have always used Ubuntu along with the pre-installed version of Windows on that machine, but as new releases became more resource-hungry, I started to experience an unacceptable slowdown. Of course you can use a lighter window manager, such as Xcfe, but since I'm too affectionate to GNOME 2 I decided to make a new start with Debian. I then downloaded the latest 6.0.3 stable release and burnt it on a CD-RW (the other option is to boot the installer from the net, since it seems that you can't boot anything from removable USB media).

The installation process of my new OS went just fine, but in order to download updated packages from the internet I had to use my cable connection, since the Intel wifi adapter needed proprietary firmware that wasn't shipped with the first Debian CD. So I configured my ethernet card, and this turned out to be a source of problems, maybe the one you are experiencing now if you are reading this little guide. During the installation I had configured my ethernet to a static IP address, and everything went fine, Debian booted beautifully, fast and clean.

The first thing I did then was to install the Intel wifi adapter firmware in order to make my wifi card work properly. I have then enabled the non-free part of the official Debian repositories in my sources.list file and executed the following command

# apt-get update && apt-get install firmware-ipw2x00 wireless-tools

Then I have restarted the networking service and Network Manager with

# /etc/init.d/networking restart
# /etc/init.d/network-manager restart

At this point I configured my wireless connection with the graphical frontend to Network Manager (accessible through the icon in the notification area, usually near the clock on the top-right corner of the desktop) and...surprise! The association with the access point went just fine, but I couldn't ping my router nor any other machine on the local network. Weird, uh?

It turned out that this issue was related to the previous network configuration, the one carried out during the OS installation process, since in that case the installer wasn't supposed to use Network Manager to manage the connection. The solution is then pretty simple, I just had to edit my /etc/network/interfaces to look like the following minimal example

auto lo
iface lo inet loopback

and after rebooting my wifi adapter started working like a charm again.

As a final remark I'd like to inform you that with Intel Wifi ipw2200 adapters you might need to use the firmware version 3.0 for the WEP security encryption. So the best thing to do is probably to move to a more secure encryption protocol, like WPA or WPA2.