7

Hostapd keeps giving me this error:

nl80211: Could not configure driver mode nl80211 driver initialization failed. hostapd_free_hapd_data: Interface wlan0 wasn't started

I'm on Debian 8. I googled for hours and can't find a fix that works with Jessie.

Jeff Schaller
  • 66,199
  • 35
  • 114
  • 250
donny
  • 71
  • 1
  • 1
  • 3
  • I found a solution in http://www.niwi.cz/clanky/it-poznamky/hostap-complete-wi-fi-ap-configuration-730. Try it and post if you could get it solved. It worked for me. Good luck –  Apr 26 '16 at 17:20

2 Answers2

8

I had the same issue on my raspberry-PI. I could not find any proper solution but I did come up with a slightly dirty way to solve the issue:

  1. slightly modified solution from "adrianTNT" here on Ask Ubuntu

    airmon-ng check
    

    and the process I needed to kill was wpa_supplicant so

    killall wpa_supplicant
    
  2. I had to run this command to successfully start hostapd

    hostapd /etc/hostapd/hostapd.conf
    

    instead of the more common way service hostapd start which always failed.

meydlo
  • 81
  • 1
  • 2
5

This message appear also if hostapd is still running for some reason in the background. So try sudo killall hostapd.

Anthony Geoghegan
  • 12,605
  • 7
  • 59
  • 62
user230710
  • 51
  • 1
  • 1
  • For me, "service hostapd restart" did not work. This did the trick. – jous Oct 10 '17 at 15:01
  • It indeed was `hostapd` in the background, thank you! Once terminated, all other instances worked well. Just in case, the error messages were (in order): `nl80211: kernel reports: Match already configured` `nl80211: Could not configure driver mode` `nl80211: deinit ifname=wlx0 disabled_11b_rates=0` `nl80211 driver initialization failed.` `wlx0: interface state UNINITIALIZED->DISABLED` `wlx0: AP-DISABLED` `wlx0: CTRL-EVENT-TERMINATING` `hostapd_free_hapd_data: Interface wlx0 wasn't started` – Artfaith May 31 '22 at 12:26