Pi 4B (BCM4345/6): 7.45.286 misses WPA2 group-key rekeys and then cannot rejoin; 7.45.265 recovers

Aperta
#7,806 9 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
42/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
c, linux
Ambito
networking

Direzione di ricerca

Start with the brcmfmac driver and firmware change associated with the move from 7.45.265 to 7.45.286; the issue does not name specific source files or tests. Compare driver and firmware logs around the missed GTK rekey and failed reconnect, then investigate why AP replies stop reaching the host. Done means identifying a reproducible cause and a fix that restores rekey handling and reconnection.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Wifi Issue
Describe the bug

A Pi 4B on a WPA2-PSK (CCMP) network sometimes fails to answer the AP's hourly
group-key (GTK) rekey. The AP retries the group-key message 1 four times, gets no
reply and deauthenticates the Pi. The Pi does not notice for about 35 s. During
that time the AP logs its frames as class-2 errors and sends a deauth every 10 s.
The kernel logs no brcmfmac error in this window.

The firmware version decides what happens next:

  • 7.45.265 (firmware-brcm80211 1:20260519-1~bpo13+1+rpt2): wpa_supplicant
    rejoins on its own, within seconds to about 15 minutes.
  • 7.45.286 (rpt3): the Pi often cannot rejoin. Each auth or association
    attempt ends in CTRL-EVENT-ASSOC-REJECT bssid=00:00:00:00:00:00 status_code=16
    or Authentication ... timed out. The AP log shows it received each
    auth_req, sent auth_rsp, and in one case accepted the association and sent
    EAPOL-Key M1 four times. So frames from the Pi reach the AP, but the AP's
    frames are not delivered to the host. Unloading and reloading brcmfmac on
    7.45.286 does not help. Reloading onto 7.45.265 rejoined in 17 s.
    NetworkManager ends in failed (reason 'no-secrets'), and on a headless,
    Wi-Fi-only board that state needs manual recovery.

The same 7.45.286 build also fails a fresh join right after the module loads:
12 attempts over 3 min 13 s, all status 16, before one connected.

Missed rekeys in our logs (AP rekeys every 3600 s):

firmware rekeys missed
7.45.265 (rpt2), before upgrading ~64 3
7.45.286 (rpt3) 13 3
7.45.265 (rpt2), after rolling back 18 0

So 7.45.265 also misses occasionally, but recovers. 7.45.286 misses more often
and does not recover.

This board normally uses Wi-Fi only as a fallback: its default route is over
eth0, so wlan0 receives but sends almost nothing. To rule that out as the
trigger, we ran 7.45.286 with ping -I wlan0 -i 10 <gateway> running. It still
missed a rekey (1 of 7) and then could not rejoin. A Wi-Fi-only Pi 4 should be
just as exposed.

Steps to reproduce the behaviour
  1. Pi 4B, Raspberry Pi OS trixie, kernel 6.18.60+rpt-rpi-v8, firmware-brcm80211
    1:20260519-1~bpo13+1+rpt3 (BCM4345/6 7.45.286). NetworkManager, WPA2-PSK
    (CCMP) on 5 GHz ch36 (40 MHz). Power save off (iw dev wlan0 get power_save:
    off).
  2. AP with an hourly group rekey (wpa_group_rekey=3600; ours is a UniFi
    nanoHD, firmware 6.7.57, hostapd-based). The signal at the Pi is
    -45 to -63 dBm.
  3. Leave it running and watch
    journalctl -u wpa_supplicant | grep "Group rekeying completed", which
    normally logs once an hour. An hour with no line is a miss. On 7.45.286 we
    saw about 1 miss per 3 to 7 rekeys.
  4. After a miss, watch the reconnect: status 16 rejects with bssid 00:00:...,
    then NM no-secrets.
  5. For comparison, roll back to rpt2: run modprobe -r brcmfmac_cyw brcmfmac,
    install the rpt2 .bin, then modprobe brcmfmac. It rejoins at once, and
    misses are rare and self-healing.

Other clients on the same radio (including a BCM4345/9 board on Radxa's
7.45.96 firmware) stayed connected through the hours the Pi missed. In the
AP log we hold for 17:01 to 19:10 that day, the Pi is the only client with a
group-key failure.

Device (s)

Raspberry Pi 4 Mod. B

System
  • Board: Raspberry Pi 4 Model B Rev 1.1
  • /etc/rpi-issue: Raspberry Pi reference 2026-04-13 (pi-gen b80caf53, stage4); Debian 13 trixie
  • vcgencmd version: Sep 14 2026 14:49:30, version a86983925695a7e63166327d7c002d64040ed31d (clean) (release) (start)
  • uname -a: Linux 6.18.60+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.18.60-1+rpt1 (2026-11-03) aarch64
  • wpasupplicant 2:2.10-24+rpt3, network-manager 1.52.1-1+rpt4
  • Wi-Fi firmware:
    • bad: Firmware: BCM4345/6 wl0: Oct 28 2024 23:27:00 version 7.45.286 (be70ab3 CY) FWID 01-95efe7fa
      (cyfmac43455-sdio-standard.bin md5 4e3074e402f4ea3814a2d810ba9504b0)
    • good: Firmware: BCM4345/6 wl0: Aug 29 2023 01:47:08 version 7.45.265 (28bca26 CY) FWID 01-b677b91b
      (md5 64410bcb1364a794ce4946bc40c7998f)
  • Regulatory: country US: DFS-FCC
