码迷,mamicode.com
首页 > 系统相关 > 详细

linux下启动AP热点时出错

时间:2016-08-04 01:36:39      阅读:877      评论:0      收藏:0      [点我收藏+]

标签:

1.启动hostapd,在终端下输入sudo ./hostapd hostapd.conf (注意:使用到的hostapd和hostapd.conf都处在当前工作目录下)

1.2.在执行1之后会出现以下错误:

Configuration file: hostapd.conf
nl80211: Could not configure driver mode
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
nl80211 driver initialization failed.
wlan0: interface state UNINITIALIZED->DISABLED
wlan0: AP-DISABLED
hostapd_free_hapd_data: Interface wlan0 wasn‘t started

1.3.如果不以超级用户root运行的话,如: ./hostapd hostapd.conf    ,会出现以下错误信息:

Configuration file: hostapd.conf
Could not set interface wlan0 flags (DOWN): Operation not permitted
Could not set interface wlan0 flags (DOWN): Operation not permitted
Could not set interface wlan0 flags (DOWN): Operation not permitted
Could not set interface wlan0 flags (DOWN): Operation not permitted
Could not set interface wlan0 flags (DOWN): Operation not permitted
Could not set interface wlan0 flags (DOWN): Operation not permitted
Could not set interface wlan0 flags (DOWN): Operation not permitted
Could not set interface wlan0 flags (DOWN): Operation not permitted
Could not set interface wlan0 flags (DOWN): Operation not permitted
Could not set interface wlan0 flags (DOWN): Operation not permitted
nl80211: Could not configure driver mode
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
nl80211 driver initialization failed.
wlan0: interface state UNINITIALIZED->DISABLED
wlan0: AP-DISABLED
hostapd_free_hapd_data: Interface wlan0 wasn‘t started

2.解决方法:

terminal中输入:

2.1 sudo nmcli nm wifi off

2.2 sudo rfkill unblock wlan

2.3 sudo ifconfig wlan0 192.168.1.1/24 up   (注意:我配置主机的ip地址为192.168.1.1)

2.4 sudo ./hostapd hostapd.conf

2.5 在2.4执行之后会出现以下信息即表示成功启动AP热点。

Configuration file: hostapd.conf
nl80211: Could not re-add multicast membership for vendor events: -2 (No such file or directory)
Using interface wlan0 with hwaddr 7c:8f:ed:36:45:fa and ssid "JelloSmith"
wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED

 

linux下启动AP热点时出错

标签:

原文地址:http://www.cnblogs.com/dakewei/p/5735141.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!