Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Sep 2019 19:01:55 -0700
From:      Johannes Lundberg <johalun0@gmail.com>
To:        Cy Schubert <Cy.Schubert@cschubert.com>
Cc:        Adrian Chadd <adrian.chadd@gmail.com>, Cy Schubert <cy.schubert@gmail.com>, Johannes Lundberg <johalun@freebsd.org>, Poul-Henning Kamp <phk@phk.freebsd.dk>, Tom Jones <thj@freebsd.org>,  freebsd-current <freebsd-current@freebsd.org>,  "freebsd-wireless@freebsd.org" <freebsd-wireless@freebsd.org>
Subject:   Re: wlan can't discover known networks after relocating
Message-ID:  <CAECmPwuPkYQbHxNC8DKnntjGMndnvqbgfqRy1oSyCx6px9zdcw@mail.gmail.com>
In-Reply-To: <201909200125.x8K1Pfhd085841@slippy.cwsent.com>
References:  <707bcd3f-fa6b-82eb-fa8f-09c4b800f477@FreeBSD.org> <6985.1568738188@critter.freebsd.dk> <20190919122804.GA80037@tom-desk.erg.abdn.ac.uk> <D1396AF2-AA20-4B59-A3E7-B27E4A670A14@lists.zabbadoz.net> <CAJ-Vmon0-3xjNZvwNkPk5yTrrA8o8ZWxG2SesCFB9fkAnn=%2BmA@mail.gmail.com> <E5DF6C2E-F71E-4F66-B92E-56897ED91AA2@cschubert.com> <CAJ-VmokYEqjyPJ_VmKUsQoy%2BuwCBDQTVFS0%2BNfN0GD9iXzBOJg@mail.gmail.com> <7938e5fa-67da-35fa-10d0-ee3004438df7@FreeBSD.org> <201909200125.x8K1Pfhd085841@slippy.cwsent.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <Cy.Schubert@cschubert.com> 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 <cy.schubert@gmail.com
> > > <mailto:cy.schubert@gmail.com>> wrote:
> > >
> > >     On September 19, 2019 8:20:07 AM PDT, Adrian Chadd
> > >     <adrian.chadd@gmail.com <mailto: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
> > >     ><bzeeb-lists@lists.zabbadoz.net
> > >     <mailto:bzeeb-lists@lists.zabbadoz.net>>
> > >     >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
> > >     <mailto: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
> > >     <mailto:freebsd-wireless-unsubscribe@freebsd.org>
> > >     >> "
> > >     >>
> > >     >_______________________________________________
> > >     >freebsd-current@freebsd.org <mailto: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
> > >     <mailto: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 <Cy.Schubert@cschubert.com
> > >     <mailto:Cy.Schubert@cschubert.com>>
> > >     FreeBSD UNIX: <cy@FreeBSD.org> 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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> 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<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
>
> 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 <Cy.Schubert@cschubert.com>
> FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  http://www.FreeBSD.org
>
>         The need of the many outweighs the greed of the few.
>
>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAECmPwuPkYQbHxNC8DKnntjGMndnvqbgfqRy1oSyCx6px9zdcw>