2

I'm trying to set up hostapd on a Raspberry Pi 3 with Fedora Server 26 installed. I downloaded the correct WiFi driver as recommended on Fedora site

sudo curl https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/master/brcm80211/brcm/brcmfmac43430-sdio.txt -o /lib/firmware/brcm/brcmfmac43430-sdio.txt

I followed the followed some steps from a guide to do the setup on Raspbian. When starting hostapd I get the output below. The access point is visible to clients, but they can't connect.

    Failed to create interface mon.wlan0: -95 (Operation not supported)
    wlan0: Could not connect to kernel driver
    Using interface wlan0 with hwaddr <my mac addr> and ssid "Test AP"
    wlan0: interface state UNINITIALIZED->ENABLED
    wlan0: AP-ENABLED
wlan0: AP-STA-POSSIBLE-PSK-MISMATCH <client mac addr>
wlan0: AP-STA-POSSIBLE-PSK-MISMATCH <client mac addr>
wlan0: AP-STA-POSSIBLE-PSK-MISMATCH <client mac addr>
wlan0: STA <client mac addr> IEEE 802.11: disassociated
wlan0: STA <client mac addr> IEEE 802.11: associated
wlan0: STA <client mac addr> IEEE 802.11: disassociated

I'm wondering how to solve the error below and make the access point work.

ailed to create interface mon.wlan0: -95 (Operation not supported) wlan0: Could not connect to kernel driver

3

I am getting exactly the same two warnings with hostapd on Alpine Linux but they have no impact on the proper functioning of hostapd. My hostapd AP is working fine even though these messages are printed out. When you turn on debug output you get:

wlan0: Flushing old station entries
nl80211: flush -> DEL_STATION wlan0 (all)
nl80211: Station flush failed: ret=-14 (Bad address)
wlan0: Could not connect to kernel driver
wlan0: Deauthenticate all stations
nl80211: sta_remove -> DEL_STATION wlan0 ff:ff:ff:ff:ff:ff --> 0 (No error information)

I followed up on the "Could not connect to kernel driver" in the source code of hostapd and it seems that this merely a debug message with the wrong severity. When starting hostapd it wants to "flush" all stations (whatever that means) and the code running for that in the nl80211 driver is:

static int i802_flush(void *priv)
...
msg = nl80211_bss_msg(bss, 0, NL80211_CMD_DEL_STATION);
res = send_and_recv_msgs(bss->drv, msg, NULL, NULL);
if (res) {
    wpa_printf(MSG_DEBUG, "nl80211: Station flush failed: ret=%d "
           "(%s)", res, strerror(-res));

which produces the first (debug) message.

Further up in the stack this code is called by hostapd.c:

static int hostapd_flush_old_stations(struct hostapd_data *hapd, u16 reason)
...
if (hostapd_flush(hapd)) {
    wpa_msg(hapd->msg_ctx, MSG_WARNING,
        "Could not connect to kernel driver");
    ret = -1;
}

which turns this "flush failed" debug message into a "cannot connect to kernel driver" warning. IMHO this is not the right reaction and should be fixed in the code.

So if your AP is not working then not because of these two messages but for other reasons. For example I had problems with a "hw_mode" configuration which was not supported by the hardware.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.