On Thu, 2017-05-18 at 18:43 +0000, Matthew Starr wrote:
> > -----Original Message-----
> > From: Dan Williams [mailto:d...@redhat.com]
> > Sent: Thursday, May 18, 2017 1:31 PM
> > To: Matthew Starr; networkmanager-list@gnome.org
> > Subject: Re: Network Manager 1.0.X Wi-Fi Autoconnect Issues
> > 
> > On Thu, 2017-05-18 at 15:54 +0000, Matthew Starr wrote:
> > > I have tried using NetworkManager 1.0.0 and 1.0.12 on an embedded
> > > device built with buildroot that has Ethernet (eth0), Wi-Fi
> > > client
> > > (mlan0), Wi-Fi Access Point (uap0), and Cellular interfaces
> > > (ttyACM0
> > > and ppp0).  The Wi-Fi AP (uap0) interface is ignored by Network
> > > Manager based on my NetworkManager.conf file. I am able to boot
> > > the
> > > device and Network Manager will automatically configure and
> > > connect
> > > with Ethernet, Wi-Fi Client, and Cellular interfaces every time.
> > > 
> > > If I move out of range of the Wi-Fi access point the device will
> > > disconnect and if I move back into range in under an hour,
> > > NetworkManager will reestablish the connection.  If I wait
> > > multiple
> > > hours before moving back into range of the Wi-Fi access point,
> > > Network
> > > Manager will not reestablish a connection automatically with the
> > > access point (I waited hours with the AP within range and visible
> > > in
> > > Wi-Fi scan results).  When Network Manager is not automatically
> > > reestablishing a connection to the access point I can use nmcli
> > > to
> > > bring up the profile associated with the access point and it
> > > connects
> > > immediately.
> > > 
> > > Why is Network Manager not able to auto connect to a Wi-Fi AP
> > > after a
> > > longer period of time of not seeing the AP?  Is there a timeout
> > > within
> > > Network Manager?  Is this a bug?
> > 
> > Like you say, it does look like NM is trying to auto-activate the
> > connection,
> > but it's not doing it correctly.  The most likely thing happening
> > is that it does
> > try to activate, but it's not able to find the "best" connection
> > for the device.
> > Somehow the existing WiFi connection profile isn't matching.
> > 
> > Can you run 'nmcli con show <name of connection you expect to
> > start>'?
> 
> Dan,
> 
> This issue has occurred on several different access point I have
> attempted to connect to all from different vendors (Linksys,
> Ubiquiti, D-link).

Ok, that doesn't ellucidate anything.  Are you able to apply a
debugging patch to NetworkManager and rebuild it?  Alternatively, you
could use 'gdb' to step through the code and see where it's not
proceeding with the activation in nm-policy.c.

Dan

