Using Wireless USB Adapter Under Linux

May 31, 2007

In an attempt at a slightly less lame post this week, I’ll recount how I got a wireless USB adapter to work under Ubuntu. You might find yourself in situation in which a wireless USB adapter makes more sense that installing a normal wireless card, in which case, these instructions might be useful.

Although I did this specifically for the D-Link DWL-G120 (802.11g, 54Mbps) under Ubuntu, the general approach will probably work for other D-Link models and should be general enough to work under any Linux distribution. I used the native Windows drivers with ndiswrapper, but if you’re squeamish about ndiswrapper, don’t worry, its easier than it looks.

If you haven’t done so already, install Wine:

apt-get install wine

Next, insert the driver CD that came with the adapter, and as root, run its setup.exe under wine:

sudo su
cd /media/cdrom/Drivers
wine setup.exe

This installs the driver under your emulated Windows file hierarchy, which, since you ran this as root, will be under the root home in a directory called .wine . Now you just have to let ndiswrapper know about it. For my driver, I ran this:

ndiswrapper -i /root/.wine/drive_c/Program\\ Files/Drivers/Dr71WU.inf

You can confirm that ndiswrapper successfully installed the native Windows driver by running this next:

ndiswrapper -l

Which should output: “driver present, hardware present”. Next run this command:

iwconfig wlan0

Which again, can be confirmed by running this and seeing if wlan0 appears:

ifconfig

Now all you have to do is configure your networking as you normally would under the Gnome menu option: System -> Administration -> Networking.

4 Comments »

Comment by Sal
2007-08-17 11:32:08

I quit. I’ve tried 4 Linux systems ending up with Ubuntu, which I like, but cannot get to go wireless.
Everytime I decide to try a Linyx system, I get more and more frustrated, it is not easy to work with or intall things. Everytrhing is a big deal, type this in, do this, type that, now tyope this, hell I should have gone to a MAC at least it would have given Window some real competition. What did it this time to me, all I want to do is use my USM wireless adapter to get online, phooey, everything I’ve tried sucks.

Bye Linux, hello Mac.

 
Comment by Jorge
2007-09-23 10:28:10

Thanks for the steps outlined. I was able to get my card working. I followed:
http://www.linuxforums.org/forum/linux-networking/68864-howto-install-d-link-dwl-g120-ubuntu-linux-6-06-lts-guide.html
Plus your steps and it worked!
Thanks!

Comment by admin
2007-09-23 11:11:42

That’s great, I’m glad this helped.

 
 
Comment by SteveO
2008-05-18 05:07:58

Hi, gotta agree with Sal.I;ve tried to use Linux on a laptop. Nothing installed only ubuntu. I’ve tried to install 3 different wireless USB adapters, using any number of forums/instructions etc. Nothing works. I know it’s me, but I just want simple. Type this command, followed by another and another.So it goes on. Sorry but I tried Linux a few years ago, that was bad, I thought things had improved…. maybe…. but not in terms of connectivity and simplicty. Who needs a comnmand line! Bill all is forgiven, Xp is going back onto the laptop and I can browse with any USB device I want… happy days!

 
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.