You are here

Easy-Peasy Wireless w/ Ubuntu (Debian) Linux

In this brief blog entry I will reference the steps it takes to provide a wireless network connection, that is functional on both Linux 2.6 and Windows, using a Belkin Wireless G USBNetwork Adapter. This is basically my first attempt to even use wireless networking yet everything is very clean cut (for the most part).

The Hardware
In despair my wife and I ran out to the local Circuit City store hunting for an all in one solution to provide portable networking capabilities. After looking over the D-Links, Linksys, Netgear, and Belkin networking devices we both went for the Belkin Wireless G USB Network Adapter. The Adapter easily connects your USB-equipped desktop or notebook computer to your wireless network for Internet and file sharing. Desktop users can now join the network with the ease of a USB plug-in, without opening their PC cases; laptop users can enjoy the benefits of staying mobile-while connected to the Internet.

The Systems — The main operating systems I’ll be using includes; Ubuntu Breezy Badger (5.10), Windows XP, and Debian Sarge (Stable). For the sakes of simplicity I will not include instructions for Windows XP and will concentrate on my Ubuntu laptop setup with a few side notes for Debian Base users.

Ubuntu Breezy Configuration
Ubuntu users are lucky enough to have just about everything they need already configured in the kernel by the default installation. Due to Belkin being a Windows device the use of a NDIS Wrapper is required.

The Network Driver Interface Specification (NDIS) is an application programming interface (API) for network interface cards (NICs). It was jointly developed by Microsoft and 3Com Corporation, and is mostly used in Microsoft Windows on Intel-based computers, but the open-source ndiswrapper project allows many NDIS-compliant NICs to be used with Linux.

Sounds complicated, eh? Do not fret, Ubuntu (as mentioned above) is stocked and ready for this use. ndiswrapper, wireless-tools, and the kernel modules are already installed. Simply download and installed the ndiswrapper-utils via terminal like so;

sudo aptitude -P install ndiswrapper-utils

This package contains the userspace tools. The default Ubuntu kernel already provides the required modules. If you use a custom kernel, you might also need the kernel modulepackage.

The next step is to install the drivers for the Belkin USB network interface. Insert the driver’s CD and browse to your *.inf driver (be sure your CD-Rom is mounted);

cd /media/cdrom0/drivers/

Then I would suggest that you plug in your Belkin network adapter and time to install the drivers via;

sudo ndiswrapper -i rt2500usb.inf

You will receive a conformation if everything is successfully installed and detected. To recofirm you can simply type;

sudo ndiswrapper -l

You will (should) be displayed with; rt2500usb driver present, hardware present. To have this module loaded on boot you will want to;

sudo ndiswrapper -m

sudo ndiswrapper -hotplug

You will see something on the lines of; alias wlan0 ndiswrapper. Now you MUST include this new interface in your /etc/network/interfaces file;

sudo vi /etc/network/interfaces

Arrow the whole way to the bottom and start a new line by pressing the letter O. For simplicity sake add the following;

iface wlan0 inet dhcp
auto wlan0

press the Esc key, then :wq to Write and Quit the file. If all has gone well you are ready to use the USB adapter. To bring your new interface on line try the following near or around your wireless router (fingers crossed);

sudo ifup wlan0

Unplug the messy Ethernet cable and go-go wifi access. You will see the Belkin blink green as data is transferred.

For other people’s methods on doing the basic same thing might I suggest;
I have ran out of time to include a step-by-step on Debian Sarge. In summary you will need to be using the 2.6 kernel and then configure the ndiswrapper-module for 2.6 before you install any drivers and what-not.

In summary, I highly recommend the Belkin G USB Network Adapter as both a Linux and Windows interface.


How can I remove the driver?

You should be able to remove the ndiswrapper (man ndiswrapper) driver by using;

sudo ndiswrapper -e rt2500usb

See the list for your exact driver’s name if you are using a different network adapter.

sudo ndiswrapper -l

What if /media/cdrom* doesn’t exist?

Sounds like you are missing a symbolic link (man ln) to /dev/hdc.

sudo ln -s /dev/hdc /media/cdrom; sudo ln -s /dev/hdc /media/cdrom0

I am having problems setting this up with WPA. I am using wpa_supplicant and I can see the AP, but it is not accepting the key?

You are going to want to enable AP Broadcast on your Wifi router. Also, verify your /etc/default/wpasupplicant;

OPTIONS="-i wlan0 -D ndiswrapper -c /etc/wpa_supplicant.conf -w"

Thanks for all the great feedback!

hhh writes: Awesome, thank you so much. This should be stickied in the Networking forum as well.

nijinsky writes: I followed this guide. Absolutely great and everythig ran perfectly. […] Took me days without success using other methods. This method took 10 minutes

bootsie writes: Thank You! I’m a newbie to linux and was quickly becoming frusterated with my lack of success after hours of reading ideas and trying to download and install drivers and tweak my network settings to get my belkin wireless adapter going on my desktop. Following your steps got me up and running in minutes!