The maze book for programmers!
mazesforprogrammers.com

Algorithms, circle mazes, hex grids, masking, weaving, braiding, 3D and 4D grids, spheres, and more!

DRM-Free Ebook

The Buckblog

assorted ramblings by Jamis Buck

Up and Running

21 March 2004 — 2-minute read

I finally got the ndiswrapper to work, and I’m up and running on my new laptop (which I’ve decided to call “serling”) with a wireless connection. Sound works, too. Here’s what I had to do to get it working on my Dell Latitude D800, running Gentoo 2004.0:

First, make sure you have the wireless-tools package installed (emerge wireless-tools). This will give you the iwconfig utility, for example. Also, be sure to turn on your wireless card’s radio by pressing fn-f2! You can also enable it in the bios.

  1. Download the latest version of ndiswrapper. Untar it somewhere, and cd to the directory the tar-ball creates.
  2. As root, type make install. (Just a side note: you’ll need to rebuild this everytime you rebuild your kernel, since it installs a kernel module.)
  3. Get the windows driver for your card’s chipset. This driver worked for me—just download it and unzip it into its own directory.
  4. Find the .inf file for the driver you want. (The one I used was called bcmwl5.) Then, type ndiswrapper -i <inf-file>, specifying the path to the .inf file for the driver you want.
  5. Typing ndiswrapper -l should show that a device exists for that driver (it’ll say that the driver is ‘present’).
  6. Now, type modprobe ndiswrapper to load the kernel module. (You’ll want to have ndiswrapper autoloaded, btw—just add it to the /etc/modules.autoload.d/kernel-2.6 file.)
  7. Typing iwconfig should show a wireless device, now (mine was called wlan0; reinterpret what follows according to what yours is displayed as).
  8. Configure the mode and security stuff first, by typing iwconfig wlan0 mode managed key open (that’s if you don’t use WEP). If you use WEP, you’ll do iwconfig wlan0 mode managed key restricted <WEP-KEY> (where WEP-KEY is the key to use).
  9. Wait a couple seconds, and then type iwconfig wlan0 essid any. (You can supposedly specify the essid explicitly, when when I tried that it never found my network.)
  10. Wait about five more seconds, and then type iwconfig. It should show that your wlan0 device has found a network (the ESSID field should show the name of it).
  11. Then, if it did indeed find a wireless network, (and assuming you’re using dhcp), type dhcpcd wlan0.

If all went well, you should have an active wireless connection—try pinging something. I’ve created a slightly modified init script for net.wlan0, and it seems to do the trick. If you’d like a copy, email me.

To get the sound working, I had to merge the latest (unstable) alsa-lib and alsa-utils, and then edit my /etc/conf.d/alsa file to specify the correct information. It’s all thoroughly documented on the Gentoo site, under the “configuring your desktop” document. The one trick, for me, though, was that I had to turn up not only the master volume, but also the PCM volume before I could hear anything.