Re: Cannot maintain an ap with brcmfmac

Arend Van Spriel <[email protected]>
Newsgroups dev.linux.lists.brcm80211,org.kernel.vger.linux-kernel,org.kernel.vger.linux-wireless
Message-ID <[email protected]>
On April 20, 2025 8:15:56 PM KeithG <[email protected]> wrote:

> Group,
>
> I do not really know what has changed, but I

Can you try to find out?

> can no longer maintain an
> ap runnning with brcmfmac on my Pis with the brcmfmac43455 chip. The
> firmware is current (and ahead of what RPiOS ships):

Maybe you could try with what RPiOS ships.

> [    3.472501] brcmfmac: F1 signature read @0x18000000=0x15264345
> [    3.493274] brcmfmac: brcmf_fw_alloc_request: using
> brcm/brcmfmac43455-sdio for chip BCM4345/6
> [    3.494583] usbcore: registered new interface driver brcmfmac
> [    3.900038] brcmfmac: brcmf_c_process_txcap_blob: no txcap_blob
> available (err=-2)
> [    3.901161] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6
> wl0: Oct 28 2024 23:27:00 version 7.45.286 (be70ab3 CY) FWID
> 01-95efe7fa
>
> I get this with the default RPiOS verison of hostapd:
> # hostapd -v
> hostapd v2.10
> User space daemon for IEEE 802.11 AP management,
> IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
> Copyright (c) 2002-2022, Jouni Malinen <[email protected]> and contributors
>
> And also with the one I built from source. The latest hostapd I could find.
> The git repo it is built from is from here: https://w1.fi/hostapd/
>
> # hostapd -v
> hostapd v2.11-hostap_2_11+
> User space daemon for IEEE 802.11 AP management,
> IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
> Copyright (c) 2002-2024, Jouni Malinen <[email protected]> and contributors
>
> My hostapd.conf is:
> # cat /etc/hostapd/hostapd.conf
> # interface and driver
> interface=ap0
> driver=nl80211
>
> ht_capab=[HT40][SHORT-GI-20][DSSS_CCK-40]
>
> # WIFI-Config
> ssid=TestAP
> channel=6
> hw_mode=g
> wmm_enabled=1
> macaddr_acl=0
> auth_algs=1
> max_num_sta=10
>
> # WIFI authorization
> wpa=2
> wpa_key_mgmt=WPA-PSK
> wpa_pairwise=TKIP CCMP
> rsn_pairwise=CCMP
> wpa_psk_radius=0
> wpa_passphrase=secret123
>
> If there is something wrong in my setup, let me know.

Hard to tell. The above looks okay, but no idea what your setup looks like.

> when I start hostapd with dnsmasq, an interface comes up and I can
> connect. As soon as it connects, it disconnects:
> Apr 20 12:57:39 pi4 systemd-networkd[181]: ap0: Gained carrier
> Apr 20 12:57:39 pi4 dnsmasq[169728]: started, version 2.90 cachesize 150
> Apr 20 12:57:39 pi4 dnsmasq[169728]: compile time options: IPv6
> GNU-getopt DBus no-UBus i18n IDN2 DHCP DHCPv6 no-Lua TFTP conntrack
> ipset nftset auth cryptohash DNSSEC loop-detect inotify dumpfile
> Apr 20 12:57:39 pi4 dnsmasq[169728]: warning: interface ap0 does not
> currently exist

So does this mean you run with two wifi interfaces, ie. wlan0 and ap0? Can 
you try with just only an AP interface?

> Apr 20 12:57:39 pi4 dnsmasq-dhcp[169728]: DHCP, IP range 192.168.5.2
> -- 192.168.5.254, lease time 1d
> Apr 20 12:57:39 pi4 dnsmasq[169728]: reading /run/systemd/resolve/resolv.conf
> Apr 20 12:57:39 pi4 dnsmasq[169728]: using nameserver 192.168.2.253#53
> Apr 20 12:57:39 pi4 dnsmasq[169728]: read /etc/hosts - 8 names
> Apr 20 12:57:39 pi4 hostapd[169681]: ap0: interface state 
> UNINITIALIZED->ENABLED
> Apr 20 12:57:39 pi4 hostapd[169681]: ap0: AP-ENABLED
> Apr 20 12:57:39 pi4 resolvconf[169735]: Dropped protocol specifier
> '.dnsmasq' from 'lo.dnsmasq'. Using 'lo' (ifindex=1).
> Apr 20 12:57:39 pi4 resolvconf[169735]: Failed to set DNS
> configuration: Link lo is loopback device.
> Apr 20 12:57:39 pi4 systemd[1]: Started dnsmasq.service - dnsmasq - A
> lightweight DHCP and caching DNS server.
> Apr 20 12:57:40 pi4 kernel: brcmfmac: brcmf_cfg80211_set_power_mgmt:
> power save disabled
> Apr 20 12:57:48 pi4 kernel: ieee80211 phy0: brcmf_escan_timeout: timer expired
> Apr 20 12:57:48 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
> 802.11: associated
> Apr 20 12:57:48 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
> 802.11: associated
> Apr 20 12:57:48 pi4 hostapd[169681]: ap0: AP-STA-CONNECTED 50:84:92:a6:7a:7a
> Apr 20 12:57:48 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a
> RADIUS: starting accounting session 4336779F2221A786
> Apr 20 12:57:48 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a WPA:
> pairwise key handshake completed (RSN)
> Apr 20 12:57:48 pi4 hostapd[169681]: ap0: EAPOL-4WAY-HS-COMPLETED
> 50:84:92:a6:7a:7a
> Apr 20 12:57:48 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a
> RADIUS: starting accounting session 4336779F2221A786
> Apr 20 12:57:48 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a WPA:
> pairwise key handshake completed (RSN)

