WLAN problem: (wlan0/wireless): association took too long, failing activation

I have a laptop with a

  • Intel Corporation Wireless 3160 (rev 83); Firmare version 25.17.12.0

I see the WLAN and I can enter my password. Despite repeated entry of the password and visual inspection of the password, no connection is established.

There is no MAC filtering on the router and all (new) devices are allowed.

I have installed the firmware from Linux Wireless, before I tested the network with the firmware of the Ubuntu installation.

How can I solve the problem?


Update 2015-05-30 22:34

I have created a hotspot with my smartphone. Same problem.


Update 2015-05-30 23:20

IPv6 disabled, same problem

$ cat /proc/sys/net/ipv6/conf/all/disable_ipv6
1

$ ip a | grep inet6
*no output*

Update 2015-05-31 17:26

$ journalctl -u NetworkManager
Mai 31 17:25:11 fizban NetworkManager[692]: <info> Activation (wlan0) starting connection 'Dragonlance'
Mai 31 17:25:11 fizban NetworkManager[692]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) scheduled...
Mai 31 17:25:11 fizban NetworkManager[692]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) started...
Mai 31 17:25:11 fizban NetworkManager[692]: <info> (wlan0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
Mai 31 17:25:11 fizban NetworkManager[692]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) scheduled...
Mai 31 17:25:11 fizban NetworkManager[692]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) complete.
Mai 31 17:25:11 fizban NetworkManager[692]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) starting...
Mai 31 17:25:11 fizban NetworkManager[692]: <info> (wlan0): device state change: prepare -> config (reason 'none') [40 50 0]
Mai 31 17:25:11 fizban NetworkManager[692]: <info> Activation (wlan0/wireless): access point 'Dragonlance' has security, but secrets are required.
Mai 31 17:25:11 fizban NetworkManager[692]: <info> (wlan0): device state change: config -> need-auth (reason 'none') [50 60 0]
Mai 31 17:25:11 fizban NetworkManager[692]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) complete.
Mai 31 17:25:11 fizban NetworkManager[692]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) scheduled...
Mai 31 17:25:11 fizban NetworkManager[692]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) started...
Mai 31 17:25:11 fizban NetworkManager[692]: <info> (wlan0): device state change: need-auth -> prepare (reason 'none') [60 40 0]
Mai 31 17:25:11 fizban NetworkManager[692]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) scheduled...
Mai 31 17:25:11 fizban NetworkManager[692]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) complete.
Mai 31 17:25:11 fizban NetworkManager[692]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) starting...
Mai 31 17:25:11 fizban NetworkManager[692]: <info> (wlan0): device state change: prepare -> config (reason 'none') [40 50 0]
Mai 31 17:25:11 fizban NetworkManager[692]: <info> Activation (wlan0/wireless): connection 'Dragonlance' has security, and secrets exist.  No new secrets needed.
Mai 31 17:25:11 fizban NetworkManager[692]: <info> Config: added 'ssid' value 'Dragonlance'
Mai 31 17:25:11 fizban NetworkManager[692]: <info> Config: added 'scan_ssid' value '1'
Mai 31 17:25:11 fizban NetworkManager[692]: <info> Config: added 'key_mgmt' value 'WPA-PSK'
Mai 31 17:25:11 fizban NetworkManager[692]: <info> Config: added 'psk' value '<omitted>'
Mai 31 17:25:11 fizban NetworkManager[692]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) complete.
Mai 31 17:25:11 fizban NetworkManager[692]: <warn> Couldn't disconnect supplicant interface: This interface is not connected.
Mai 31 17:25:11 fizban NetworkManager[692]: <warn> Couldn't disconnect supplicant interface: This interface is not connected.
Mai 31 17:25:11 fizban NetworkManager[692]: <info> Config: set interface ap_scan to 1
Mai 31 17:25:36 fizban NetworkManager[692]: <warn> Activation (wlan0/wireless): association took too long, failing activation.
Mai 31 17:25:36 fizban NetworkManager[692]: <info> (wlan0): device state change: config -> failed (reason 'ssid-not-found') [50 120 53]
Mai 31 17:25:36 fizban NetworkManager[692]: <warn> Activation (wlan0) failed for connection 'Dragonlance'
Mai 31 17:25:36 fizban NetworkManager[692]: <info> (wlan0): device state change: failed -> disconnected (reason 'none') [120 30 0]
Mai 31 17:25:36 fizban NetworkManager[692]: <info> (wlan0): deactivating device (reason 'none') [0]
Mai 31 17:25:36 fizban NetworkManager[692]: (NetworkManager:692): GLib-CRITICAL **: Source ID 503 was not found when attempting to remove it
Mai 31 17:25:36 fizban NetworkManager[692]: <info> (wlan0): supplicant interface state: scanning -> disconnected
Mai 31 17:25:36 fizban NetworkManager[692]: <warn> Couldn't disconnect supplicant interface: This interface is not connected.