> Here is the output for my connection profile for one of them:
> 
> # nmcli con show linksys-hed-test
> connection.id:                          linksys-hed-test
> connection.uuid:                        3a3fdd49-c624-42a3-acbd-
> 135f728c9621
> connection.interface-name:              mlan0
> connection.type:                        802-11-wireless
> connection.autoconnect:                 yes
> connection.autoconnect-priority:        0
> connection.timestamp:                   1495132442
> connection.read-only:                   no
> connection.permissions:                 
> connection.zone:                        --
> connection.master:                      --
> connection.slave-type:                  --
> connection.secondaries:                 
> connection.gateway-ping-timeout:        0
> 802-11-wireless.ssid:                   linksys-hed-test
> 802-11-wireless.mode:                   --
> 802-11-wireless.band:                   --
> 802-11-wireless.channel:                0
> 802-11-wireless.bssid:                  --
> 802-11-wireless.rate:                   0
> 802-11-wireless.tx-power:               0
> 802-11-wireless.mac-address:            --
> 802-11-wireless.cloned-mac-address:     --
> 802-11-wireless.mac-address-blacklist:  
> 802-11-wireless.mtu:                    auto
> 802-11-wireless.seen-bssids:            
> 802-11-wireless.hidden:                 no
> 802-11-wireless-security.key-mgmt:      wpa-psk
> 802-11-wireless-security.wep-tx-keyidx: 0
> 802-11-wireless-security.auth-alg:      --
> 802-11-wireless-security.proto:         
> 802-11-wireless-security.pairwise:      
> 802-11-wireless-security.group:         
> 802-11-wireless-security.leap-username: --
> 802-11-wireless-security.wep-key0:      <hidden>
> 802-11-wireless-security.wep-key1:      <hidden>
> 802-11-wireless-security.wep-key2:      <hidden>
> 802-11-wireless-security.wep-key3:      <hidden>
> 802-11-wireless-security.wep-key-flags: 0 (none)
> 802-11-wireless-security.wep-key-type:  0 (unknown)
> 802-11-wireless-security.psk:           <hidden>
> 802-11-wireless-security.psk-flags:     0 (none)
> 802-11-wireless-security.leap-password: <hidden>
> 802-11-wireless-security.leap-password-flags:0 (none)
> ipv4.method:                            auto
> ipv4.dns:                               
> ipv4.dns-search:                        
> ipv4.addresses:                         
> ipv4.gateway:                           --
> ipv4.routes:                            
> ipv4.route-metric:                      -1
> ipv4.ignore-auto-routes:                no
> ipv4.ignore-auto-dns:                   no
> ipv4.dhcp-client-id:                    --
> ipv4.dhcp-send-hostname:                yes
> ipv4.dhcp-hostname:                     --
> ipv4.never-default:                     no
> ipv4.may-fail:                          yes
> ipv6.method:                            auto
> ipv6.dns:                               
> ipv6.dns-search:                        
> ipv6.addresses:                         
> ipv6.gateway:                           --
> ipv6.routes:                            
> ipv6.route-metric:                      -1
> ipv6.ignore-auto-routes:                no
> ipv6.ignore-auto-dns:                   no
> ipv6.never-default:                     no
> ipv6.may-fail:                          yes
> ipv6.ip6-privacy:                       -1 (unknown)
> ipv6.dhcp-send-hostname:                yes
> ipv6.dhcp-hostname:                     --
> GENERAL.NAME:                           linksys-hed-test
> GENERAL.UUID:                           3a3fdd49-c624-42a3-acbd-
> 135f728c9621
> GENERAL.DEVICES:                        mlan0
> GENERAL.STATE:                          activated
> GENERAL.DEFAULT:                        yes
> GENERAL.DEFAULT6:                       no
> GENERAL.VPN:                            no
> GENERAL.ZONE:                           --
> GENERAL.DBUS-
> PATH:                      /org/freedesktop/NetworkManager/ActiveConn
> ection/14
> GENERAL.CON-
> PATH:                       /org/freedesktop/NetworkManager/Settings/
> 8
> GENERAL.SPEC-
> OBJECT:                    /org/freedesktop/NetworkManager/AccessPoin
> t/6717
> GENERAL.MASTER-PATH:                    --
> IP4.ADDRESS[1]:                         192.168.20.103/24
> IP4.GATEWAY:                            192.168.20.1
> IP4.DNS[1]:                             192.168.1.2
> DHCP4.OPTION[1]:                        network_number = 192.168.20.0
> DHCP4.OPTION[2]:                        dhcp_server_identifier =
> 192.168.20.1
> DHCP4.OPTION[3]:                        ifmtu = 1500
> DHCP4.OPTION[4]:                        skip_hooks = lookup-hostname
> DHCP4.OPTION[5]:                        if_up = true
> DHCP4.OPTION[6]:                        subnet_cidr = 24
> DHCP4.OPTION[7]:                        ifcarrier = up
> DHCP4.OPTION[8]:                        broadcast_address =
> 255.255.255.255
> DHCP4.OPTION[9]:                        ifmetric = 306
> DHCP4.OPTION[10]:                       dhcp_message_type = 5
> DHCP4.OPTION[11]:                       ifwireless = 1
> DHCP4.OPTION[12]:                       dhcp_lease_time = 86400
> DHCP4.OPTION[13]:                       ip_address = 192.168.20.103
> DHCP4.OPTION[14]:                       routers = 192.168.20.1
> DHCP4.OPTION[15]:                       subnet_mask = 255.255.255.0
> DHCP4.OPTION[16]:                       domain_name_servers =
> 192.168.1.2
> DHCP4.OPTION[17]:                       ifssid = linksys-hed-test
> DHCP4.OPTION[18]:                       interface_order = mlan0
> DHCP4.OPTION[19]:                       if_oneup = true
> DHCP4.OPTION[20]:                       if_ipwaited = true
> DHCP4.OPTION[21]:                       ifflags = 4163
> DHCP4.OPTION[22]:                       if_down = false
> IP6.ADDRESS[1]:                         fe80::d6ca:6eff:fe33:25e5/64
> IP6.GATEWAY:
> 
> > 
> > Also, 'iw dev mlan0 scan dump', find the block for the expected AP,
> > and
> > report that.  Feel free to replace the BSSID with xs or something
> > if you want
> > to hide it.
> 
> Here are two of the access points I have used for testing:
> 
> BSS 00:25:9c:53:2f:9e(on mlan0) -- associated
>         TSF: 2339114597780 usec (27d, 01:45:14)
>         freq: 2437
>         beacon interval: 100 TUs
>         capability: ESS Privacy ShortPreamble ShortSlotTime (0x0431)
>         signal: -40.00 dBm
>         last seen: 390 ms ago
>         SSID: linksys-hed-test
>         Supported rates: 1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 
>         DS Parameter set: channel 6
>         RSN:     * Version: 1
>                  * Group cipher: CCMP
>                  * Pairwise ciphers: CCMP
>                  * Authentication suites: PSK
>                  * Capabilities: 1-PTKSA-RC 1-GTKSA-RC (0x0000)
>         ERP: <no flags>
>         Extended supported rates: 24.0 36.0 48.0 54.0 
>         WPS:     * Version: 1.0
>                  * Wi-Fi Protected Setup State: 2 (Configured)
>                  * Response Type: 3 (AP)
>                  * UUID: 00000000-0000-1000-0000-00259c532f9e
>                  * Manufacturer: Linksys Inc.
>                  * Model: WRT54G2
>                  * Model Number: v1.5.01
>                  * Serial Number: 0
>                  * Primary Device Type: 6-0050f204-1
>                  * Device name: WRT54G2
>                  * Config methods: Label, PBC
>                  * RF Bands: 0x1
> 
> BSS 24:a4:3c:55:76:60(on mlan0)
>         TSF: 2339114597752 usec (27d, 01:45:14)
>         freq: 2412
>         beacon interval: 100 TUs
>         capability: ESS Privacy ShortPreamble ShortSlotTime (0x0431)
>         signal: -71.00 dBm
>         last seen: 390 ms ago
>         SSID: TEST-WIFI
>         Supported rates: 1.0* 2.0* 5.5* 11.0* 18.0 24.0* 36.0 54.0 
>         DS Parameter set: channel 1
>         ERP: <no flags>
>         ERP D4.0: <no flags>
>         RSN:     * Version: 1
>                  * Group cipher: CCMP
>                  * Pairwise ciphers: CCMP
>                  * Authentication suites: PSK
>                  * Capabilities: 16-PTKSA-RC 1-GTKSA-RC (0x000c)
>         Extended supported rates: 6.0* 9.0 12.0* 48.0 
>         HT capabilities:
>                 Capabilities: 0x19ad
>                         RX LDPC
>                         HT20
>                         SM Power Save disabled
>                         RX HT20 SGI
>                         TX STBC
>                         RX STBC 1-stream
>                         Max AMSDU length: 7935 bytes
>                         DSSS/CCK HT40
>                 Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
>                 Minimum RX AMPDU time spacing: 4 usec (0x05)
>                 HT RX MCS rate indexes supported: 0-23
>                 HT TX MCS rate indexes are undefined
>         HT operation:
>                  * primary channel: 1
>                  * secondary channel offset: no secondary
>                  * STA channel width: 20 MHz
>                  * RIFS: 1
>                  * HT protection: no
>                  * non-GF present: 1
>                  * OBSS non-GF present: 0
>                  * dual beacon: 0
>                  * dual CTS protection: 0
>                  * STBC beacon: 0
>                  * L-SIG TXOP Prot: 0
>                  * PCO active: 0
>                  * PCO phase: 0
>         Extended capabilities: Extended Channel Switching, 6
>         WPA:     * Version: 1
>                  * Group cipher: CCMP
>                  * Pairwise ciphers: CCMP
>                  * Authentication suites: PSK
>         WMM:     * Parameter version 1
>                  * BE: CW 15-1023, AIFSN 3
>                  * BK: CW 15-1023, AIFSN 7
>                  * VI: CW 7-15, AIFSN 2, TXOP 3008 usec
>                  * VO: CW 3-7, AIFSN 2, TXOP 1504 usec
> 
> > 
> > My best guess is a mismatch between the AP's beacon/properties and
> > the
> > connection somehow.
> > 
> > Dan
> > 
_______________________________________________
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list

Reply via email to