create a nat-ed wifi ap
git clone git://
Log | Files | Refs | README | LICENSE

commit 0e9a81ff9450c86825b4a6d14c68ce4f12d4be0f
parent 9ab97af45184602d4f386f4021d21ab15021a8e4
Author: Karthik <>
Date:   Wed, 13 Aug 2014 19:33:51 +0530

Give remedial suggestion for hostapd bug

Hostapd v2 introduces a bug which currently throws the following error
and initialization fails
    nl80211: Could not configure driver mode
    nl80211 driver initialization failed.
    hostapd_free_hapd_data: Interface wlp3s0ap wasn't started

More Info:

Give a suggestive message to the user when hostapd fails because of the
above bug outlining the workaround mentioned in the above bug report.

Mcreate_ap | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/create_ap b/create_ap @@ -521,7 +521,13 @@ fi # start access point echo "hostapd command-line interface: hostapd_cli -p $CONFDIR/hostapd_ctrl" trap - SIGINT # reset trap -hostapd $CONFDIR/hostapd.conf || die "Failed to run hostapd, maybe a program is interfering." + +if ! hostapd $CONFDIR/hostapd.conf; then + echo -e "\nError: Failed to run hostapd, maybe a program is interfering." + echo -e "\nIf an error like 'n80211: Could not configure driver mode' was thrown, it is probably becasue of a bug in hostapd." + echo "Try running 'nmcli nm wifi off; rfkill unblock wlan' before starting create_ap." + die +fi cleanup exit 0