adamsimms
Posts: 2
Joined: Mon Nov 20, 2017 2:52 am

WiFi Stopped Connecting to Network: CTRL-EVENT-ASSOC-REJECT status_code=16

Mon Nov 20, 2017 3:45 pm

My Raspberry Pi was connecting to a WiFi network for months without issue. About a week ago it suddenly stopped and will not associate with the AP.

`iwlist wlan0 scan` shows the network is available:

Code: Select all

Cell 02 - Address: D6:D9:19:9A:00:5A
                  Channel:1
                  Frequency:2.412 GHz (Channel 1)
                   Quality=56/70  Signal level=-54 dBm  
                   Encryption key:on
                   ESSID:"DiscoPro"
                   Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s
                             11 Mb/s; 12 Mb/s; 18 Mb/s
                   Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s
                   Mode:Master
                   Extra:tsf=0000000000000000
                   Extra: Last beacon: 10650ms ago
                   IE: Unknown: 0008446973636F50726F
                   IE: Unknown: 010882848B0C12961824
                   IE: Unknown: 030101
                   IE: Unknown: 050400010000
                   IE: Unknown: 0706555320010B1E
                   IE: Unknown: 2A0100
                   IE: Unknown: 32043048606C
                   IE: Unknown: 2D1A2C0101FF00000000000000000000000000000000000000000000
                   IE: Unknown: 3D1601000000000000000000000000000000000000000000
                   IE: IEEE 802.11i/WPA2 Version 1
                       Group Cipher : CCMP
                       Pairwise Ciphers (1) : CCMP
                       Authentication Suites (1) : PSK
                   IE: Unknown: DD180050F2020101000003A4000027A4000042435E0062322F00

/etc/network/interfaces contents:

Code: Select all

# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback

iface eth0 inet manual

allow-hotplug wlan0
iface wlan0 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
wireless-power off

allow-hotplug wlan1
iface wlan1 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

/etc/wpa_supplicant/wpa_supplicant.conf contents:

Code: Select all

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
        ssid="DiscoPro"
        psk="XXXX"
}

When I run `wpa_supplicant -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf` I receive this error:

Code: Select all

Successfully initialized wpa_supplicant
wlan0: Trying to associate with d6:d9:19:9a:00:5a (SSID='DiscoPro' freq=2412 MHz)
wlan0: CTRL-EVENT-ASSOC-REJECT status_code=16
wlan0: Trying to associate with d6:d9:19:9a:00:5a (SSID='DiscoPro' freq=2412 MHz)
wlan0: CTRL-EVENT-ASSOC-REJECT status_code=16
wlan0: Trying to associate with d6:d9:19:9a:00:5a (SSID='DiscoPro' freq=2412 MHz)
wlan0: CTRL-EVENT-ASSOC-REJECT status_code=16
wlan0: Trying to associate with d6:d9:19:9a:00:5a (SSID='DiscoPro' freq=2412 MHz)
wlan0: CTRL-EVENT-ASSOC-REJECT status_code=16
wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="DiscoPro" auth_failures=1 duration=10 reason=CONN_FAILED
I do not have access to reconfigure the AP. Any suggestions would be appreciated.

seandepagnier
Posts: 24
Joined: Thu Aug 25, 2016 6:07 pm

Re: WiFi Stopped Connecting to Network: CTRL-EVENT-ASSOC-REJECT status_code=16

Wed Jun 06, 2018 2:26 pm

I fixed the problem for this by disabling wmm (comment out wmm_enabled=1) in the hostapd.conf of the access point.

This is very strange. It only prevents the rpi from connecting, and only sometimes, but I get the exact same CTRL-EVENT-ASSOC-REJECT status_code=16

So I think it's a problem with the raspberry wifi if the access point uses wmm. But then if the access point is a raspberry pi, with the same usb wifi dongle it works. I only have this problem when the access point is an orange pi zero! Even with identical hostapd.conf.

So I disable wmm in hostapd.conf on the orangepi zero and it is ok now. I don't need to disable wmm if a raspberry pi zero is the host. It has to be something with software there. I have no idea why it works, and the usb wifi dongle is edimax in both cases.

Other devices connect to the orange pi zero AP just fine either way, and the raspberry connects with a usb dongle. only the raspberry is prevented to connect using the builtin wifi of the raspberry.

afolarin
Posts: 1
Joined: Sun Jan 05, 2020 11:27 pm

Re: WiFi Stopped Connecting to Network: CTRL-EVENT-ASSOC-REJECT status_code=16

Sun Jan 05, 2020 11:30 pm

After a lot of digging I came accross this bug report

I confirm that the problem was resolved after forcing the router to change to different channel, currently, my router is configured to optimise the channel for 2.4GHz so probably was straying periodically into an incompatible channel ... :roll:

https://community.mycroft.ai/t/bug-conf ... -13/3798/3

grundyoso
Posts: 2
Joined: Sat Dec 29, 2018 11:28 am

Re: WiFi Stopped Connecting to Network: CTRL-EVENT-ASSOC-REJECT status_code=16

Tue Feb 04, 2020 1:19 pm

@afolarin .. thanks for sharing that bug report... it was the clue I needed to break through the issue I was having... the story goes that I work on a lot of Pi Zero W units and they've all been pretty reliable. I had one unit recently start to not connect over Wifi all of a sudden. The same rootfs / sdcard connects fine in other Pi Zero W but not in this one unit. It kept giving me the `CTRL-EVENT-ASSOC-REJECT status_code=16` in wpa_supplicant logs. The only peculiar thing about this unit is that I recently took it with me to Swizterland where I was working with it on a Wifi network there. Now that I returned to the USA a couple days ago it started giving me this connection trouble. After reviewing this thread, I suspected my Wifi setup was still trying to use channels 12/13... I ran wpa_supplicant for a while to see if the cache would flush or something... eventually it did and now the Pi Zero W seems to connect to my USA environment on reboot as it had before. Figured I'd share the story in case it helps someone else.

claymore666
Posts: 2
Joined: Thu Dec 03, 2020 2:17 pm

Re: WiFi Stopped Connecting to Network: CTRL-EVENT-ASSOC-REJECT status_code=16

Thu Dec 03, 2020 3:00 pm

I has this issue myself from one day to another and the root cause was I was using the other HDMI jack. :D
Issue and solution described here: viewtopic.php?t=274715
Fixed my problem.

Return to “Troubleshooting”