More details:

$ lspci
00:00.0 Host bridge: Intel Corporation Atom Processor Z36xxx/Z37xxx Series SoC Transaction Register (rev 0e)
00:02.0 VGA compatible controller: Intel Corporation Atom Processor Z36xxx/Z37xxx Series Graphics & Display (rev 0e)
00:13.0 SATA controller: Intel Corporation Device 0f23 (rev 0e)
00:14.0 USB controller: Intel Corporation Atom Processor Z36xxx/Z37xxx Series USB xHCI (rev 0e)
00:1a.0 Encryption controller: Intel Corporation Atom Processor Z36xxx/Z37xxx Series Trusted Execution Engine (rev 0e)
00:1b.0 Audio device: Intel Corporation Atom Processor Z36xxx/Z37xxx Series High Definition Audio Controller (rev 0e)
00:1c.0 PCI bridge: Intel Corporation Device 0f48 (rev 0e)
00:1c.1 PCI bridge: Intel Corporation Device 0f4a (rev 0e)
00:1f.0 ISA bridge: Intel Corporation Atom Processor Z36xxx/Z37xxx Series Power Control Unit (rev 0e)
00:1f.3 SMBus: Intel Corporation Device 0f12 (rev 0e)
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)
02:00.0 Network controller: Intel Corporation Wireless 3160 (rev 83)

The firmare version is 25.17.12.0

$ dmesg | grep iwlwifi
[   15.853182] iwlwifi 0000:02:00.0: loaded firmware version 25.17.12.0 op_mode iwlmvm

The module is loaded

$ lsmod | grep iwlwifi
iwlwifi               196608  1 iwlmvm
cfg80211              540672  3 iwlwifi,mac80211,iwlmvm

Kernel version

$ uname -r
3.19.0-18-generic

Solution 1:

I had a similar problem: My AP (running OpenWRT – less issues with other APs) appeared rarely in the scans and association attempts failed most of the time with "association took too long, failing activation" ... "ssid-not-found", though after several minutes/attempts it usually did connect. I have a Intel 8265 wifi card (though I don't know if the device matters).

For reasons I do not understand NetworkManager's MAC address randomization feature – which is by default on for scanning – caused the problem. To fix it create a file /etc/NetworkManager/conf.d/30-mac-randomization.conf that disables the feature:

[device-mac-randomization]
wifi.scan-rand-mac-address=no

... followed by sudo systemctl restart NetworkManager

UPDATE: After running for several days with wifi.scan-rand-mac-address=no my AP sometimes still takes several scans to shop up. But then at least association always works.

Found here: https://blogs.gnome.org/thaller/2016/08/26/mac-address-spoofing-in-networkmanager-1-4-0/ Docs: https://developer.gnome.org/NetworkManager/stable/NetworkManager.conf.html

Solution 2:

From your wireless debug, I would:

  • Deactivate IPV6 on your router (or update the router's firmware)
  • Deactivate 802.11N on your router (or update the router's firmware)