1

I´ve set up hostapd files but when I want to run it by executing this command: sudo /usr/sbin/hostapd /etc/hostapd/hostapd.conf I get the error as follows:

sudo /usr/sbin/hostapd /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
nl80211: Could not configure driver mode
nl80211 driver initialization failed.
hostapd_free_hapd_data: Interface wlan0 wasn't started

How can I run the hostadp? Thanks in advance.

  • 1
    Try a different driver, it seems nl80211 is the wrong driver for your wifi adapter according to the error message. Also run the command sudo ifup wlan0 to start the wlan0 interface. – F. Untermoser Mar 10 '16 at 18:26
  • 1
    Indeed, I have Edimax EW-7811UN, so due to this site wikidevi.com/wiki/Edimax_EW-7811Un it has chip RTL8188CUS. But when it is replaced in hostapd.conf and I want to start hostapd, it retrieves "invalid/unknown driver". Does it mean it is necessary download the drivers at first? – Stanislav Jirák Mar 10 '16 at 19:25
  • 1
    Yes those Edimax sticks need a customized package to be able to work with hostapd. Try using rtl871xdrv as a driver,and if that doesn't work, you'll have to search for a tutorial online. I configured hostapd with a edimax stick once, but I can't remember how I did that. – F. Untermoser Mar 10 '16 at 20:44
0

I was scratching my head with this problem since last one month. I had TE-TendaW311M and using similar configuration resulting in "diver initialization failed". Since many people are using Edimax, I ordered EW-7711UAn and carefully configured the hostapd (minimal configuration) and it started working. But one interesting thing happened after that, I tested TendaW311M again with new configuration and it started working same way as Edimax dongle. So, my final remark on this problem is proper configuration of hostapd.conf is important. Please use this configuration and see what happens:

interface=wlan0
driver=nl80211
ssid=Pi-AP
channel=1
wmm_enabled=0
wpa=1
wpa_passphrase=raspberry
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
auth_algs=1
macaddr_acl=0

Please share if there is any further issue.

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.