Author: Karthik <firstname.lastname@example.org>
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: https://bugs.launchpad.net/ubuntu/+source/wpa/+bug/1289047
Give a suggestive message to the user when hostapd fails because of the
above bug outlining the workaround mentioned in the above bug report.
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."