# wlan-ng questions, again

## gen2

Hi all

Having no luck getting wlan-ng drivers workin right, and the whole kit seems rather confusing to me --

All of these files seem to be part of the configuration, and I'm wondering if I really have to tweak every one of them or not. Is there a comprehensive gentoo-wlan-ng doc somewhere that I can't find? Seems like a lot of partial/incomplete info in the forums. I know what these files do, but there appear to be redundancies...

/etc/conf.d/net

/etc/conf.d/wlan.conf

/etc/conf.d/wlancfg-DEFAULT

/etc/wlan/

/etc/pcmcia/config.opts

/etc/pcmcia/network.opts

/etc/pcmcia/wireless.opts

/etc/pcmcia/wlan-ng.conf

Should I install wireless-tools, given that they don't support much of wlan-ng?

Is there a decent tool for managing wifi profiles? (yes I've looked in portage, just wondering if anyone has a favorite "best" tool, gui is fine by me)

THANKS

----------

## gen2

Ok, I'm amused by the lack of responses, but I have a contribution, found this!

http://dev.gentoo.org/~gmsoft/tools/wlan2

That script has a bunch of functions which can control some very useful aspects of a prism2

Someone please point me to the detailed gentoo documentation on wlan-ng/prism2 integration/operations if there are any (else let's do it), THANK YOUZ!Last edited by gen2 on Wed Sep 21, 2005 6:36 am; edited 2 times in total

----------

## CyD

how did that script work for you?  when using linux-wlan-ng with a netgear MA111 usb, I had to create a script that would manually call the linux-wlan commands. ie.

```
modprobe prism2_usb prism2_doreset=1

wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable

wlanctl-ng wlan0 lnxreq_autojoin ssid=<your ssid> authtype=opensystem
```

the provided linux-wlan scripts, such as /etc/init.d/wlan, do not function correctly for me.

goin to do some more testing, it's been two months since i tried playin around with it.

----------

## gen2

 *CyD wrote:*   

> how did that script work for you?

 

It hasn't yet, was just an interesting-looking thing that seems to be a relevant indicator of sorts. Grabbing at straws, if you will.Last edited by gen2 on Wed Sep 21, 2005 6:39 am; edited 2 times in total

----------

## gen2

 *CyD wrote:*   

> how did that script work for you?  (SNIP)
> 
> the provided linux-wlan scripts, such as /etc/init.d/wlan, do not function correctly for me.
> 
> goin to do some more testing, it's been two months since i tried playin around with it.

 

Yup, tell me about it. Please allow me to repeat that for our leet audience members...  :Wink: 

"the provided linux-wlan scripts, such as /etc/init.d/wlan, do not function correctly for me."

Someone (who ME? Ok, just as soon as I understand it all) should really do something about wlan-ng integration in Gentoo...wlan-ng is "the best" wifi driver, dontcha know!

Regarding that wlan2 script, it's working well for me now. Do the chmod +x thing on it and just run it to see usage info.

(I copied mine into /usr/local/sbin, and added that to $PATH). As root, natch.

```

# wlan2

 ### prism2 setter by Guy Martin <gmsoft@tuxicoman.be> ###

Usage : /usr/local/sbin/wlan2 <command>

 Where command is :

  enable         : Enable the card

  disable        : Disable the card

  reload         : Unmonitor, disable and enable the card

  ad-hoc         : Set ad-hoc mode

  infrastructure : Set infrastructure mode

  wep128         : Set a 128 bit wep key from a pass phrase

  wep64          : Set a 64 bit wep key from a pass phrase

  wep_key        : Set a raw 64 or 128 bit wep key

  wep_random128  : Set a random 128 bit wep key

  wep_random64   : Set a random 64 bit wep key

  wep_disable    : Disable wep

  scan           : Scan for networks

  reassociate    : Reassociate to a other given peer in the current essid

  monitor        : Set the card in monitor mode

  unmonitor      : Unset monitor mode

Commands might be shortened. See source code for more info.

```

I'm using scan to find nearby APs, then setting ssid using the code you posted.

```
wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable 

 wlanctl-ng wlan0 lnxreq_autojoin ssid=<target ssid> authtype=opensystem
```

then rock out with:

```
# dhcpcd -d wlan0
```

or manually set stuff with ifconfig, route, and /etc/resolv.conf

----------

## gen2

this may be helpful:

```
# wlancfg show wlan0 all 
```

will return a list of all the attributes (both set-able and read-only) for your prism2 card. If you have an attribute that looks like this:

dot11Address1=00:00:00:00:00:00

modify it like this:

```
# wlanctl-ng wlan0 dot11req_mibset mibattribute=dot11Address1=00:0A:F7:B2:31:D0
```

most useful attributes to tweak (for me):

p2CurrentChannel=6

p2TxPowerMax=18

p2CnfOwnName=''gen2"

p2CnfOwnMACAddress=00:06:d2:51:32:b9

p2CnfDesiredSSID='target AP'

```
# wlanctl-ng wlan0 dot11req_mibset mibattribute=p2CnfDesiredSSID='target AP'
```

if you're doing any kind of scanning (kismet, etc), this will lower your radiation footprint:

```
# wlanctl-ng wlan0 dot11req_mibset mibattribute=p2TxPowerMax=1
```

p2TxMaxPower is settable from 1 to 30.

some definitions for the dot11 mibs can be found here (apparently they are descendants of SNMP):

http://support.ipmonitor.com/mibs/IEEE802DOT11-MIB/info.aspx

the p2 attribute definitions list has proved elusive for me. You gots? Please post!

----------

## anachranerd

Hi all,

         I just wanted to let you all know this script worked perfectly for me.  This little cheapy balance digital(read walmart remarked ECS) laptop came with an internal USB prism3 wireless chip, and getting it to work has been a bitch.  This script worked perfectly for me the first time, in addition to the tutorial on setting up wlan-ng, which I can dig up the link to if anyone wants it.  If anyone is stuck on this chipset and wants to see a conf file I used or anything, let me know(PM or email). 

Thanks!

Brian  :Very Happy: 

----------

