Re: Aironet cards and multiple WEP key support

Doug Ambrisko <[email protected]>
Newsgroups gmane.os.freebsd.devel.mobile
Message-ID <[email protected]>
Josh Tiefenbach writes:
| Does any of a way to convince the an driver to cycle thru multiple wepkeys 
| (similar to the auto_wep feature of the Linux driver)?

Looking at "auto_wep" in the Linux driver I don't like it.  It breaks
some implicit features of the card that I like.  That is if I'm reading
the code right.
 
| Or, much more interesting to me, a way to convince the driver to try cycling
| between combinations of (SSID, WEP mode, WEP Tx key), looking for a tuple that
| will cause the card to associate?

You can tell the driver to do that.
 
| I know that the Windows driver has the ability to search thru multiple
| profiles, but I'm not sure how much of that ability is due to the driver
| itself, and how much to the ACU client util.

You can run the Linux ACU on -stable or -current.
 
| It would be awfully nice if my Cisco 350 automagically worked between the
| office (SSID A, WEP on, WEP Tx key 1) and home (SSID B, WEP off) without me
| having to do manual tweaking at either the office (to turn WEP on), or at home
| (to turn WEP off, or change to a different wepkey).

Mine does and doesn't require auto-wep that could trash the keys in the
card.  I like the NVRAM key holding feature of the Aironet card so I
don't have to put my home/work keys in my /etc files.  Also works across
Windows.  I store my work key in the standard keys and home key in the
home key.  You need 4.5-stable or -current.  I put my laptop to sleep
change location and resume then my laptop connects to the network.

Here is my /etc/start_if.an0 where I think this functionality should
be put since then you can add any arbitrary scheme.  I also have
stuff in my /etc/dhclient-{enter,exit}-hooks to do more network
configuration automatically since I'm to lazy to do it myself.
Note no keys are in this file since I don't have to have them there.
I did sanitize the SSIDs even though it doesn't really matter.

Doug A.

#!/bin/sh

device=${1:-an0}

rm /etc/eth?.cfg
rm /compat/linux/etc/eth?.cfg
rm /root/.history

ifconfig $device stationname a21p

sync_interface(){
  while :
  do
        ifconfig $device -mediaopt adhoc
        ifconfig $device authmode open
        ifconfig $device wepmode on
        ifconfig $device weptxkey 1
        ifconfig $device ssid SOMETHINGWORK
        ifconfig $device ssid 2:SOMETHINGWORK2
        sleep 2
        if ifconfig $device | grep associated
        then
                return
        fi
        ifconfig $device || exit

        ifconfig $device ssid "2:-"
        ifconfig $device mediaopt adhoc
        ifconfig $device authmode open
        ifconfig $device wepmode on
        ifconfig $device weptxkey 5
        ifconfig $device ssid HOME
        ancontrol -i $device -v 2 -n ""
        sleep 2
        if ifconfig $device | grep associated
        then
                return
        fi
        ifconfig $device || exit

        ifconfig $device -mediaopt adhoc
        ifconfig $device authmode none
        ifconfig $device wepmode off
        ifconfig $device ssid ANY
        sleep 2
        if ifconfig $device | grep associated
        then
                return
        fi
        ifconfig $device || exit

        ifconfig $device -mediaopt adhoc
        ifconfig $device authmode none
        ifconfig $device wepmode off
        ifconfig $device ssid ""
        sleep 2
        if ifconfig $device | grep associated 
        then
                return
        fi
        ifconfig $device || exit

        ifconfig $device -mediaopt adhoc
        ifconfig $device authmode none
        ifconfig $device wepmode off
        ifconfig $device ssid "bafug"
        sleep 2
        if ifconfig $device | grep associated
        then
                return
        fi
        ifconfig $device || exit
  done
}

sync_interface

To Unsubscribe: send mail to [email protected]
with "unsubscribe freebsd-mobile" in the body of the message
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.