Skip to content

Pixel 9a: the Wi-Fi hotspot (AP mode on wlp1s0 refused; on ap0 stations never authorized) #523

Open

Description

@den-kloot

Summary

On the Pixel 9a (brcmfmac), the Quick Settings Hotspot can't work as it is: the firmware refuses AP mode on the client interface, and on a separate AP interface NetworkManager's hotspot (wpa_supplicant's AP mode) never authorizes stations. Findings so far, from one phone:

1. AP mode on wlp1s0 fails

nmcli device wifi hotspot (the tile) and an nmcli connection up of an AP connection on wlp1s0:

kernel: ieee80211 phy0: brcmf_cfg80211_start_ap: Beacon Interval Set Error, -52
wpa_supplicant: Failed to set beacon parameters
wpa_supplicant: Failed to initialize AP interface

Same result with the client Wi-Fi's autoconnect off (nothing reconnecting in between) and with a fixed 2.4 GHz channel (band bg, channel 6). The phone then goes back to its Wi-Fi network.

2. A second interface for the AP starts

iw list allows #{ AP } <= 2 next to #{ managed } <= 2, #channels <= 2. With iw dev wlp1s0 interface add ap0 type __ap (and its own locally administered MAC), an AP connection on ap0 comes up (ap0: AP-ENABLED, iw dev ap0 info: type AP) while wlp1s0 stays a client.

(It first failed in IP config only because dnsmasq isn't installed: separate PR.)

3. Stations are never authorized

A client associates but gets no further:

  • with WPA2-PSK it reports a wrong password, although the passphrase matches;
  • on an open test network its DHCPDISCOVERs reach dnsmasq, the DHCPOFFERs never reach it.

iw dev ap0 station dump shows the client associated: yes, authorized: no, and wpa_supplicant logs no AP-STA-CONNECTED and no EAPOL at all. So the AP side never learns about the station and never authorizes it (also nl80211: kernel reports: multicast RX registrations are not supported). iw phy advertises no AP 4-way-handshake offload, so the host has to run it.

4. A permanent ap0 breaks Wi-Fi scanning

While ap0 existed and NetworkManager managed it, scans failed on both interfaces (CTRL-EVENT-SCAN-FAILED ret=-16), and the phone no longer found its home network until reboot. With ap0 unmanaged (nmcli device set ap0 managed no) the scan failures stopped at once. So an AP interface should exist only while the hotspot runs, and NetworkManager should leave it alone.

Next step I'm testing

hostapd on ap0 instead of wpa_supplicant's AP mode (brcmfmac APs work with hostapd elsewhere, e.g. the Raspberry Pi's), with ap0 created on start and deleted on stop, unmanaged by NetworkManager, dnsmasq and NAT for 10.42.0.0/24. I'll add the result here.

Device and build

Activity

  1. den-kloot commented on Nov 8, 2026

    @den-kloot
    ContributorAuthor

    The missing dnsmasq from point 2 is #525.

  2. Somnius commented on Nov 22, 2026

    @Somnius
    Contributor

    Hi @den-kloot, the Pixel 8 Pro (husky, also brcmfmac, BCM4398 firmware 24.100.671.86.2) hits the same -52 wall, and I got a hotspot working on it with NetworkManager in the end. I see from #539 you went with hostapd on ap0, so this is mostly for the record, and in case pmf plays a part in your "wrong password" too.

    Same Beacon Interval Set Error, -52 on wlp1s0 here. On ap0 with pmf 1 (disabled, what the profile had) the AP beaconed, but my OnePlus 13 never got as far as an auth or assoc event in 10 minutes. So not quite your "associated, not authorized" either.

    To see more I built a test brcmfmac that lets AP mode start on wlp1s0. There the OnePlus associated and then disconnected with reason 17 (the RSN IE in the 4-way handshake doesn't match the beacon). In the first try of that, with pmf 1, Android said "wrong password" with the right one. With pmf 2 a desktop iw scan showed the AP's probe response offering only AKM 6 (PSK-SHA256), MFP-capable, while the driver log showed wpa_supplicant's own IE with PSK and PSK-SHA256 (AKM 2 and 6). With pmf 3 (required) the driver log shows PSK-SHA256 only and MFP required, on both interfaces.

    AKM mismatch: pmf 2 vs pmf 3 on the Pixel 8 Pro hotspot

    So I tried 802-11-wireless-security.pmf 3 on ap0, and the OnePlus finished the 4-way handshake, got a DHCP lease and had internet. Twice: once with the test driver and once with the stock module, so on the 8 Pro no driver change is needed. Roughly (as root):

    iw dev wlp1s0 interface add ap0 type __ap
    # wait until nmcli lists ap0 as wifi/disconnected
    nmcli c modify Hotspot connection.interface-name ap0 802-11-wireless-security.pmf 3
    nmcli c up Hotspot ifname ap0
    

    plus UFW rules for DHCP/DNS in on ap0 and routing from ap0 to wlp1s0 while it's on, and ap0 deleted again on stop. The phone's own Wi-Fi dropped when the hotspot started and was back as the uplink within about 20 s. The home link also moved from channel 1 to the AP's channel 6.

    I don't know if pmf 3 helps your case, since on ap0 I never got as far as reason 17 before switching to it, and pmf can't explain your open-network test where the DHCPOFFERs never arrived. I didn't test the 9a, devices without 802.11w (pmf required locks them out), a 5 GHz-only home network, or long runs, so I can't say anything about your point 4. And I never tried hostapd.

  3. den-kloot commented on Nov 22, 2026

    @den-kloot
    ContributorAuthor

    The same test on the 9a today, so this issue has both phones. In short: Somnius' recipe works here too. NetworkManager's hotspot on a separate ap0 with pmf 3 takes an iPhone, gives it an address and carries its traffic out through mobile data. With pmf 1 the iPhone never associates.

    Setup (Pixel 9a, 7.3.0-rc6-omamobile-push1-gb54730e55758, BCM4383/2 firmware 20.25.929.104.8, NetworkManager 1.58.1, wpa_supplicant 2.12; home Wi-Fi on 5 GHz channel 44, mobile data up):

    • iw dev wlp1s0 interface add ap0 type __ap, with its own locally administered address;
    • a profile bound to ap0: mode ap, band bg, channel 6, ipv4.method shared, IPv6 off, WPA2-PSK (RSN, CCMP), pmf 3. It existed before ap0 and was set to autoconnect, so NetworkManager brought it up as soon as ap0 appeared;
    • a policy rule sent 10.42.0.0/24 to a table with the subnet and mobile data's default route (rmnet0), and IPv4 forwarding was on for the test (NetworkManager had left ip_forward at 0 after the activation);
    • not covered: the firewall. This phone's ufw already had DHCP, DNS and ap0 → rmnet0 rules from my hostapd setup, so the question of a phone with the image's ufw defaults stays open.

    pmf 3: the iPhone associated and was authorized, got 10.42.0.176 from NetworkManager's dnsmasq and sent 77 DNS queries to 10.42.0.1. While it browsed, 1881 packets went out through rmnet0 and 4081 (5.3 MB) came back. A first attempt, most likely with a mistyped password, looked like the old "associated, not authorized" and left after 4 s.

    pmf 1: the same profile, re-activated with pmf 1. The iPhone, which had just been on it, didn't come back: iw dev ap0 station dump showed no station at all for 5 min 40 s, so it never even associated. That matches what Somnius saw on the 8 Pro.

    Side effects:

    • The phone's own Wi-Fi dropped at every start of the AP (wlp1s0: CTRL-EVENT-DISCONNECTED ... locally_generated=1) and was back after about 12 s, but on the router's 2.4 GHz network on channel 6 (the AP's), not on 5 GHz. After the AP stopped it went back to 5 GHz by itself. On Somnius' 8 Pro it stayed on 5 GHz. I don't know yet whether my hostapd setup on this phone does the same: in the earlier starts I looked up, the phone wasn't on Wi-Fi.
    • NetworkManager scanned on ap0 for about 5 s before it activated the profile (a probe for a saved hidden network), and again between a deactivation and the next activation. No SCAN-FAILED this time; point 4 above was about a permanent ap0.
    • For anyone who adds a routing table for the clients: re-activating the profile (a name or password change does that) takes ap0 down, and the kernel then removes ap0's routes from every table. My test table lost its subnet route, and the strict rp_filter refused the clients' ARP (IPReversePathFilter counted up) until the route was put back.

    All of this ran from a root test script, not from a package, and everything was removed again afterwards.

    Measured on my phone with Claude.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions