El día Thursday, September 20, 2007 a las 08:43:57AM +0200, Heiko Wundram 
(Beenic) escribió:

> Am Donnerstag 20 September 2007 04:47:03 schrieb C Thala:
> > That OS from the NorthWestern US seems to keep a list of WAPs and will
> > detect whenever you are in the vicinity of one and use the available
> > one. How can I get FreeBSD to do the same?
> Try setting up a wpa_supplicant configuration (and putting "WPA DHCP" in 
> rc.conf); that does the proximity-switching for you (and does so for me, 
> happily).
> I don't really know whether wpa_supplicant works with non-security-enabled 
> (i.e. non-WEP and non-WPA) wireless networks, but I guess there's a switch to 
> tell it to do so.

I have some 10 diffrent AP in my file /etc/wpa_supplicant.conf
because I'm traveling often to diffrent locations of our company,
WPA-PSK and WEP, for example:

# Coimbra

# Westeregeln

in /etc/rc.conf I only have


but in addition I'm using the daemon devd(8) to set the IP stuff
of iwi0 accordingly to the network I'm associating; you need two
files for this:


notify 1 {
        match "system"          "IFNET";
        match "subsystem"       "iwi0";
        match "type"            "LINK_UP";
        action "/usr/local/etc/devd/iwi.sh $subsystem $type";
notify 1 {
        match "system"          "IFNET";
        match "subsystem"       "iwi0";
        match "type"            "LINK_DOWN";
        action "/usr/local/etc/devd/iwi.sh $subsystem $type";

and the work is done in the sheel script /usr/local/etc/devd/iwi.sh
like for example:

echo `date`: $0 $* >> /tmp/devd.out

case $2 in
        exit 0 ;

ap=`/sbin/ifconfig iwi0 list sta | awk '{print $1;}' | fgrep -v ADDR`

case ${ap} in

        printf "ap [%s] seems to be the Oberhaching office\n" "${ap}" >> 
/tmp/devd.out ;
        ifconfig bge0 netmask
        ifconfig bge0 down
        dhclient iwi0
        # drop and reload the firewall rules
        ipf -D
        ipf -E
        ipmon -Ds
        ipf -Fa -f /etc/ipf.rules.sisis
        ipnat -CF -f /etc/ipnat.rules.sisis
        printf "ap [%s] not known in %s\n" "${ap}" $0 >> /tmp/devd.out ;

exit 0

this means when you get associated to an AP and LINK comes UP, the
devd(8) wakes up and runs the sheel script doing all the right work;
works really nice;

Matthias Apitz
Manager Technical Support - OCLC PICA GmbH
Gruenwalder Weg 28g - 82041 Oberhaching - Germany
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e <[EMAIL PROTECTED]> - w http://www.oclcpica.org/ http://www.UnixArea.de/
b http://gurucubano.blogspot.com/
freebsd-questions@freebsd.org mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to