# wi-fi drivers

## gizmo_454

Hello.  This is my first post on here.  I am somewhat of a noob to Linux, so please bear with me.  I have used Redhat in the past, but it's been awhile.

Anyway, I have heard great things about this distro and thought I would give it a try.  I am currently trying to find drivers for my D-Link DWL-510 Wi-Fi card.  Can someone point me in the right direction?  If not, is there a way to use the Win driver?  I have that on CD.

In either case, a brief description of what command to use to install the driver would be much appreciated.

Gizmo

----------

## comprookie2000

There are two versions of the card;

post

lspci

----------

## gizmo_454

It is the pci "B" version.

Since my last post, I have found some info on the net, but none of it seems to be too helpful.

Again, any help here would be greatly appreciated.

Giz

----------

## madisonicus

 *comprookie2000 wrote:*   

> lspci

 

++

----------

## gizmo_454

Ok.  I get that "lspci" has something to do with it.  But what am I supposed to do with it?

I do appologize if this is something simple and I am just not getting it.  I guess I need someone to spell it out for me.  Is there a good article or some web page that has a step-by-step for that if no one will explain it to me?

Giz

----------

## edit_21

Please input lspci on the command line, This will show you what chipset your wifi card is (amongst others).

```
doh ~ # lspci

00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS/940GML and 945GT Express Memory Controller Hub (rev 03)

00:01.0 PCI bridge: Intel Corporation Mobile 945GM/PM/GMS/940GML and 945GT Express PCI Express Root Port (rev 03)

00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)

00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)

00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)

00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 02)

00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 02)

00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #1 (rev 02)

00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #2 (rev 02)

00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #3 (rev 02)

00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #4 (rev 02)

00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)

00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)

00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)

00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) Serial ATA Storage Controller IDE (rev 02)

00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)

01:00.0 VGA compatible controller: nVidia Corporation Quadro NVS 110M / GeForce Go 7300 (rev a1)

05:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)

06:01.0 Ethernet controller: Broadcom Corporation BCM4401-B0 100Base-TX (rev 02)

06:04.0 CardBus bridge: ENE Technology Inc CB-712/4 Cardbus Controller (rev 10)

```

Note the Network controller 

```
05:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)
```

Post your lspci output ...

Edit_21

----------

## gizmo_454

Sorry about that.  I didn't know what you meant initially.

Here is the line for the wi-fi card.

01:08.0 Ethernet Controller: Atheros Communications, Inc.  AR5212  802.11abg NIC (rev 01)

Giz

----------

## comprookie2000

This should get you started;

http://madwifi.org/wiki/UserDocs/Distro/Gentoo

----------

## gizmo_454

Ok.  Thank you for the info on madwifi.  Big help so far.  Except, I now have this when I go to "make":

/bin/sh: line 0: cd: /lib/modules/2.6.17-gentoo-r7/build: No such file or directory.

Makefile.inc:89: *** /lib/modules/2.6.17-gentoo-r7/build is missing, please set KERNELPATH. Stop.

 

I understand that it is trying to find the source code.  I think.  What do I need to do now to get the "make" and "make install" work?

Giz

----------

## comprookie2000

try

emerge madwifi-ng madwifi-ng-tools

----------

## gizmo_454

No way to get online.  Otherwise, emerge would probably.  I have madwifi on CD.  Is there a way I might be able to install it when I install gentoo?  If not, any other ideas on where I can get the kernel, headers, and whatever else I need to get this to work?  Also, how to install them?

Thank you folks for the help thus far!  I'm getting closer!!

Giz

----------

## comprookie2000

Why don't you use your ethernet;

Ethernet controller: Broadcom Corporation BCM4401-B0 100Base-TX (rev 02) 

that uses the b44 driver I think;

modprobe b44

ifconfig -a to get the interface

dhcpcd ethX

for the kernel, how did you install your kernel?

Is this gentoo or something based on gentoo?

----------

## wrc1944

I have this exact same card, and recent kernels did not work with the madwifi version in portage. After I upgraded my kernel on my wireless box, the only way I found was to get a recent unreleased svn testing version from the madwifi site, boot to my new kernel (make sure /usr/src/linux symlink points to the running kernel), and install manually. Luckily, I had an older kernel on that box I could boot to and download the svn version, but I guess you'll have to use another box and burn it to a cd first, and copy it to your Gentoo wireless box.

