Hostapd error and clients unable to connect

Hi all,

Out of the blue I receive these log messages about hostapd. Everything will work fine and suddenly clients are unable to connect to Access Point. I am not sure which radio is throwing these errors, but I suspect it's 5GHz radio (ath10k)

Fri Jul  6 06:13:21 2018 daemon.err hostapd: Failed to set beacon parameters
Fri Jul  6 06:13:21 2018 daemon.err hostapd: Failed to set beacon parameters
Fri Jul  6 06:13:22 2018 daemon.err hostapd: Failed to set beacon parameters
Fri Jul  6 06:13:27 2018 daemon.err hostapd: Failed to set beacon parameters
Fri Jul  6 06:13:27 2018 daemon.err hostapd: Failed to set beacon parameters
Fri Jul  6 06:13:28 2018 daemon.err hostapd: Failed to set beacon parameters
Fri Jul  6 06:13:32 2018 daemon.notice hostapd: handle_probe_req: send failed
Fri Jul  6 06:13:32 2018 daemon.notice hostapd: handle_probe_req: send failed
Fri Jul  6 06:13:32 2018 daemon.notice hostapd: handle_probe_req: send failed
Fri Jul  6 06:13:32 2018 daemon.notice hostapd: handle_probe_req: send failed
Fri Jul  6 06:13:32 2018 daemon.notice hostapd: handle_probe_req: send failed
Fri Jul  6 06:13:32 2018 daemon.notice hostapd: handle_probe_req: send failed

I tried to dig a little deeper of where these errors are occurring:

hostapd/src/ap/beacon.c

int ieee802_11_set_beacon(struct hostapd_data *hapd)
{
...
    res = hostapd_drv_set_ap(hapd, &params);
	hostapd_free_ap_extra_ies(hapd, beacon, proberesp, assocresp);
	if (res)
		wpa_printf(MSG_ERROR, "Failed to set beacon parameters");
	else
		ret = 0;
...
}

hostapd/src/ap/ap_drv_ops.h

static inline int hostapd_drv_set_ap(struct hostapd_data *hapd,
				     struct wpa_driver_ap_params *params)
{
	if (hapd->driver == NULL || hapd->driver->set_ap == NULL)
		return 0;
	return hapd->driver->set_ap(hapd->drv_priv, params);
}

hostapd/src/ap/beacon.c

void handle_probe_req(struct hostapd_data *hapd,
		      const struct ieee80211_mgmt *mgmt, size_t len,
		      int ssi_signal)
{
...
	ret = hostapd_drv_send_mlme_csa(hapd, resp, resp_len, noack,
					csa_offs_len ? csa_offs : NULL,
					csa_offs_len);

	if (ret < 0)
		wpa_printf(MSG_INFO, "handle_probe_req: send failed");
...
}

hostapd/src/ap/ap_drv_ops.c

int hostapd_drv_send_mlme_csa(struct hostapd_data *hapd,
			      const void *msg, size_t len, int noack,
			      const u16 *csa_offs, size_t csa_offs_len)
{
	if (hapd->driver == NULL || hapd->driver->send_mlme == NULL)
		return 0;
	return hapd->driver->send_mlme(hapd->drv_priv, msg, len, noack, 0,
				       csa_offs, csa_offs_len);
}

Does the above code indicate a problem with the driver or hostapd configuration?

If you want to look at my wireless and hostapd config files, please let me know and I will post them.

Thanks :slight_smile:

You're most likely using nl8011 so set_ap pointer points to the wpa_driver_nl80211_set_ap(). That function calls NL80211_CMD_NEW_BEACON or NL80211_CMD_SET_BEACON. Please note that NL80211_CMD_NEW_BEACON is an alias for the NL80211_CMD_START_AP.

At that point you should probably start looking at the kernel side starting with a net/wireless/nl80211.c:

  1. NL80211_CMD_START_AP is handled by the nl80211_start_ap which calls rdev_start_ap()
  2. NL80211_CMD_SET_BEACON is handled by the nl80211_set_beacon which calls rdev_change_beacon()

See which functions returns an error and why. You may need to dig further and add debugging to mac80211's callbacks: ieee80211_start_ap() and ieee80211_change_beacon().

1 Like

thanks @rmilecki

I will look into adding debug statements to those functions.

I seem to have gotten the same issue with no clients able to connect and same log message on my Archer C7 v2 on 18.06. Just started occurring out of nowhere. Removed my interface and created it from scratch but still got the same issue. Tried to reflash it (but saving the configuration), still the same issue. No clients work anymore on 5Ghz but 2.4Ghz works fine (2.4Ghz is on a separate radio and use different drivers, ath9k for 2.4Ghz and ath10k for 5Ghz if I remember correctly). I also have a WWAN interface on my 5Ghz radio but during normal circumstances that shouldn't make a difference.

@sjpacket Did you find anything from your debugging?

@johan-bjareholt
I didn't find anything while debugging but I started to have the same issue, 5GHz not showing up. I tried changing channel, channel width and other settings to no avail. It was working fine and suddenly 5GHz stopped working.

Did anyone find out why this happens?
I have a Raspberry Pi 4 with an Alfa AWUS036ACM (Mediatek MT7612U).
I have a 5GHz [AP that stops with mt76x2u: error: mt76x02u_mcu_wait_resp failed with -110
Then I get those hostapd errors until I reinsert the USB wifi device.

In my case, I had two devices pointing to the same Static IP. I set it up that way because that specific device could only enable the wired or wireless connection, but not both at the same time, so I just wanted to assign the same IP address regardless of what I was using. This ended up generating the error in this thread "hostapd: handle_probe_req: send failed".