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

  • 相关阅读:
    vue导入excel表格
    正则表达式:输入六位数或六位数以下的正整数。
    iview下拉框支持多选
    vue通过jquery方式获取元素
    获取对象属性
    原生JS获取元素,添加事件
    打印当前页面,关闭当前页面
    Andrew Ng 机器学习公开课
    机器学习4《朴素贝叶斯》
    机器学习3《数据集与k-近邻算法》
  • 原文地址:https://www.cnblogs.com/dakewei/p/5735141.html
Copyright © 2011-2022 走看看