From owner-freebsd-current@freebsd.org Fri Sep 20 01:25:53 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DA0D6EC250; Fri, 20 Sep 2019 01:25:53 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 46ZGJ04yccz4WQ5; Fri, 20 Sep 2019 01:25:52 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id B7gBiazF9sAGkB7gCi2sVj; Thu, 19 Sep 2019 19:25:50 -0600 X-Authority-Analysis: v=2.3 cv=WeVylHpX c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=8nJEP1OIZ-IA:10 a=J70Eh1EUuV4A:10 a=6I5d2MoRAAAA:8 a=pGLkceISAAAA:8 a=9bHR7MVLAAAA:8 a=YxBL1-UpAAAA:8 a=PCqSUmN0ak2iMDnNgpYA:9 a=rhmp_ibcXPBzh3jT:21 a=LeJL6ysmZIOmxfNn:21 a=wPNLvfGTeEIA:10 a=IjZwj45LgO3ly-622nXo:22 a=I7KxNEAtLM9g1UmuDjRu:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTPS id C56F72B9; Thu, 19 Sep 2019 18:25:42 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id x8K1Pfpb085859; Thu, 19 Sep 2019 18:25:41 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id x8K1Pfhd085841; Thu, 19 Sep 2019 18:25:41 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201909200125.x8K1Pfhd085841@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Johannes Lundberg cc: Adrian Chadd , Cy Schubert , freebsd-current , "freebsd-wireless@freebsd.org" , Tom Jones , Poul-Henning Kamp Subject: Re: wlan can't discover known networks after relocating In-reply-to: <7938e5fa-67da-35fa-10d0-ee3004438df7@FreeBSD.org> References: <707bcd3f-fa6b-82eb-fa8f-09c4b800f477@FreeBSD.org> <6985.1568738188@critter.freebsd.dk> <20190919122804.GA80037@tom-desk.erg.abdn.ac.uk> <7938e5fa-67da-35fa-10d0-ee3004438df7@FreeBSD.org> Comments: In-reply-to Johannes Lundberg message dated "Thu, 19 Sep 2019 15:21:15 -0700." Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Thu, 19 Sep 2019 18:25:41 -0700 X-CMAE-Envelope: MS4wfPIEwXSRbpa0Mt+RcoUh3R0rgNWSHrs4pSZ8oFcX7GkeG4+9kWeQ3EY8xPGgdZhwFH/OQHzoYf8cbswYHEaISNRMuRJGjEqHmYAQI94SjG3nRu7Nj3uD lgQ3TeU9Fk80OTcYjFPZtG3kMpzk7MbhvDdj2NfSVk6sAZueBM2Gj/GFPpQtrQZ74tzrAJazIyb3Ct63J0jUQ6ORrz+KzU6FcYwljcY5wiBgRN0S98dw3/Wm cv2h6IiJL2dewTqxTYH0Per4WAjOEgLIUbMxRlc7YKjl+M2JHxo9rPZzHPKNASS39/8H8UGDvQf7+Utr6BHuCg== X-Rspamd-Queue-Id: 46ZGJ04yccz4WQ5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 64.59.134.9) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [-2.47 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; HAS_XAW(0.00)[]; RCPT_COUNT_SEVEN(0.00)[7]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; MIME_TRACE(0.00)[0:+]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; RCVD_COUNT_FIVE(0.00)[5]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[9.134.59.64.list.dnswl.org : 127.0.5.0]; IP_SCORE(-2.37)[ip: (-6.27), ipnet: 64.59.128.0/20(-3.08), asn: 6327(-2.39), country: CA(-0.09)]; R_SPF_NA(0.00)[]; FREEMAIL_CC(0.00)[gmail.com]; SUSPICIOUS_RECIPS(1.50)[] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2019 01:25:53 -0000 In message <7938e5fa-67da-35fa-10d0-ee3004438df7@FreeBSD.org>, Johannes Lundber g writes: > > On 9/19/19 3:06 PM, Adrian Chadd wrote: > > So roaming in ifconfig/net80211 is what's set to manual. > > > > wpa_supplicant right now does RSSI threshold based roaming. All of the > > roaming and network preferences when wpa_supplicant is running is done > > in wpa_supplicant. That's where you have to look. Ideally > > wpa_supplicant would be triggering bgscan too periodically rather than > > only when the RSSI is low. > > > > > > > > -adrian > > > > > > On Thu, 19 Sep 2019 at 15:04, Cy Schubert > > wrote: > > > > On September 19, 2019 8:20:07 AM PDT, Adrian Chadd > > > wrote: > > >Roaming is done in wpa_supplicant when it's running.That's where the > > >smarts > > >need to be. :( > > > > > > > > > > > >-adrian > > > > > > > > >On Thu, 19 Sep 2019 at 05:44, Bjoern A. Zeeb > > > > > > > >wrote: > > > > > >> On 19 Sep 2019, at 12:28, Tom Jones wrote: > > >> > > >> Hi, > > >> > > >> freebsd-wireless might be a better list for all this .. > > >> > > >> > > >> > On Tue, Sep 17, 2019 at 04:36:28PM +0000, Poul-Henning Kamp > > wrote: > > >> >> -------- > > >> >> In message <707bcd3f-fa6b-82eb-fa8f-09c4b800f477@FreeBSD.org>, > > >> >> Johannes Lundber > > >> >> g writes: > > >> >> > > >> >>> For a long time now I have had this problem with iwm and wlan0. > > >> >>> Whenever > > >> >>> I move between work and home it won't reconnect > > automatically and > > >I > > >> >>> have > > >> >>> to do wlan0 scan manually for it to pick up the different > > >network. > > >> >> > > >> >> I suffer from the dreaded "reason=0" when I move inside my > > house: > > >> >> > > >> >>      > scan > > >> >>      OK > > >> >>      <3>CTRL-EVENT-SCAN-RESULTS > > >> >>      <3>Trying to associate with 6c:3b:6b:3d:a2:e9 > > >(SSID='Palombia' > > >> >> freq=2452 MHz) > > >> >>      <3>CTRL-EVENT-DISCONNECTED bssid=6c:3b:6b:3d:a2:e9 reason > =0 > > >> >>      <3>CTRL-EVENT-SCAN-RESULTS > > >> >>      <3>Trying to associate with 6c:3b:6b:ab:ce:d4 > > >(SSID='Palombia' > > >> >> freq=2412 MHz) > > >> >>      <3>Associated with 6c:3b:6b:ab:ce:d4 > > >> >> > > >> >> a2:e9 is the loudest AP here in my office, but my I have been in > > >the > > >> >> other end of the house iwn consistently fails to associate > > with it > > >> >> and > > >> >> and keeps picking the weaker AP in the far end. > > >> >> > > >> >> Eventually (hours!) it disconnects from the weaker ap, also with > > >> >> "reason=0" and gets it right: > > >> >> > > >> >>      <3>WPA: Group rekeying completed with 6c:3b:6b:ab:ce:d4 > > >[GTK=CCMP] > > >> >>      <3>CTRL-EVENT-DISCONNECTED bssid=6c:3b:6b:ab:ce:d4 reason > =0 > > >> >>      <3>CTRL-EVENT-SCAN-RESULTS > > >> >>      <3>Trying to associate with 6c:3b:6b:3d:a2:e9 > > >(SSID='Palombia' > > >> >> freq=2452 MHz) > > >> >>      <3>Associated with 6c:3b:6b:3d:a2:e9 > > >> >>      <3>WPA: Key negotiation completed with 6c:3b:6b:3d:a2:e9 > > >[PTK=CCMP > > >> >> GTK=CCMP] > > >> >>      <3>CTRL-EVENT-CONNECTED - Connection to 6c:3b:6b:3d:a2:e9 > > >> completed > > >> >> [id=3 id_str=] > > >> >>      <3>WPA: Group rekeying completed with 6c:3b:6b:3d:a2:e9 > > >[GTK=CCMP] > > >> >> > > >> >> And yes, working roaming would be nice too... > > >> > > > >> > I have the problem that when roaming networks become disabled > > >> > > > >> >       $ wpa_cli > > >> >       Selected interface 'wlan0' > > >> > > > >> >       Interactive mode > > >> > > > >> >       > list_networks > > >> >       network id / ssid / bssid / flags > > >> >       0       network1        any     [CURRENT] > > >> >       1       network2 any    [DISABLED] > > >> >       2       network3 any    [DISABLED] > > >> >       3       network4 any    [DISABLED] > > >> >       4       network5 any    [DISABLED] > > >> >       Selected interface 'wlan0' > > >> > > > >> > > > >> > I address this by doing network_enable x in wpa_cli and it all > > >comes > > >> > back. I asked Adrian about this in the past, but it needs some > > >> > debugging > > >> > to pin down. > > >> > > >> > > >> Is this iwm(4) as well in your case or another card? > > >> > > >> /bz > > >> _______________________________________________ > > >> freebsd-wireless@freebsd.org > > mailing list > > >> https://lists.freebsd.org/mailman/listinfo/freebsd-wireless > > >> To unsubscribe, send any mail to > > >"freebsd-wireless-unsubscribe@freebsd.org > > > > >> " > > >> > > >_______________________________________________ > > >freebsd-current@freebsd.org > > mailing list > > >https://lists.freebsd.org/mailman/listinfo/freebsd-current > > >To unsubscribe, send any mail to > > >"freebsd-current-unsubscribe@freebsd.org > > " > > > > With wpa_supplicant running roaming is set to manual. Bgscan > > should be enabled.  > > > > At home we have two n (and 2 g) wifi networks. When powering off > > one ap it connects to the other (in addition to using lagg to > > failover from ethernet to wifi and back). > > > > Your wpa_supplicant should contain each ssid you intend to use. A > > wildcard can be used for open networks. > > > > It's a while since I've tested this functionality but I can test > > again when I get home tonight. > > > > > > -- > > Pardon the typos and autocorrect, small keyboard in use. > > Cheers, > > Cy Schubert > > > > FreeBSD UNIX: Web: http://www.FreeBSD.org > > > >         The need of the many outweighs the greed of the few. > > > > Hmm so in other words, you have to set bgscan for each network entry you > want roaming? What are some good values for this? Just tested here. It worked after a short delay, with a not-so-young laptop with iwn. wlan0: flags=8843 metric 0 mtu 1500 ether 20:NN:NN:NN:NN:NN groups: wlan ssid "BBBBBBBB" channel 1 (2412 MHz 11g ht/20) bssid 78:BB:BB:BB:BB:BB regdomain FCC country US authmode WPA2/802.11i privacy ON deftxkey UNDEF AES-CCM 2:128-bit AES-CCM 3:128-bit txpower 30 bmiss 120 scanvalid 16959 protmode CTS ampdulimit 64k -amsdutx amsdurx shortgi -stbc -ldpc wme roaming MANUAL media: IEEE 802.11 Wireless Ethernet MCS mode 11ng status: associated nd6 options=29 And the gory details: Sep 19 17:21:35 slippy wpa_supplicant[381]: wlan0: CTRL-EVENT-DISCONNECTED bssid=a6:NN:NN:NN:NN:NN reason=0 Sep 19 17:21:35 slippy wpa_supplicant[381]: wlan0: Trying to associate with a6:NN:NN:NN:NN:NN (SSID='AAA' freq=2462 MHz) Sep 19 17:21:35 slippy wpa_supplicant[381]: Failed to add supported operating classes IE Sep 19 17:21:35 slippy wpa_supplicant[381]: wlan0: Associated with a6:NN:NN:NN:NN:NN Sep 19 17:21:45 slippy wpa_supplicant[381]: wlan0: Authentication with a6:08:ea:9c:a0:84 timed out. Sep 19 17:21:45 slippy wpa_supplicant[381]: wlan0: CTRL-EVENT-DISCONNECTED bssid=a6:NN:NN:NN:NN:NN reason=3 locally_generated=1 Sep 19 17:21:47 slippy wpa_supplicant[381]: wlan0: Trying to associate with 78:NN:NN:NN:NN:NN (SSID='BBBBBBBBB' freq=2412 MHz) Sep 19 17:21:47 slippy wpa_supplicant[381]: Failed to add supported operating classes IE Sep 19 17:21:47 slippy wpa_supplicant[381]: wlan0: Associated with 78:NN:NN:NN:NN:NN Sep 19 17:21:48 slippy wpa_supplicant[381]: wlan0: WPA: Key negotiation completed with 78:NN:NN:NN:NN:NN [PTK=CCMP GTK=CCMP] Sep 19 17:21:48 slippy wpa_supplicant[381]: wlan0: CTRL-EVENT-CONNECTED - Connection to 78:NN:NN:NN:NN:NN completed [id=7 id_str=] AAA is my cell phone. the B's are $JOB. The relevant parts of my wpa_supplicant.conf: network={ ssid="AAA" priority=6 proto=RSN WPA key_mgmt=WPA-PSK pairwise=CCMP group=CCMP psk="x" } network={ ssid="BBBBBBBBB" scan_ssid=1 priority=5 proto=RSN WPA key_mgmt=WPA-PSK pairwise=CCMP TKIP group=CCMP TKIP psk="y" } #Wildcard match for SSID (plaintext APs only). This example select any #open AP regardless of its SSID. network={ priority=0 disabled=1 key_mgmt=NONE } Hope this helps. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.