# [solved] wireless network

## Zaf

Hey guys.

I'm a newbee and I've been installing gentoo without network because I only have a Wifi card. I've tried using the gentoo doc to set it up but it doesn't really seem to work. Anyway, I might have missed something and so I was wondering if there would be anyone out there intrested in giving me simple, step by step explaination on how to make this work.

So here's some info for you guys who wanna help :

lspci gave me this :

```

0000:00:00.0 Host bridge: VIA Technologies, Inc. VT8377 [KT400/KT600 AGP] Host Bridge

0000:00:01.0 PCI bridge: VIA Technologies, Inc. VT8235 PCI Bridge

0000:00:0c.0 Network controller: Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller (rev 03)

0000:00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80)

0000:00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80)

0000:00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80)

0000:00:10.3 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 82)

0000:00:11.0 ISA bridge: VIA Technologies, Inc. VT8235 ISA Bridge

0000:00:11.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)

0000:00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 50)

0000:00:13.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

0000:00:14.0 FireWire (IEEE 1394): VIA Technologies, Inc. IEEE 1394 Host Controller (rev 46)

0000:01:00.0 VGA compatible controller: ATI Technologies Inc Radeon RV250 If [Radeon 9000] (rev 01)

0000:01:00.1 Display controller: ATI Technologies Inc Radeon RV250 [Radeon 9000] (Secondary) (rev 01)

```

By the way, lspci says broadcome for my Wifi card but it's actually a Belkin, think that's weird ???

emerge info gave me this

```

Gentoo Base System version 1.6.12

Portage 2.0.51.22-r2 (default-linux/x86/2005.1, gcc-3.3.5-20050130, glibc-2.3.4.20041102-r1, 2.6.12-gentoo-r6 i686)

=================================================================

System uname: 2.6.12-gentoo-r6 i686 AMD Athlon(tm) XP 2000+

dev-lang/python:     2.3.5

sys-apps/sandbox:    1.2.11

sys-devel/autoconf:  2.13, 2.59-r6

sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5

sys-devel/binutils:  2.15.92.0.2-r10

sys-devel/libtool:   1.5.18-r1

virtual/os-headers:  2.6.11-r2

ACCEPT_KEYWORDS="x86"

AUTOCLEAN="yes"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -march=athlon-xp"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"

CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"

CXXFLAGS="-O2 -march=athlon-xp"

DISTDIR="/usr/portage/distfiles"

FEATURES="autoconfig distlocks sandbox sfperms strict"

GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="x86 X alsa apm arts avi berkdb bitmap-fonts cdr crypt cups curl eds emboss encode esd fam foomaticdb fortran gdbm gif gnome gpm gstreamer gtk gtk2 imlib ipv6 jpeg kde ldap libg++ libwww mad mikmod motif mozilla mp3 mpeg ncurses nls ogg oggvorbis opengl oss pam pdflib perl png python qt quicktime readline sdl spell ssl tcpd tiff truetype truetype-fonts type1-fonts vorbis xml2 xmms xv zlib userland_GNU kernel_linux elibc_glibc"

Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY

```

and uname -a gave me this (I've been asked all this before this is why I'm giving it all before anyone asks)

```

Linux zaffy 2.6.12-gentoo-r6 #1 SMP Mon Oct 31 15:56:37 UTC 2005 i686 AMD Athlon(tm) XP 2000+ AuthenticAMD GNU/Linux

```

hope there's someone out there who can helpLast edited by Zaf on Mon Nov 14, 2005 3:22 pm; edited 1 time in total

----------

## Telemin

I have a belkin card also, the broadcom is a reference to the chipset the card uses.  I get my card to work using ndiswrapper to "wrap" the windows drivers for my card for insertion into the kernel as a module.

You can do this as follows:

as root,

1. emerge ndiswrapper (and dhcpcd if you haven't already)

2. find the .inf and .sys driver files for your card (google for your card name)

3. use 

```
ndiswrapper -i (your .inf file)
```

 to load your driver into ndiswrapper

4. add "ndiswrapper" to /etc/modules.autoload.d/kernel-2.6 file

5. create a link to start up your networking at boot by doing:

```

ln -s /etc/init.d/net.eth0 /etc/init.d/net.wlan0

rc-update add net.wlan0 default

```

6. reboot your computer and (hopefully) start surfing ^_^

NB provided you aren't using wep there is no need to set up you /etc/conf.d/net or /etc/conf.d/wireless, if you do use wep or wpa then you're best getting someone else to help, i don't have any experience there.

If you don't understand i've said something please ask

-Freestyling-

----------

## Zaf

Do I really need to look for the inf file on the internet or can I use the ones I got on the installation Cd ??? 

cuz I can find exe files but I'm havin trouble finding inf and sys file for my card (maybe i'm not looking in the right place).

Also how do I emerge ndiswrapper without internet. I did try downloading it from windows and then copying the tar file into /usr/portage/distfiles but it doesn't work. It says something about the kernel sources not being in the right place or something.

Thanks

----------

## Telemin

If you have the drivers you need of course not, just be sure its the correct .inf and .sys or it will just fail to work, and i'm not sure about your kernel sources problem, all i can say is make sure you have a .config file for your kernel and that the /usr/src/linux symlinkk points to the correct place.  Check these by typing