Logs

Times are local (UTC-6), and both clocks are NTP-synced. <pi> = the Pi's MAC,
<ap5> / <ap24> = the AP's 5 GHz / 2.4 GHz BSSIDs.

A missed rekey (7.45.286, with the ping running). The Pi's last completed rekey:

17:39:49 wpa_supplicant: wlan0: WPA: Group rekeying completed with <ap5> [GTK=CCMP]

AP, an hour later (the AP driver labels the group-key message "M4"):

18:39:49 rai0: Send EAPOL-Key M4, DA=<pi>, SA=<ap5>, len=145
18:39:50 rai0: Send EAPOL-Key M4, DA=<pi>, SA=<ap5>, len=145
18:39:51 rai0: Send EAPOL-Key M4, DA=<pi>, SA=<ap5>, len=145
18:39:52 rai0: Send EAPOL-Key M4, DA=<pi>, SA=<ap5>, len=145
18:39:53 hostapd: rai0: STA <pi> WPA: group key handshake failed (RSN) after 4 tries
18:39:53 MlmeDeAuthAction: Send DEAUTH frame with ReasonCode(2) to <pi>
18:39:57 (APCls2errAction)AUTH - Class 2 error, A2(<pi>) Send DEAUTH frame ... reason:6
18:40:08 (APCls2errAction)AUTH - Class 2 error ... reason:6
18:40:18 (APCls2errAction)AUTH - Class 2 error ... reason:6
18:40:28 (APCls2errAction)AUTH - Class 2 error ... reason:6

Pi: nothing between 17:39:49 and

18:40:28 wpa_supplicant: wlan0: CTRL-EVENT-DISCONNECTED bssid=<ap5> reason=6

The kernel log (journalctl -k) has nothing from brcmfmac between 18:38 and 18:58.

The failed rejoin (7.45.286). It briefly joined 2.4 GHz, then tried to move
back to 5 GHz. Pi:

18:45:35 wlan0: Trying to associate with <ap5> (SSID='…' freq=5180 MHz)
18:45:45 wlan0: Authentication with <ap5> timed out.
18:46:12 wlan0: Trying to associate with <ap5> (SSID='…' freq=5180 MHz)
18:46:12 wlan0: CTRL-EVENT-ASSOC-REJECT bssid=<ap24> status_code=16
...
18:47:09 wlan0: CTRL-EVENT-ASSOC-REJECT bssid=00:00:00:00:00:00 status_code=16
18:48:37 wlan0: CTRL-EVENT-ASSOC-REJECT bssid=00:00:00:00:00:00 status_code=16
(repeats until the driver is reloaded onto 7.45.265 at 18:59; a reload onto 7.45.286 at 18:55 did not help)

AP, same seconds:

18:45:35 rai0:[recv auth_req] TA:[<pi>] ... status=0, rssi=-63
18:45:35 rai0:[send auth_rsp] RA:[<pi>] ... status=0
18:46:12 rai0:[recv auth_req] TA:[<pi>] ... status=0, rssi=-63
18:46:12 rai0:[send auth_rsp] RA:[<pi>] ... status=0
18:46:12 hostapd: rai0: STA <pi> IEEE 802.11: associated
18:46:12 rai0:[send assoc_rsp]. RA:[<pi>] status=0, aid=8
18:46:12 rai0: Send EAPOL-Key M1, DA=<pi>, len=113
18:46:13 rai0: Send EAPOL-Key M1, DA=<pi>, len=113
18:46:14 rai0: Send EAPOL-Key M1, DA=<pi>, len=113
18:46:15 rai0: Send EAPOL-Key M1, DA=<pi>, len=113
18:46:16 hostapd: rai0: STA <pi> IEEE 802.11: disassociated

After reloading onto 7.45.265:

18:59:30 brcmfmac: ... Firmware: BCM4345/6 wl0: Aug 29 2023 ... version 7.45.265
18:59:36 wlan0: WPA: Key negotiation completed with <ap5> [PTK=CCMP GTK=CCMP]
18:59:36 wlan0: CTRL-EVENT-CONNECTED - Connection to <ap5> completed
Additional context
  • In every case the AP shows the Pi's own frames arriving (auth_req,
    assoc_req, class-2 data frames), but the Pi's host side never sees the AP's
    replies: group-key M1, deauth, auth_rsp, assoc_rsp, EAPOL M1. That points at
    frames from the AP not reaching the host after the miss, and on 7.45.286 the
    firmware does not recover from that state.
  • Power save is off. brcmfmac options are only the stock
    /usr/lib/modprobe.d/rpi-brcmfmac.conf (roamoff=1 feature_disable=0x282000).
    It is WPA2-PSK only: no SAE or WPA3, and no PMF required.
  • We looked for an existing report. The 7.45.286 reports we found involve
    WPA3/SAE or AP mode (#7634, #7528, #7730, #7358, #7359, and
    RPi-Distro/firmware-nonfree#49), and none is a WPA2 station missing group
    rekeys.
  • We are staying on rpt2 (apt-mark hold firmware-brcm80211). We can run
    wpa_supplicant -dd or a brcmfmac debug level if that would help. Misses are
    hourly-aligned, so a capture window is easy to pick.
Lingua principale
C
Stelle
13.4k
Fork
5.5k
Merge medio
1g 8h
PR unite (30g)
37

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di raspberrypi/linux

Tutte le issue di raspberrypi/linux

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.