zoukankan      html  css  js  c++  java
  • linux下启动AP热点时出错

    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

  • 相关阅读:
    访问HDFS报错:org.apache.hadoop.security.AccessControlException: Permission denied
    Python获取指定文件夹下的文件
    逗号引起的大坑,str进去,tuple出来,为啥
    Python代码调用JS函数
    Key没有引号的K-V格式字符串,怎么转换成Json/dict
    Redis设置密码和取消密码
    elasticsearch 查询(match和term)
    bat 拾遗
    windows下elasticsearch5.X安装IK分词器
    pycharm 右键为什么会出现 "Run Twisted Trial in testxxx.py"
  • 原文地址:https://www.cnblogs.com/dakewei/p/5735141.html
Copyright © 2011-2022 走看看