I'm not at home for 2 weeks, so I can't check the version that worked on that box. Anyway, IIRC, just cd to the location of the svn version on your box (I think I had to extract the tarball into it's own directory), and run a normal linux manual install for a non-portage package. I think there was an "install" or "readme" file giving instructions in the extracted madwifi stuff. That will install all the madwifi kernel modules into your /lib/modules/kernel-whatever directory.

This worked for me on 2.6.19-rcx kernels- I think some 2.6.18 kernels were also broken for the madwifi stuff. Unless it's fixed now in more recent madwifi versions in portage, you'll probably have to do it this way. However, I haven't checked in about 2 months, so maybe it's totally fixed, and all the above is not necessary.

Oh yeah- be sure all the necessary wireless stuff is enabled in your kernel config.

If you are using a 2.6.17-xx kernel, you probably could just get a tarball for a version in portage somehow, and copy it to /usr/portage/distfiles/, and just do a normal emerge. IIRC, even with earlier kernels, I had a problem with the ebuild versions in portage not matching up with the tarballs I was able to find. This whole madwifi/atheros chipset thing has been a problem for me from the start- always breaking with new updates, etc. I'll never buy another card using atheros.

----------

## gizmo_454

Believe me, if I could use my ethernet controller, I would.  Especially since I have 2 on that mobo, both a 3com and an NVIDIA.  

Athlon XP 2400+, Asus A7N8X Deluxe, 1GB Kingston Valueram, and a 13.6GB Maxtor Diamond Max Plus, for the moment.  Until I learn this a little better, anyway.

I downloaded the x86 LiveCD and installed gentoo from that.  Unfortunately, my access point is downstairs from where my pc is.  And this wifi card is my link to the www at home.  Without it, I have to use my friend's pc or my pc at work, which is where I am at now.

I didn't see an option during the install to intall the src.  I went back last night to look again, just to see if I missed it.  Also, as a side note, the only installer I could use that would actually install gentoo, was the GTK+ installer.  The text based installer, would try to intall, then would say something about and error and it was a "bad thing" then terminate.

Giz

----------

## edit_21

If was you, I would either move my box to the access point or make/buy a long cat5 cable. This will make your life much easyer...

Edit_21   :Rolling Eyes: 

----------

## gizmo_454

wrc1944, thank you for the info.  I downloaded the newest madwifi yesterday.  I followed the instructions for installing, after extracting the tarball.

I did this from the madwifi-**** dir:

cd scripts 

./madwifi-unload.bash 

./find-madwifi-modules.sh /lib/modules/

cd ..

Then it says to "make" and then "make install".  Which is where I am now.  The error posted in bold print in one of my previous posts above is what I get when I try to "make".  I even tried this:

cd scripts 

./madwifi-unload.bash 

./find-madwifi-modules.sh /lib/modules/MY KERNEL VERSION

cd ..

Sorry, I don't remember exactly what MY KERNEL VERSION is off the top of my head.

In both cases, I recieved the same error.  I don't know where to go from this point.

Thanks

Giz

----------

## wrc1944

When you are attempting to install madwifi, you need to be sure the /usr/src/linux symlink is pointing to the running kernel source directory- the one you are trying to install madwifi for. For example, if your kernel source tree is in a different directory than the default /usr/src (say in my case it's /home/wrc/kern/linux-2.6.19-ck1), you would need to do this:

```
cd /usr/src

rm linux

ln -s /home/wrc/kern/linux-2.6.19-ck1 linux
```

This will remove the "linux" symlink pointing to a different kernel, and create a new one pointing to the current running kernel. 

Check and see where your /usr/src/linux symlink is pointing. Even if you have your current running source tree in /usr/src, you still need to make sure to point the symlink to it in order for "make install" to find the correct tree.

Madwifi, and most other packages needing the kernel source tree will usually check and expect the /usr/src/linux symlink to point to the current running kernel source tree directory's location. It sounds like your symlink is pointing to a different kernel tree, or maybe none at all, which will result in failure.

----------

## gizmo_454

Urgh!!!  How frustrating!!!  LOL

I tried the symlink thing.  I am not, however what I did was right.  There is nothing in my /usr/src directory before I put the symlink in.  After it points to /usr/include/linux, which is the only place I could find "linux" in any folder.  Still no luck.  I do not think this is the problem though, as the error I stated before:

/bin/sh: line 0: cd: /lib/modules/2.6.17-gentoo-r7/build: No such file or directory.

Makefile.inc:89: *** /lib/modules/2.6.17-gentoo-r7/build is missing, please set KERNELPATH. Stop.

In this messege, it seems to me reading it that it is looking for a file called "build" in the /lib/modules/2.6.17-gentoo-r7/ directory.  Please correct me if I am wrong.  Never the less, I was unable to locate any file named "build".  

All I did was a typical install off the LiveCD.  So everything should be as gentoo installed it.  I didn't specify any special place for the kernel.  What is going on???  :Question: 

Thanks,

Giz

----------

## msalerno

If you are having such a hard time getting the wireless adapter setup, I would recomend getting the wired adapter setup first.  It's much easier.  If you have nothing in /usr/src, I would go back through the installation.  My guess is that you missed a step or two during the install.  The kernel source is always put in /usr/src

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml

Once you get things working there should be no need to download the madwifi sources and build them yourself, it's in portage, let emerge do the work.  Get your wired network working then use emerge to build madwifi.

Your kernel source directory is in /usr/src/

Check the output of `uname -r`

Change to /usr/src

Check the output of `ls -l`

You should see a kernel source directory name that matches the version of the output of the uname command.

then create your link.

if you are using the gentoo-sources kernels, you could just:

ln -s /usr/src/linux-`uname -r` /usr/src/linux

It might work for the other kernels, but I don't know how they are named.

----------

## wrc1944

Can we assume you have a basic Gentoo install that boots and is functional? If so, you should have one kernel source tree in /usr/src with the symlink already set up pointing to your kernel tree, which would have been done as part of the original install routine.

Is it possible to move your computer to the location of your cable/dsl modem, and get connected with a wired ethernet card, as msalerno suggested? Wireless can be tricky, even for experienced Linux users.

You could also try booting from a good full-featured binary distro live cd that sets up madwifi wireless, like PCLOS or Knoppix, just to see if it actually works in your home with the locations you have your equipment set up at.  Then if it does, you know it's just a matter of getting the Gentoo drivers for madwifi installed correctly.

Can you burn the PCLOS live cd from work or a friends PC?

----------

