From owner-freebsd-questions@FreeBSD.ORG  Mon Aug 25 06:12:53 2014
Return-Path: <owner-freebsd-questions@FreeBSD.ORG>
Delivered-To: freebsd-questions@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by hub.freebsd.org (Postfix) with ESMTPS id 901EA475
 for <freebsd-questions@freebsd.org>; Mon, 25 Aug 2014 06:12:53 +0000 (UTC)
Received: from nm18-vm5.bullet.mail.ir2.yahoo.com
 (nm18-vm5.bullet.mail.ir2.yahoo.com [212.82.96.229])
 by mx1.freebsd.org (Postfix) with ESMTP id 060C63371
 for <freebsd-questions@freebsd.org>; Mon, 25 Aug 2014 06:12:52 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s2048;
 t=1408947164; bh=YaHh9XhYsQhwDDf6GMksH7Gz+tzjSDnJDtiEHasKzYA=;
 h=Received:Received:Received:DKIM-Signature:X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Date:From:To:Subject:Message-Id:In-Reply-To:References:X-Mailer:Disposition-Notification-To:Mime-Version:Content-Type:Content-Transfer-Encoding:From:Subject;
 b=VQBry3IDDZHsMtXtdZ+OynbgH8uabnAzQwEUYif68fABjYgxhtzZDGlotMCeJNOYzWYpl6ldqd5FtYmQjS6J2fz/lX9Y2UL4oXh7Q8gbm+g4nNbXRMFbU76MKJFzwJHJ2Qz879b0pArinyy13/9a80VuQ5Y6PIg+fO7IXzRwHnif++XQVU9ir4PbzU/asZveDie3dzxh7L0OIOHkmlE1ua81oHulRcqhUCRwvEjfpNxu3U1Pv/RIOez3nWv1SlWUqhbcPBmDsuMCu7G/NN6IHKWfH4OT1TNtwRJ6+Vu5xtNKQwAyImGOekPTCcyy+tBg2cZIKBJNIgiud4y/fQ+hFQ==
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=yahoo.es;
 b=iMPbfij7lHPYkiOx1FGv7RebhlS/OrlzSIcK/dO9I08BFD2FK/DYY5pNw+q11aJe5wlaHqqt2w+kQC3AAkQWS5CYQzqxjsWQAdxfNqF0fVhwTEL3g00YNa9l+iASObW50qqR/PCLZvOMnsMFlqptr+3UT3Aa/LFOtXMdIUNDoduRvi7OcBTNSYGSXApkyDa604RW0pBvn5koDndaWDMBwsPwQNOq9TI3gU4WWQT1C4F2jnzLi/Dd44ZiN1a64xQM3kdwPcMZJ0PbCRlTqO+rcdDMR8sZDVve457ri9Dj4E7ZEhti8ngCaOLwl6U3O3n0BPsPMe2a0nqo3GG/cDmUUg==;
Received: from [212.82.98.62] by nm18.bullet.mail.ir2.yahoo.com with NNFMP;
 25 Aug 2014 06:12:44 -0000
Received: from [46.228.39.89] by tm15.bullet.mail.ir2.yahoo.com with NNFMP;
 25 Aug 2014 06:12:44 -0000
Received: from [127.0.0.1] by smtp126.mail.ir2.yahoo.com with NNFMP;
 25 Aug 2014 06:12:44 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s1024;
 t=1408947164; bh=YaHh9XhYsQhwDDf6GMksH7Gz+tzjSDnJDtiEHasKzYA=;
 h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Date:From:To:Subject:Message-Id:In-Reply-To:References:X-Mailer:Disposition-Notification-To:Mime-Version:Content-Type:Content-Transfer-Encoding;
 b=jIe5BfKGcQEJH2YOjRAg2W3ZRO+q46Q2n+TJy5u6W3S4asWue/hZ8/wUK6lAyhhSCv1tJxOzf3aijtKxAzaeCDab8DRyejRebv8tVq8S8sHoxr1XARiyXrGmPa6d/Ebum0Zp8PIvLiAOEBQ43RAEzrD7Uzux/FDa0qZGEufUlts=
X-Yahoo-Newman-Id: 761249.75781.bm@smtp126.mail.ir2.yahoo.com
X-Yahoo-Newman-Property: ymail-3
X-YMail-OSG: leUwK4YVM1kgQZESsnP3K3aC.mI.h_VAfnRFUO4HZMRFwMM
 CHkJFk8jBm7BYr5.wy7pCk49CrXtAwrdHaFPWPT8PBAMewFJvKJj9OzUtP7U
 Pd8tDtMiZuCFQObu.meBJHwDGxN_k4_h3gw0NEOKiUaXmrpZuQD8TCtvGe5s
 AsnQ_z28jvN6NsCXoQwawI35wumOel_y4AtXCUR8cufHQWarto2OMyxF44Oe
 3FFSBZAc6gNKp_IrXd6Q6f.u0tnPpYVqHJOk6fgjoZVBsq6nMQLeSYieAjNn
 dbAM1JgIbzOKo8h8.2QeuIlu6v.BTH0H7Yng0HqyEd12QcYRFYX.qQQarBVd
 gzxe5QfrLwRZUgbbkPQRxvAeb9Udb2fq0NUN0xw2D2CYnwcL4cUCugPdhC6b
 Z_6kYXvL9kOyKDjFDOg4k9o.ucFH7YwOhm.qdK6z9I_J4mUBivgT36ulH.yD
 qsfy9T4abnIH2OyKswncTRMYbDukKt7cvJzRrsuSjCuPtVps2qvAWAP4t