```

ls -l  /usr/src/linux

ls -a /usr/src/linux

```

and make sure that the first one points to a kernel voersion number, and the second one contains a reference to .config in the file list.  If you're not sure post the outputs here....Last edited by Telemin on Sun Nov 13, 2005 2:46 pm; edited 1 time in total

----------

## Zaf

thoses are the drivers i used in windows so they should be fine.

What about ndiswrapper ? how do I emerge it without internet ?

----------

## Telemin

what error message does it give you when you try to emerge it?

post the EXACT message here and I will try to help you

best of luck

-Freestyling-

----------

## GNUtoo

 *Zaf wrote:*   

> thoses are the drivers i used in windows so they should be fine.
> 
> What about ndiswrapper ? how do I emerge it without internet ?

 

i am in the exact same case as you are

the only diference is the drivers (madwifi or ndiswarper)

you have diferent choices

=>download knoppix 4.0.2

->chroot in the gentoo install using a real console(not the ones under X)

->ping an internet ip

->ping a domainname (ping www.gentoo.org)

->if it doesn.t work copy the resolve.conf of the knoppix to the gentoo install

then emerge --fetchonly

=>download manualy the missing files

emerge apackadge > afile doesn't work...

so:

-emerge ndiswarper

-copy manualy the adress of the required packadge and the name of the file in the distfile directory

-download it manualy or with wget...

=>colinux isn't a good idea because configuring the network between linux and windows is not an easy task (sometimes it works very easely sometimes not)

after one of theses steps...

boot under gentoo

and :

emerge ndiswrapper

----------

## Zaf

okay so here's what i get when i try to emerge ndiswrapper

```

emerge ndiswrapper

Calculating dependencies ...done!

>>> emerge (1 of 1) net-wireless/ndiswrapper-1.1-r1 to /

>>> md5 files   ;-) ndiswrapper-1.1-r1.ebuild

>>> md5 files   ;-) ndiswrapper-1.2.ebuild

>>> md5 files   ;-) files/ndiswrapper-1.2-suspend2.patch

>>> md5 files   ;-) files/digest-ndiswrapper-1.1-r1

>>> md5 files   ;-) files/digest-ndiswrapper-1.2

>>> md5 src_uri ;-) ndiswrapper-1.1.tar.gz

 * Determining the location of the kernel source code

 * Found kernel source directory:

 *     /usr/src/linux

 * Found sources for kernel version:

 *     2.6.12-gentoo-r6

 * getfilevar requires 2 variables, with the second a valid file.

 *    getfilevar <VARIABLE> <CONFIGFILE>

 * Could not find a usable .config in the kernel source directory.

 * Please ensure that /usr/src/linux points to a configured set of Linux sources.

 * If you are using KBUILD_OUTPUT, please set the environment var so that

 * it points to the necessary object directory so that it might find .config.

!!! ERROR: net-wireless/ndiswrapper-1.1-r1 failed.

!!! Function linux-info_pkg_setup, Line 507, Exitcode 1

!!! Unable to calculate Linux Kernel version

!!! If you need support, post the topmost build error, NOT this status message.

```

so when I do :  

```

~ # ls -l  /usr/src/linux

lrwxrwxrwx  1 root root 22 Oct 31 15:25 /usr/src/linux -> linux-2.6.12-gentoo-r6

```

and :

```

 ~ # ls -a /usr/src/linux

.        Documentation  REPORTING-BUGS  fs       kernel  patches.txt  usr

..       MAINTAINERS    arch            include  lib     scripts

COPYING  Makefile       crypto          init     mm      security

CREDITS  README         drivers         ipc      net     sound

```

Seems like i don't have a .conf file, how do i create one ? 

Thanks for all the help.

----------

## Telemin

Have you compiled a version of your kernel yet?  I know it sounds a stupid question, but did you configure a kernel in this gentoo environment or bring it over from somewhere else?  If you havent compiled your kernel in system you will have problems with modules like this.  I suggest you do the following:

```

cd /usr/src/linux -- change to the linux directory

make menuconfig --this brings up a menu for configuring your kernel options

make -- compiles your kernel

make install --install the kernel to your boot partition

```

Make sure that your boot partiton is mounted before running the make install, and then set your grub kernel line to point to /vmlinuz (this is a symlink to your latest compiled kernel version) to boot this new kernel.

When you have rebooted under the new kernel you will then (hopefully) be able to compile ndiswrrppaer sucessfully.

Best of luck

-Freestyling-

----------

## Zaf

okay, I managed to emerge ndiswrapper. The .config file was actually in /boot under then name .config-2.6.12-gentoo-r6.

Now I did what you said but gentoo stops when it tries to load ndiswrapper. I had to boot with the cd to get gentoo to start again. I'm gonna try again what you said (I may have gotten mixed up somewhere because of my emerge problems). I'll keep you informed.

Thanks

Ok so after trying one more time, i come with the same problem, the gentoo starting up stays frozen at the "loading ndiswrapper module" step. So i tried setting up my network manually. here's the funny thing : as soon as I type "ifconfig wlan0" linux freezes and there's nothing left for me to do but reboot. 

anyone know why ? is it my drivers ? I'm suspecting they could do that but if that's the case, what do I do now ???

Help please

----------

## Zaf

Alright problem solved, turns out I needed to download an other driver.

Thanks for everyone's help.

----------

