Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Apr 2010 09:28:27 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        yanefbsd@gmail.com
Cc:        rc@freebsd.org
Subject:   Re: Specifying a precedence order for wireless AP stations in rc.conf?
Message-ID:  <20100424.092827.316647720356353396.imp@bsdimp.com>
In-Reply-To: <k2x7d6fde3d1004232154r9ea2ab19g81cbc1d72ddcf375@mail.gmail.com>
References:  <v2s7d6fde3d1004231916v13c03615j6e4cbd4e487779c2@mail.gmail.com> <20100423.205923.825269116351824344.imp@bsdimp.com> <k2x7d6fde3d1004232154r9ea2ab19g81cbc1d72ddcf375@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <k2x7d6fde3d1004232154r9ea2ab19g81cbc1d72ddcf375@mail.gmail=
.com>
            Garrett Cooper <yanefbsd@gmail.com> writes:
: On Fri, Apr 23, 2010 at 7:59 PM, M. Warner Losh <imp@bsdimp.com> wrot=
e:
: > In message: <v2s7d6fde3d1004231916v13c03615j6e4cbd4e487779c2@mail.g=
mail.com>
: > =A0 =A0 =A0 =A0 =A0 =A0Garrett Cooper <yanefbsd@gmail.com> writes:
: > : Hi rc folks,
: > : =A0 =A0 I use my Lenovo laptop at work and at home and it's kind =
of
: > : annoying to have to do into rc.conf every time I go to work or go=
 home
: > : to comment out lines choosing an appropriate network for
: > : ifconfig_wlan0 in rc.conf(5) to connect to the appropriate wirele=
ss
: > : network. So I figured that I'm probably doing something wrong so =
I
: > : should ask.
: > : =A0 =A0 The documentation for ifconfig_wlan* in the handbook [1] =
and the
: > : rc.conf(5) manpage [2] for 8-STABLE don't suggest that connectivi=
ty
: > : for multiple networks can be performed whereas multiple networks =
can
: > : be specified in wpa_supplicant.conf. Is it at all possible to pro=
vide
: > : a precedence list for what SSID networks to attempt to configure =
via
: > : wpa_supplicant(8) by default, or are further enhancements require=
d in
: > : either wpa_supplicant(8) or rc.network to get this to function?
: > : Thanks,
: > : -Garrett
: > :
: > : 1. http://www.freebsd.org/doc/en/books/handbook/network-wireless.=
html
: > : 2. http://www.freebsd.org/cgi/man.cgi?query=3Drc.conf&sektion=3D5=

: >
: > wpa_supplicant will allow you to set the order of SSIDs that it
: > associates with. =A0It is the order they are in in the
: > wpa_supplicant.conf file.
: =

: Ok... I worded the question poorly.
: =

: If I do:
: =

:     ifconfig_wlan0=3D"WPA DHCP"
: =

: then stuff doesn't work at work. If I do:
: =

:     ifconfig_wlan0=3D"WPA ssid <base-station-id1> DHCP"
: =

: with the way I have wpa_supplicant.conf setup, things work. Otherwise=

: it ifconfig and the driver act dumb and try and associate a bunch of
: times, and eventually fail.

Then you need to fix your driver, because that shouldn't be
necessary.  Seriously...

: Conversely, if I do:
: =

:     ifconfig_wlan0=3D"ssid <base-station-id2> DHCP"
: =

: at home, things work. Otherwise, same old song and dance occurs when
: it attempts to associate with an open AP in the neighborhood that
: isn't in the house.
: =

: So, this may ultimately be a driver problem with how it selects APs,
: but because I know that <base-station-id1> and <base-station-id2> are=

: `trusted' networks that I'm going to attach the laptop to on a regula=
r
: basis, I'd rather it try and connect to those SSIDs and fail if
: they're not present, instead of just trying a pool of whacky SSIDs
: (which those SSIDs may be a part of) instead and failing hard.

You can just put those two into your wpa_supplicant.conf file, and
remove the wacky ones just as you go.

Alternatively, you can "help" things along by using wpa_cli to select
the SSID you want to connect to.

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100424.092827.316647720356353396.imp>