From owner-freebsd-current@freebsd.org Fri Sep 20 02:02:09 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 0BB75ED5F3; Fri, 20 Sep 2019 02:02:09 +0000 (UTC) (envelope-from johalun0@gmail.com) Received: from mail-oi1-x236.google.com (mail-oi1-x236.google.com [IPv6:2607:f8b0:4864:20::236]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46ZH5r20RGz4XrQ; Fri, 20 Sep 2019 02:02:08 +0000 (UTC) (envelope-from johalun0@gmail.com) Received: by mail-oi1-x236.google.com with SMTP id o205so430156oib.12; Thu, 19 Sep 2019 19:02:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Q/aCeBhy8+CmpGefGBpk4JbCoMGRuLjRSofxb4FTEF4=; b=GaIXjxmbLQfHzjMgRONQ5ubDTaY2cskamB0GwIIyTMJhzI7l0E8IWkChV6ps5DvzHL 7dYYbpmFVa4WnfxWwyXfc2WOswKuhDOsvKS3U08SjNhUra0HHBcHnpnVzmVJY49sRv6g gzyh30V5H++q0ao+x9AINqJgDSa73qx+THiT/aCfdKAjluoSVWZRoz329cYzAkgPkZ9R /g8dB+GuMBkAPE+//qBXN4xN36zJpaO1iCUpTM5VMFa4FebkYRV1X1dFwpgd0g9XioGt zCon4qhHK+/9NGHhlDA2f0sOi0hVcta03wYwmosRta9Y9xK2Bq1d1tyR4s7kaRmC7ga/ Jmag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Q/aCeBhy8+CmpGefGBpk4JbCoMGRuLjRSofxb4FTEF4=; b=Vt5V+4g2gc/b3HqyKboOw5z1PMNvNAptN/WfEokEYZYA1bmIeboSpkdO1+CbWNpCbt /xne3erCjBwDtmP86r1iAuB72fDN+idsJW+7zimAGkkCQruAgT6lm4yd21dj+vmj9bSp taQYLeDcjWf78ppj5ex+HIpdCzViD0wVcgYlxrErJK8snpWlH4umyT9ipNehALIzurdK CuXJOriay1ea2+G5pVIY8qgUUmQTHZkn6fIRxCs4EWkX7e0LtGNdyzeTi7fBn651bk27 rIGG/I4EO1/ecZUXm9opnKnjpq1px6QAT/BFPd743mh52HHy5UndfQIE8TZ9zCX0qll7 AGjw== X-Gm-Message-State: APjAAAWG4nJxq1XakgSVmBXK1bJ1juLQydelGn6Bb2/NV0XikIFgPW6J M454khQhLbDPSRsS2N9zef3lnI2KFx0S2wvFdW4= X-Google-Smtp-Source: APXvYqyWED15FSLq8gSjLbKZTVsO9usNnJnTWqWszoh/u9Oi1LM11Mx5XCSdoK3Eop5gGONcxowH2+ayRXW2rPOs+Hc= X-Received: by 2002:aca:fccb:: with SMTP id a194mr917939oii.52.1568944926781; Thu, 19 Sep 2019 19:02:06 -0700 (PDT) MIME-Version: 1.0 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> <201909200125.x8K1Pfhd085841@slippy.cwsent.com> In-Reply-To: <201909200125.x8K1Pfhd085841@slippy.cwsent.com> From: Johannes Lundberg Date: Thu, 19 Sep 2019 19:01:55 -0700 Message-ID: Subject: Re: wlan can't discover known networks after relocating To: Cy Schubert Cc: Adrian Chadd , Cy Schubert , Johannes Lundberg , Poul-Henning Kamp , Tom Jones , freebsd-current , "freebsd-wireless@freebsd.org" X-Rspamd-Queue-Id: 46ZH5r20RGz4XrQ X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=GaIXjxmb; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of johalun0@gmail.com designates 2607:f8b0:4864:20::236 as permitted sender) smtp.mailfrom=johalun0@gmail.com X-Spamd-Result: default: False [-1.50 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCPT_COUNT_SEVEN(0.00)[8]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(0.00)[ip: (-8.86), ipnet: 2607:f8b0::/32(-2.66), asn: 15169(-2.21), country: US(-0.05)]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[6.3.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; SUSPICIOUS_RECIPS(1.50)[]; FREEMAIL_CC(0.00)[gmail.com] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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 02:02:09 -0000 Tested today with bgscan added. Didn=E2=80=99t connect to home network unti= l I manually run ifconfig wlan0 scan. Again, this is with failover lagg. It did however realize I wasn=E2=80=99t at the office anymore and the ssid = field was empty in ifconfig output. Sometimes it stays the same long after I leave the network. On Thu, Sep 19, 2019 at 18:25 Cy Schubert wrote= : > 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 th= e > > > roaming and network preferences when wpa_supplicant is running is don= e > > > in wpa_supplicant. That's where you have to look. Ideally > > > wpa_supplicant would be triggering bgscan too periodically rather tha= n > > > 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.or= g > >, > > > >> >> 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=3D0" when I move inside m= y > > > house: > > > >> >> > > > >> >> > scan > > > >> >> OK > > > >> >> <3>CTRL-EVENT-SCAN-RESULTS > > > >> >> <3>Trying to associate with 6c:3b:6b:3d:a2:e9 > > > >(SSID=3D'Palombia' > > > >> >> freq=3D2452 MHz) > > > >> >> <3>CTRL-EVENT-DISCONNECTED bssid=3D6c:3b:6b:3d:a2:e9 > reason > > =3D0 > > > >> >> <3>CTRL-EVENT-SCAN-RESULTS > > > >> >> <3>Trying to associate with 6c:3b:6b:ab:ce:d4 > > > >(SSID=3D'Palombia' > > > >> >> freq=3D2412 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=3D0" and gets it right: > > > >> >> > > > >> >> <3>WPA: Group rekeying completed with 6c:3b:6b:ab:ce:d= 4 > > > >[GTK=3DCCMP] > > > >> >> <3>CTRL-EVENT-DISCONNECTED bssid=3D6c:3b:6b:ab:ce:d4 > reason > > =3D0 > > > >> >> <3>CTRL-EVENT-SCAN-RESULTS > > > >> >> <3>Trying to associate with 6c:3b:6b:3d:a2:e9 > > > >(SSID=3D'Palombia' > > > >> >> freq=3D2452 MHz) > > > >> >> <3>Associated with 6c:3b:6b:3d:a2:e9 > > > >> >> <3>WPA: Key negotiation completed with 6c:3b:6b:3d:a2:= e9 > > > >[PTK=3DCCMP > > > >> >> GTK=3DCCMP] > > > >> >> <3>CTRL-EVENT-CONNECTED - Connection to > 6c:3b:6b:3d:a2:e9 > > > >> completed > > > >> >> [id=3D3 id_str=3D] > > > >> >> <3>WPA: Group rekeying completed with 6c:3b:6b:3d:a2:e= 9 > > > >[GTK=3DCCMP] > > > >> >> > > > >> >> And yes, working roaming would be nice too... > > > >> > > > > >> > I have the problem that when roaming networks become disable= d > > > >> > > > > >> > $ 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 a= ll > > > >comes > > > >> > back. I asked Adrian about this in the past, but it needs so= me > > > >> > 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 yo= u > > 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=3D8843 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=3D29 > > And the gory details: > > Sep 19 17:21:35 slippy wpa_supplicant[381]: wlan0: CTRL-EVENT-DISCONNECTE= D > bssid=3Da6:NN:NN:NN:NN:NN reason=3D0 > Sep 19 17:21:35 slippy wpa_supplicant[381]: wlan0: Trying to associate > with > a6:NN:NN:NN:NN:NN (SSID=3D'AAA' freq=3D2462 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-DISCONNECTE= D > bssid=3Da6:NN:NN:NN:NN:NN reason=3D3 locally_generated=3D1 > Sep 19 17:21:47 slippy wpa_supplicant[381]: wlan0: Trying to associate > with > 78:NN:NN:NN:NN:NN (SSID=3D'BBBBBBBBB' freq=3D2412 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=3DCCMP GTK=3DCCMP] > Sep 19 17:21:48 slippy wpa_supplicant[381]: wlan0: CTRL-EVENT-CONNECTED - > Connection to 78:NN:NN:NN:NN:NN completed [id=3D7 id_str=3D] > > AAA is my cell phone. the B's are $JOB. > > The relevant parts of my wpa_supplicant.conf: > > network=3D{ > ssid=3D"AAA" > priority=3D6 > proto=3DRSN WPA > key_mgmt=3DWPA-PSK > pairwise=3DCCMP > group=3DCCMP > psk=3D"x" > } > > network=3D{ > ssid=3D"BBBBBBBBB" > scan_ssid=3D1 > priority=3D5 > proto=3DRSN WPA > key_mgmt=3DWPA-PSK > pairwise=3DCCMP TKIP > group=3DCCMP TKIP > psk=3D"y" > } > > #Wildcard match for SSID (plaintext APs only). This example select any > #open AP regardless of its SSID. > network=3D{ > priority=3D0 > disabled=3D1 > key_mgmt=3DNONE > } > > Hope this helps. > > > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: http://www.FreeBSD.org > > The need of the many outweighs the greed of the few. > > >