So looks like connection and security are setup correctly...
> Apr 20 12:57:48 pi4 dnsmasq-dhcp[169728]: DHCPDISCOVER(ap0) 50:84:92:a6:7a:7a
> Apr 20 12:57:48 pi4 dnsmasq-dhcp[169728]: DHCPOFFER(ap0) 192.168.5.214
> 50:84:92:a6:7a:7a
> Apr 20 12:57:48 pi4 dnsmasq-dhcp[169728]: DHCPREQUEST(ap0)
> 192.168.5.214 50:84:92:a6:7a:7a
> Apr 20 12:57:48 pi4 dnsmasq-dhcp[169728]: DHCPACK(ap0) 192.168.5.214
> 50:84:92:a6:7a:7a

...and DHCP exchange is okay, which clearly indicated encrypted data 
connection is working.

> Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
> 802.11: disassociated
> Apr 20 12:57:52 pi4 hostapd[169681]: ap0: AP-STA-DISCONNECTED 50:84:92:a6:7a:7a
> Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
> 802.11: disassociated
> Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
> 802.11: disassociated
> Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
> 802.11: disassociated
> Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
> 802.11: disassociated
> Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
> 802.11: disassociated

So not clear what triggers these disassociated events. Can you enable debug 
prints in brcmfmac, ie. use debug=0x100400? The levels are defined in 
debug.h [1]

> Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
> 802.11: associated
> Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
> 802.11: associated
> Apr 20 12:57:52 pi4 hostapd[169681]: ap0: AP-STA-CONNECTED 50:84:92:a6:7a:7a
> Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a
> RADIUS: starting accounting session 33CFF844DBBE630F
> Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a WPA:
> pairwise key handshake completed (RSN)
> Apr 20 12:57:52 pi4 hostapd[169681]: ap0: EAPOL-4WAY-HS-COMPLETED
> 50:84:92:a6:7a:7a
> Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a
> RADIUS: starting accounting session 33CFF844DBBE630F
> Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a WPA:
> pairwise key handshake completed (RSN)
> Apr 20 12:57:52 pi4 dnsmasq-dhcp[169728]: DHCPDISCOVER(ap0) 50:84:92:a6:7a:7a
> Apr 20 12:57:52 pi4 dnsmasq-dhcp[169728]: DHCPOFFER(ap0) 192.168.5.214
> 50:84:92:a6:7a:7a
> Apr 20 12:57:52 pi4 dnsmasq-dhcp[169728]: DHCPREQUEST(ap0)
> 192.168.5.214 50:84:92:a6:7a:7a
> Apr 20 12:57:52 pi4 dnsmasq-dhcp[169728]: DHCPACK(ap0) 192.168.5.214
> 50:84:92:a6:7a:7a
> Apr 20 12:57:57 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
> 802.11: disassociated
> Apr 20 12:57:57 pi4 hostapd[169681]: ap0: AP-STA-DISCONNECTED 50:84:92:a6:7a:7a
> Apr 20 12:57:57 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
> 802.11: disassociated
> Apr 20 12:57:57 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
> 802.11: disassociated
> Apr 20 12:57:57 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
> 802.11: disassociated
> Apr 20 12:58:11 pi4 hostapd[169681]: ap0: interface state ENABLED->DISABLED
> Apr 20 12:58:11 pi4 systemd[1]: Stopping hostapd.service - Hostapd
> IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator...

Assuming it is stopped manually here. Correct?

Regards,
Arend

[1] 
https://elixir.bootlin.com/linux/v6.14.3/source/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.