Hostapd error - nl80211: Could not configure driver mode


(Nguyên Trung) #1

I got this problem when I try to use hostapd on Kali Linux 2018.1

nl80211: Could not configure driver mode

I am using TP-link WR722n. Can u give me some suggestion?

(Hardeep Singh) #2

This is probably because the nl80211 driver of hostapd is cl;ashing with the drivers of network-manager utility.
They are basically fighting to take charge of the device you are trying to configure with hostapd.
If you notice, whenever you put the card in monitor mode manually

All commands are being run as root

ifconfig wlan0 down
iwconfig wlan0 mode monitor
ifconfig wlan0 up

Notice after a few seconds, the card jumps back to mode:managed

Because the card is being managed by network-manager utility. So there are two ways you can tackle this issue:

  1. airmon-ng check kill to kill all the potentially troublesome processes, like network-manager, wpa_supplicant, dhclient
  2. Make your selected card an exception in network-manager, so that it ignores the card and not mess with it ever.

How to make network-manager ignore your wireless card

Get you wireless card’s MAC address/hardware address

ifconfig wlan0 | grep -i hwaddr

It will show an output like this:

wlan0 Link encap:Ethernet HWaddr 7d:e6:d2:30:9f:f2

Open the network-manager configuration file: NetworkManager.conf

nano /etc/NetworkManager/NetworkManager.conf

Add the following code and replace the MAC address with your selected device’s MAC




Hit CTRL + O to save and CTRL + X to exit.

restart network-manager:

service network-manager restart 

and see if you still get the error