X-Yahoo-SMTP: mX392iiswBAeJNdO_s.EW62LZDJR
Date: Mon, 25 Aug 2014 08:12:55 +0200
From: Eduardo Morras <emorrasg@yahoo.es>
To: freebsd-questions@freebsd.org
Subject: Re: wpa_supplicant questions
Message-Id: <20140825081255.8c782f1f7d9ee332b7f5b0aa@yahoo.es>
In-Reply-To: <20140824215944.GE42644@home.parts-unknown.org>
References: <20140824215944.GE42644@home.parts-unknown.org>
X-Mailer: Sylpheed 3.4.2 (GTK+ 2.24.22; amd64-portbld-freebsd9.2)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-BeenThere: freebsd-questions@freebsd.org
X-Mailman-Version: 2.1.18-1
Precedence: list
List-Id: User questions <freebsd-questions.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions/>
List-Post: <mailto:freebsd-questions@freebsd.org>
List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 25 Aug 2014 06:12:53 -0000

On Sun, 24 Aug 2014 14:59:44 -0700
David Benfell <benfell@parts-unknown.org> wrote:

> Hi all,
> 
> With my notebook system, I wander various places and have to alter the
> wpa supplicant configuration for some of these places. (Fortunately,
> this proved easier than I expected and the initial installation
> provided example entries that, gee, I know work.)
> 
> I then need to restart the network, sometimes overriding an
> association wpa_supplicant may already have made. 
> 
> 'service netif restart' seems inadequate and I have been having to
> reboot--an elaborate process because the notebook is UEFI and won't
> boot legacy-style off the hard disk.
> 
> What is the correct incantation to do this?

As root shell:

#wpa_cli

help       /* Shows a list of commands a few description  */

list       /* List the networks defined in /etc/wpa_supplicant.conf */

select n   /* selects the network number n from upper list */

You can add new to wpa_supplicant.conf or use wpa_cli commands for it.

> Also, how does one escape an apostrophe in an SSID, as in "Nature's
> Express" (the SSID at a vegan restaurant in North Berkeley), in the
> wpa supplicant configuration?

Don't know, it should work because your wpa_supplicant.conf entry should look similar this one:

network={
    ssid="Nature's Express"
    scan_ssid=1
    key_mgmt=WPA-PSK
    psk="secretpassword"
}

where ssid is quoted with "", if don't work, you can try a double ' or \'.

> Finally, does 'ifconfig scan' output indicate signal strength? At a
> conference I attended yesterday, they had several similarly named
> access points to choose from (the ability to use a wildcard would have
> been helpful as they all take the same password), but I did not know
> which I should choose. As you can imagine, this compounded the above
> difficulties--I wound up abandoning my attempt to use my FreeBSD
> notebook in this situation.

Don't know, it's the first time I use ifconfig wlan0 scan. It shows the column S:N and looks like a Signal to Noise. Signal, the close to 0, the better. Noise, the close to -100 the better.
SSID/MESH ID    BSSID              CHAN RATE   S:N     INT CAPS
AP1             00:1a:5b:be         11   54M -91:-96  100 EP  
AP2             72:c0:3b:ec          3   54M -94:-96  100 EP   HTCAP WPA WME WPS
AP3             bc:14:13:88          4   54M -92:-96  100 EP   HTCAP WPA RSN WME
AP4             00:26:db:d8          9   54M -93:-96  100 EP   HTCAP WPA RSN WME

I use wpa_cli for this too:

#wpa_cli

scan
OK
scan_results
bssid / frequency / signal level / flags / ssid
9c:6d:eb:e6       2472    -88     [WPA-PSK-TKIP+CCMP][WPA2-PSK-TKIP+CCMP][ESS]    AP19
bc:01:00:e8       2462    -90     [WPA-PSK-TKIP+CCMP][WPA2-PSK-TKIP+CCMP][ESS]    AP31
f8:85:de:96       2412    -91     [WPA-PSK-TKIP+CCMP][ESS]        AP13

HTH

> Thanks!
> -- 
> David Benfell <benfell@parts-unknown.org>

---   ---
Eduardo Morras <emorrasg@yahoo.es>