From owner-freebsd-wireless@FreeBSD.ORG Mon Jun 6 07:45:39 2011 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6787D106564A for ; Mon, 6 Jun 2011 07:45:39 +0000 (UTC) (envelope-from bschmidt@techwires.net) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id EC2158FC0A for ; Mon, 6 Jun 2011 07:45:38 +0000 (UTC) Received: by bwz12 with SMTP id 12so4704201bwz.13 for ; Mon, 06 Jun 2011 00:45:37 -0700 (PDT) Received: by 10.204.75.40 with SMTP id w40mr4430240bkj.12.1307346337612; Mon, 06 Jun 2011 00:45:37 -0700 (PDT) Received: from jessie.localnet (p5B2ECC05.dip0.t-ipconnect.de [91.46.204.5]) by mx.google.com with ESMTPS id t23sm3122093bkf.4.2011.06.06.00.45.36 (version=SSLv3 cipher=OTHER); Mon, 06 Jun 2011 00:45:36 -0700 (PDT) Sender: Bernhard Schmidt From: Bernhard Schmidt To: freebsd-wireless@freebsd.org Date: Mon, 6 Jun 2011 09:43:50 +0200 User-Agent: KMail/1.13.5 (Linux/2.6.32-32-generic; KDE/4.4.5; i686; ; ) References: <201106060810.57656.milu@dat.pl> In-Reply-To: <201106060810.57656.milu@dat.pl> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201106060944.16002.bschmidt@freebsd.org> Cc: Subject: Re: wishlist: wpa_supplicant should pay attention to the currently forced SSID? X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bschmidt@freebsd.org List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jun 2011 07:45:39 -0000 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 > the > # 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 > in > # 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). -- Bernhard