From owner-freebsd-wireless@FreeBSD.ORG Mon Jun 6 06:11:07 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 C363E106564A; Mon, 6 Jun 2011 06:11:07 +0000 (UTC) (envelope-from milu@dat.pl) Received: from jab.dat.pl (dat.pl [80.51.155.34]) by mx1.freebsd.org (Postfix) with ESMTP id 7F9848FC1A; Mon, 6 Jun 2011 06:11:07 +0000 (UTC) Received: from jab.dat.pl (jsrv.dat.pl [127.0.0.1]) by jab.dat.pl (Postfix) with ESMTP id AB5D2CA; Mon, 6 Jun 2011 08:11:05 +0200 (CEST) X-Virus-Scanned: amavisd-new at dat.pl Received: from jab.dat.pl ([127.0.0.1]) by jab.dat.pl (jab.dat.pl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id gQh0R3SkGFSz; Mon, 6 Jun 2011 08:11:00 +0200 (CEST) Received: from snifi.laptop (178-36-172-104.adsl.inetia.pl [178.36.172.104]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by jab.dat.pl (Postfix) with ESMTPSA id 3C8FC8F; Mon, 6 Jun 2011 08:11:00 +0200 (CEST) From: Maciej Milewski To: freebsd-wireless@freebsd.org Date: Mon, 6 Jun 2011 08:10:56 +0200 User-Agent: KMail/1.13.7 (FreeBSD/9.0-CURRENT; KDE/4.6.3; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201106060810.57656.milu@dat.pl> 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 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 06:11:07 -0000 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? > > 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. 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. Maciek