# Gentoo, Laptop & Wlan.

## TiaZzz

Hello all.

I've searched the forum for HOWTO's on getting wlan up on a Gentoo-box. I can't find a good "cook-book". Is it just me, or should somebody make one? I can do it, if someone gives me enough tips on settings.

Hardware: IBM Thinkpad T30. I've heard that the prism2_pci driver is the right one for me. I've also planed to make some suid-scripts for changing interfaces on the fly(from gkrellm, Gnome or whatever...). 

I am a long-time Debian user, so Gentoo's startup-system is a bit awkward for me.

So, what do you think? A waste of time?

----------

## Ethernal

Well, I've had _loads_ of trouble with my prism2 cards, you could try the linux-wlan-ng drivers, but use the pcmcia ones.

http://www.linux-wlan.com/linux-wlan/

It's not hopeless, but prepare for a bit of headache  :Very Happy: 

----------

## rlyacht

I just set up an X24 which is similar to the T30.  I emerged the wlan stuff, and I am using the prism2_pci driver with absolutely no problems.  I haven't waded through configuring the scripts that come with that package, so I just run the following script when I start up.  You could add this script to your default runlevel, but I haven't done it, since I want to do it "the right way".  But this will work:

```

modprobe prism2_pci

/sbin/wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable

/sbin/wlanctl-ng wlan0 lnxreq_autojoin ssid=MYSSID authtype=opensystem

dhcpcd wlan0

```

(Replace MYSSID with your ssid  :Smile: 

----------

## krt

My preffered driver for prism2/2.5/3 cards is the HostAP driver.  Its not in the portage tree yet... so you'll have to get it from:

http://hostap.epitest.fi/

It works -great- with the prism 2.5 PCI card in my Thinkpad A31.

You use the iwconfig commands with it.. so you will need the wireless-tools package emerged.

As an added bonus, you can do cool things like promiscuous mode.. and of course, making your machine an AP!

----------

## step

rlyacht, i must be missing something here.

i have X24. local network here is named "BLAABLAA" (i got this name off from portable, that uses windows) and there is also a 13 digit key used (i havet in ascii - lets say its 1234567890000)

i emerged   net-wireless/linux-wlan-ng

modprobe prism2_pci  looks like no problems here

and now i run

/sbin/wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable

and i get :

    message=lnxreq_ifstate

    ifstate=enable

    resultcode=success

what about the next line?

/sbin/wlanctl-ng wlan0 lnxreq_autojoin ssid=MYSSID authtype=opensystem

do i use opensystem? or sharedkey?

what other files i need to edit? 

/etc/conf.d/wlan.conf ?

/etc/conf.d/wlancfg-DEFAULT ? (/etc/conf.d/wlancfg-BLAABLAA)

----------

## rlyacht

step, I have to confess that I am not using WEP (yet), so that opensystem works for me.  Obiously this is a bad thing, which is on my list of things to fix.

If you want to used WEP, you will most definitey need to use the sharedkey option rather than opensystem.

As far as files to edit, I had a look at my setup, You may need to edit wlan.conf to set the variable WLAN_DEVICES, and also SSID_NameOfYourDevice.  For me it looks like this:

```

WLAN_DEVICES="wlan0"

#...

SSID_wlan0="myessid"

ENABLE_wlan0=y

```

You also need to edit wlancfg-DEFAULT, or create wlancfg-myessid (if not, it will use DEFAULT, so you can just edit the DEFAULT file).  This is the place you'd include the WEP information.  The file has some instructions in it, which might contain what you need to know.

When I get WEP working I'll post something.

----------

## ievil

Been reading thru the posts, and I did actually get it to work onces  :Wink: 

I load the card after booting and follow this procedure:

modprobe prism2_pci

/sbin/wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable

/sbin/wlanctl-ng wlan0 lnxreq_autojoin ssid=MYSSID authtype=sharedkey

/sbin/wlanctl-ng wlan0 dot11req_mibset mibattribute=dot11WEPDefaultKey0=XX:XX:XX:XX:XX:XX:XX:XX....

/sbin/wlanctl-ng wlan0 dot11req_mibset mibattribute=dot11WEPDefaultKeyID=0

/sbin/wlanctl-ng wlan0 dot11req_mibset mibattribute=dot11PrivacyInvoked=true

and everyone ends with success

ifconfig wlan0 up

and then finally I give it an ip

but I get these funny msg's when trying to work it gives me the error:

p80211knetdev_hard_start_xmit: Tx attempt prior to association, fram dropped.

then no go..

I gotta have missed something, anyone who see it?  :Wink: 

regards

----------

## ievil

mysteriously...

I tried to just rmmod prism2_pci and the reload it.. and then do EXACTLY the same again.. now it works.. (I made a small script that does the settings  :Wink: 

Wierd!?

----------

