From owner-freebsd-wireless@freebsd.org Thu Sep 19 22:30:39 2019 Return-Path: Delivered-To: freebsd-wireless@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 D80E5E86CF; Thu, 19 Sep 2019 22:30:39 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-yb1-xb33.google.com (mail-yb1-xb33.google.com [IPv6:2607:f8b0:4864:20::b33]) (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 46ZBPq5XHhz4NN4; Thu, 19 Sep 2019 22:30:39 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-yb1-xb33.google.com with SMTP id v5so1951367ybq.4; Thu, 19 Sep 2019 15:30:39 -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=NnMB8EGUeHv5eo3FFwzI94GZcZlaEygAHBOzBAcJZVA=; b=PJGYg4atFw2O1d097UA1+UzrHbhv2WxIXn3X5KP6A7Mb/tyEPAehLhCfu2hkJiabel 2prRJQPQ2aJHVnhxWNXMbTNGBFi+t4hjlmFFnFOmRVTydzPjOpQLHEfEFfkowoZw5m9I cEIfWEKn43nez0Y1BNeX+C+jlPcyrn7DLUJsY+xYXwLWRZWeJhbgv/puGkVkYVoG2PQh beyF99Q0OZiRmrvCgBuHhA9jjNglvXepRIfE3zd6FgbZ/o1mbnj9daXojf1VIre/8mAe QSQA5XVIkv/n66+6ptzDE9lqmAktzVXyskbuzAAcpGyhCJ2sdT3VYGTh8epti+Bpuxvg lM+w== 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=NnMB8EGUeHv5eo3FFwzI94GZcZlaEygAHBOzBAcJZVA=; b=CRYYp9DRMUVj1r9Ei7dgOQcJHkrx4rd/CQNsCThSe/jVtjScm+EvDcgYDypT2R3GTF cOmdRl28qs3ygjW4wBgKOUvLzEohfauMJGDAcMHGZwir47N9Ipm0bKLVxKV4JypHIc7y KHtXtRp3+IaxNCPU0bkJv9/OQUY1aVi2D5YXqNsypzlanrxy+MClzO1WRgsbyUYKu8Ad Y3qgnTt43VSO4a7cmp+4DtqhwsAf8BSJ3zd0Q8caPXfyoXwVv2wJUM5zdmg5Qk9kv8K1 FVpdK7QHtL5cNz/jDwt5Vml3A5ZgRbGCnu/52CsV0LOCGjgTyCn3v4Y94aoklPtOfvj8 EUzA== X-Gm-Message-State: APjAAAWRXN89iO9C0PD3DihbpohPHYt34jbTUcOf5tf8kA7gAXZzdOmx yjsgHV3EEB0HoHKWSAkFFCQi0r5LrIFNbqxnlv30xw== X-Google-Smtp-Source: APXvYqzweZFDf+63yeWEHmrnOp2qGR4Cr08ICPQVpBdBDY4g46LspcfVAw81CfovSTebwHxQpnZ7NqQNxRhS+/zvPYY= X-Received: by 2002:a25:b682:: with SMTP id s2mr8567095ybj.264.1568932236757; Thu, 19 Sep 2019 15:30:36 -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> In-Reply-To: <7938e5fa-67da-35fa-10d0-ee3004438df7@FreeBSD.org> From: Adrian Chadd Date: Thu, 19 Sep 2019 15:30:22 -0700 Message-ID: Subject: Re: wlan can't discover known networks after relocating To: Johannes Lundberg Cc: Cy Schubert , freebsd-current , "freebsd-wireless@freebsd.org" , Tom Jones , Poul-Henning Kamp X-Rspamd-Queue-Id: 46ZBPq5XHhz4NN4 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TAGGED_RCPT(0.00)[]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.29 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: Thu, 19 Sep 2019 22:30:39 -0000 I've no idea, bgscan is broken with atheros NICs because the driver still doesn't do background scan without dropping frames :( (one of many thing I'd love to fix, but life/time.) please do experiment though! I think wpa_supplicant's roaming logic would benefit from a lot more work. -adrian On Thu, 19 Sep 2019 at 15:21, Johannes Lundberg wrote: > > 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 < >> adrian.chadd@gmail.com> 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> >> <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? > > >