wishlist: wpa_supplicant should pay attention to the currently
bschmidt at freebsd.org
Mon Jun 6 07:45:39 UTC 2011
On Monday, June 06, 2011 08:10:56 Maciej Milewski wrote:
> On Monday 06 of June 2011 03:42:11 Adrian Chadd wrote:
> > Hi,
> > Something that keeps irking me is that wpa_supplicant will try
> > scanning its config file in order and fail to associate to ssids that
> > don't match the one which is hard-coded.
> > I hard-code SSIDs so I can force the network I'm associating to,
> > without having to reconfigure wpa_supplicant.
> > Is this intended behaviour? Is there another easy way to tell
> > wpa_supplicant what to associate to? Or could we modify wpa_supplicant
> > to only try assocating to APs that match the currently configured
> > SSID?
That would be a bug actually. wpa_supplicant tries its best to get
rid of as much as pre-configured stuff as possible, so it can just
do its thing.
> > Thanks,
> > Adrian
> Hi Adrian,
> The only thing which I found useful at current state is:
> # priority: priority group (integer)
> # By default, all networks will get same priority group (0). If some of the
> # networks are more desirable, this field can be used to change the order in
> # which wpa_supplicant goes through the networks when selecting a BSS. The
> # priority groups will be iterated in decreasing priority (i.e., the larger
> # priority value, the sooner the network is matched against the scan results).
> # Within each priority group, networks will be selected based on security
> # policy, signal strength, etc.
> # Please note that AP scanning with scan_ssid=1 is not using this priority to
> # select the order for scanning. Instead, it uses the order the networks are
> # the configuration file.
> It's not 100% what you need but may be enough in some cases.
There is also wpa_cli, which should allow you to select the network to
which you want to connect.
> Additional setting is:
> # AP scanning/selection
> # By default, wpa_supplicant requests driver to perform AP scanning and then
> # uses the scan results to select a suitable AP. Another alternative is to
> # allow the driver to take care of AP scanning and selection and use
> # wpa_supplicant just to process EAPOL frames based on IEEE 802.11 association
> # information from the driver.
> # 1: wpa_supplicant initiates scanning and AP selection
> # 0: driver takes care of scanning, AP selection, and IEEE 802.11 association
> # parameters (e.g., WPA IE generation); this mode can also be used with
> # non-WPA drivers when using IEEE 802.1X mode; do not try to associate with
> # APs (i.e., external program needs to control association). This mode must
> # also be used when using wired Ethernet drivers.
> # 2: like 0, but associate with APs using security policy and SSID (but not
> # BSSID); this can be used, e.g., with ndiswrapper and NDIS driver to
> # enable operation with hidden SSIDs and optimized roaming; in this mode,
> # only the first network block in the configuration file is used and this
> # configuration should have explicit security policy (i.e., only one option
> # in the lists) for key_mgmt, pairwise, group, proto variables
> I admit that I haven't been using this on FreeBSD but used this in tha past on
> Linux STA's.
And you shouldn't use it on FreeBSD ;) ap_scan should always be 1
(except one special case which I consider a bug, adhoc).
More information about the freebsd-wireless