0

My raspberry pi 3b (running jessie) fails to connect to wifi.

It can scan the networks, and finds all nearby wifi SSIDs. When i try to connect and enter the password, nothing happens (credentials are correct 100%).

I've tried using the same SD card onto another rpi, and not had this issue, which is why i think it must be a hardware issue.

Also, ifconfig shows:

wlan0     Link encap:Ethernet  HWaddr b8:27:eb:0f:b9:7a  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:1526 errors:0 dropped:1526 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:341915 (333.9 KiB)  TX bytes:0 (0.0 B)

RX packets:1526 errors:0 dropped:1526 seems strange to me, right? Is it just broken? Or am i missing something?

I've tried using the same SD card, and same power supply on other RPIs and not had this problem.

Also worth saying that i have 4 routers here which i can use. The same problem is happening when connecting to any of them.

As suggested by ingo i looked at the journal using journaltctl -e -b. Below are some extracts that may be relevant.

Dec 09 12:23:06 raspberrypi kernel: brcmfmac: brcmf_add_if: ERROR: netdev:wlan0 already exists
Dec 09 12:23:06 raspberrypi kernel: brcmfmac: brcmf_add_if: ignore IF event
Dec 09 12:23:06 raspberrypi kernel: IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
Dec 09 12:23:06 raspberrypi kernel: brcmfmac: power management disabled
Dec 09 12:23:06 raspberrypi networking[271]: Configuring network interfaces...done.
Dec 09 12:23:07 raspberrypi systemd[1]: Started LSB: Raise network interfaces..
Dec 09 12:23:07 raspberrypi systemd[1]: Starting ifup for wlan0...
Dec 09 12:23:07 raspberrypi systemd[1]: Started ifup for wlan0.
Dec 09 12:23:07 raspberrypi wpa_supplicant[422]: Successfully initialized wpa_supplicant


Dec 09 12:23:12 raspberrypi kernel: brcmfmac: brcmf_sdio_hdparse: seq 166: sequence number error, expect 165
Dec 09 12:23:12 raspberrypi kernel: brcmfmac: brcmf_sdio_hdparse: seq 165: sequence number error, expect 167
Dec 09 12:23:12 raspberrypi kernel: brcmfmac: brcmf_sdio_hdparse: seq 167: sequence number error, expect 166


Dec 09 12:24:33 raspberrypi wpa_supplicant[435]: wlan0: Trying to associate with SSID 'Vodafone ML4G 1844'
Dec 09 12:24:33 raspberrypi wpa_supplicant[435]: wlan0: CTRL-EVENT-ASSOC-REJECT status_code=16
Dec 09 12:24:34 raspberrypi wpa_supplicant[435]: wlan0: Trying to associate with SSID 'Vodafone ML4G 1844'
Dec 09 12:24:35 raspberrypi wpa_supplicant[435]: wlan0: CTRL-EVENT-ASSOC-REJECT status_code=16
Dec 09 12:24:36 raspberrypi wpa_supplicant[435]: wlan0: Trying to associate with SSID 'Vodafone ML4G 1844'
Dec 09 12:24:37 raspberrypi wpa_supplicant[435]: wlan0: CTRL-EVENT-ASSOC-REJECT status_code=16
Dec 09 12:24:38 raspberrypi wpa_supplicant[435]: wlan0: Trying to associate with SSID 'Vodafone ML4G 1844'
Dec 09 12:24:39 raspberrypi wpa_supplicant[435]: wlan0: CTRL-EVENT-ASSOC-REJECT status_code=16
Dec 09 12:24:39 raspberrypi wpa_supplicant[435]: wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=1 ssid="Vodafone ML4G 1844" auth_failures=1 duration=10 reason=CONN_FAILED

Just looked for anything including wlan0 or brcmfmac.

