Re: brcmfmac disconnects when iwd scans

KeithG <[email protected]> Tue, 24 Jun 2025 12:21:06 -0500
Newsgroups dev.linux.lists.iwd
Message-ID <CAG17S_NuBvCbNd_FKUTP3SpShExiE4Z1Bx+zDPkfTe_ht3o86Q@mail.gmail.com>
On Thu, Jun 12, 2025 at 12:27 PM Arend Van Spriel
<[email protected]> wrote:
>
> On June 12, 2025 6:51:29 PM KeithG <[email protected]> wrote:
>
> > ...
> >
> > On Thu, Jun 12, 2025 at 9:37 AM Arend Van Spriel
> > <[email protected]> wrote:
> >>
> >> On June 12, 2025 3:51:34 PM KeithG <[email protected]> wrote:
> >>
> >>> Arend,
> >>>
> >>> I am still seeing this:
> >>> wpa_supplicant[431]: wlan0: Failed to initiate sched scan
> >>>
> >>> I tried the brcmfmac options listed above and got no change? Still
> >>> getting this every 6 seconds in the log.
> >>> Did I get the command in the modprobe conf wrong?
> >>
> >> Maybe. You could try to merge the two value so one line with 0x200002.
> >> Could be that wpa_supplicant determines support for scheduled scan in an
> >> unexpected way. Have not looked at the wpa_supplicant code for that.
<snip>
>
> Right. Scheduled scan is a different API compared to the normal scan. It
> allows userspace to say "scan periodically and let me know when you see any
> of the ssids I am interested in" to the driver/firmware and go take a nap.
>
> If I remember correctly wpa_supplicant does a couple of normal scans and
> when it doesn't see the ssids in its config file, it switches to using the
> scheduled scan api.
>
> Regards,
> Arend
>
OK, I get it.

Could it be that I an running hostapd at the same time that is the
cause of these 'Failed to initiate sched scan' messages in the log?
I am running this as systemd wpa_supplicant@wlan0 and am using
systemd-networkd to manage the IPv4/v6 (not Network-Manager)

This log shows what happens when it is connected via hostapd to my
laptop and then I turn on my iPhone hotspot which is 'known' in the
[email protected]:

Jun 24 11:58:50 pi4 wpa_supplicant[423]: wlan0: Failed to initiate sched scan
Jun 24 11:58:56 pi4 wpa_supplicant[423]: wlan0: Failed to initiate sched scan
Jun 24 11:59:03 pi4 wpa_supplicant[423]: wlan0: Failed to initiate sched scan
Jun 24 11:59:09 pi4 wpa_supplicant[423]: wlan0: Trying to associate
with 36:b7:9b:9b:cc:c0 (SSID='BatPhone' freq=5745 MHz)
Jun 24 11:59:09 pi4 hostapd[5315]: ap0: STA ae:00:2d:31:28:7f IEEE
802.11: disassociated
Jun 24 11:59:09 pi4 systemd-networkd[184]: wlan0: Connected WiFi
access point: BatPhone (36:b7:9b:9b:cc:c0)
Jun 24 11:59:09 pi4 wpa_supplicant[423]: wlan0: Associated with
36:b7:9b:9b:cc:c0
Jun 24 11:59:09 pi4 wpa_supplicant[423]: wlan0:
CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Jun 24 11:59:09 pi4 wpa_supplicant[423]: wlan0:
CTRL-EVENT-REGDOM-CHANGE init=COUNTRY_IE type=COUNTRY alpha2=US
Jun 24 11:59:09 pi4 wpa_supplicant[423]: wlan0: WPA: Key negotiation
completed with 36:b7:9b:9b:cc:c0 [PTK=CCMP GTK=CCMP]
Jun 24 11:59:09 pi4 wpa_supplicant[423]: wlan0: CTRL-EVENT-CONNECTED -
Connection to 36:b7:9b:9b:cc:c0 completed [id=0 id_str=]
Jun 24 11:59:09 pi4 systemd-networkd[184]: wlan0: Gained carrier
Jun 24 11:59:10 pi4 hostapd[5315]: ap0: STA ae:00:2d:31:28:7f IEEE
802.11: associated
Jun 24 11:59:10 pi4 hostapd[5315]: ap0: STA ae:00:2d:31:28:7f RADIUS:
starting accounting session C040C6E0561E8E1E
Jun 24 11:59:10 pi4 hostapd[5315]: ap0: STA ae:00:2d:31:28:7f WPA:
pairwise key handshake completed (RSN)
Jun 24 11:59:10 pi4 systemd-networkd[184]: wlan0: DHCPv4 address
172.20.10.2/28, gateway 172.20.10.1 acquired from 172.20.10.1
Jun 24 11:59:36 pi4 systemd-networkd[184]: wlan0: Gained IPv6LL

I did not initiate a scan, manually, but when I turned on the hotspot,
it immediately connected. As soon as I turn off the hotspot, I get the
'Failed to initiate sched scan' every 6 or so seconds, again.

Keith