9
  • Usually these problems are caused by software configuration errors or a weedy power supply. If you've got a wall wart that give 5.1V @ 2.5A you can assume it's a software configuration error. Otherwise get a better power supply.
    – Dougie
    Dec 7, 2018 at 10:17
  • i've tried using the same SD card with the same power supply over 3 other RPI and not had this problem. Dec 7, 2018 at 11:04
  • Start with a fresh copy of Raspbian 2018-11-13 on a new SDCard and the power supply from one of your other raspberries. Does that work? Swap back to the regular power supply, does that work?
    – Dougie
    Dec 7, 2018 at 12:01
  • Does all RasPis are RPi 3B? Does the output of the command sudo iw phy is identical on all RasPis? Please address me with @Ingo, otherwise I won't see your reply.
    – Ingo
    Dec 7, 2018 at 16:53
  • @Dougie It's just 1 power supply i've been testing on all (official one for RPB 3B). a fresh install does not solve the issue unfortunately. Dec 11, 2018 at 11:18

2 Answers 2

2

The curious is that the same SD Card runs on other RPi 3B without any issue. So we have to look for differences on the hardware. The annoying is that the wifi driver brcmfmac is closed source and you do not get good information about it. I have done a quick search on google with looking for brcmfmac sequence number error and wpa_supplicant CTRL-EVENT-ASSOC-REJECT. This give me some ideas what could be wrong.

The sequence issue is more a warning but an error, it can occur on heavy load but also on a weak connection because of distance to the access point. Look at the other working RasPis if you see the same warnings. There may be a different hardware environment on the same RPi 3B, e.g. a cheep audio HAT or any other HAT that interfere with wifi. It was told that there is used a cheep wifi chip on the RasPi and the driver was buggy. You are using Raspbian Jessie that uses older wifi driver. Just flash a Raspbian Stretch Lite and try wifi. It has updated wifi driver. Other user just use a USB/wifi dongle instead of the built-in wifi when they encounter problems.

1

I encountered the same behavior from wpa_supplicant on a RPI 3A+ with Raspios bullseye (2022-09-22-raspios-bullseye-arm64-lite.img.xz), i.e:

sudo wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0
Successfully initialized wpa_supplicant
wlan0: Trying to associate with **:**:**:**:**:** (SSID='foo' freq=2417 MHz)
wlan0: CTRL-EVENT-ASSOC-REJECT bssid=**:**:**:**:**:** status_code=16
wlan0: Trying to associate with **:**:**:**:**:** (SSID='foo' freq=2417 MHz)
wlan0: CTRL-EVENT-ASSOC-REJECT bssid=**:**:**:**:**:** status_code=16
wlan0: Trying to associate with **:**:**:**:**:** (SSID='foo' freq=2417 MHz)
wlan0: CTRL-EVENT-ASSOC-REJECT bssid=**:**:**:**:**:** status_code=16
[etc]

After a LOT of troubleshooting and tests, I stumbled on this bug report :

https://bugs.launchpad.net/raspbian/+bug/1929746 (mirror)and the solution suggested in the post resolved the issue instantly, i.e :

I was able to resolve the issue by loading the brcmfmac driver with the following parameters :

rmmod brcmfmac  
modprobe brcmfmac roamoff=1 feature_disable=0x82000  

This disables the SAE (WPA3 related) and SWSUP (authentication offloading into the firmware), and fast roaming.

To make this setting persistent, you can create a file with these options in '/etc/modprobe.d', e.g ;

echo 'options brcmfmac roamoff=1 feature_disable=0x82000' | sudo tee /etc/modprobe.d/brcmfmac.conf

This will make sure the settings are applied when the driver loads.

The 3A+ is equipped with a BCM4345 chipset and I believe the RPI 4 too if the symlinks are to be trusted, so this also solved wifi issues on the RPI 4 in my case.

ls -lah /usr/lib/firmware/brcm/ | grep 4-model
lrwxrwxrwx  1 root root   31 Oct 31 14:31 brcmfmac43455-sdio.raspberrypi,4-model-b.bin -> ../cypress/cyfmac43455-sdio.bin
lrwxrwxrwx  1 root root   36 Oct 31 14:31 brcmfmac43455-sdio.raspberrypi,4-model-b.clm_blob -> ../cypress/cyfmac43455-sdio.clm_blob
lrwxrwxrwx  1 root root   22 Oct 31 14:31 brcmfmac43455-sdio.raspberrypi,4-model-b.txt -> brcmfmac43455-sdio.txt

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.