zoukankan      html  css  js  c++  java
  • Ubuntu14.04 设置wifi热点

    查了一下资料主要有两种方法:

    第一种:network manager设置

      这种方法配置比较复杂.并且不能给Android手机和iPhone共享.果断放弃(其实我是尝试过的,真的没有用).

    第二种:使用ap-hotspot,亲测可用

      这种方法配置简单,用起来也方便.

      第一步:安装ap-hotspot

    $ sudo add-apt-repository ppa:nilarimogard/webupd8
    
    $ sudo apt-get update
    
    $ sudo apt-get install hostapd
    
    $ sudo apt-get install ap-hotspot

      第二步:配置ap-hotspot

    $ sudo ap-hotspot configure
    Detecting configuration...
    Detected eth0 as the network interface connected to the Internet. Press ENTER if this is correct or enter the desired interface below (e.g.- eth0, ppp0 etc.):
    // 回车确认
    
    Detected wlan0 as your WiFi interface. Press ENTER if this is correct or enter the desired interface (e.g.- wlan1):
    // 回车确认
    
    Enter the desired Access Point name or press ENTER to use the default one (myhotspot):
    // 输入wifi的名字
    
    Enter the desired WPA Passphrase below or press ENTER to use the default one (qwerty0987):
    // 输入wifi的密码

      第三步:启动wifi

    $ sudo ap-hotspot start

    大功告成,现在可以再Android设备上查找到自己发散的wifi了

    另外附上几个常用的命令选项:

    Usage:    ap-hotspot [argument]
    
        start          start wireless hotspot        // 打开wifi
        stop           stop wireless hotspot         // 停止wifi
        restart        restart wireless hotspot      // 重启wifi
        configure      configure hotspot             // 配置wifi
        debug          start with detailed messages  // dubug模式打开wifi,会显示一些详细的信息

    以前会出现一个一直处于starting...状态的问题,但是,但是尼玛流行的修复方式出了问题了!官网脑残地将hostapd 1.0的deb包删除了,现在的2.x的包尼玛根本不能用。我下载了1.0和2.x版本编译安装还是不行,后来还是用的ubuntu官网的hostapd,居然神奇地可以用了。

    解释一下ap-hotspot和hostapd的关系把,其实ap-hostpot是依赖hostapd的,相当于ap-hostpot只是个充当客户端的角色,hostapd才是核心,因此hostapd出了问题ap-hostpot自然也用不了了。

    太折腾了。。。。。

    需要手动下载源码编译的戳这里 http://w1.fi/cgit/hostap-1/

    下载2.x的deb包的戳这里:http://archive.ubuntu.com/ubuntu/pool/universe/w/wpa/ 然而这并没有什么卵用。

    本文参考了:

    http://ubuntuhandbook.org/index.php/2014/02/wifi-hotspot-ubuntu-laptop-android/

    http://blog.csdn.net/wdjhzw/article/details/39118651

  • 相关阅读:
    SQL Server 实现Split函数
    15.java设计模式之访问者模式
    14.java设计模式之命令模式
    13.java设计模式之模板模式
    12.java设计模式之代理模式
    11.java设计模式之享元模式
    10.java设计模式之外观模式
    9.java设计模式之组合模式
    8.java设计模式之装饰者模式
    7.java设计模式之桥接模式
  • 原文地址:https://www.cnblogs.com/csulennon/p/4418734.html
Copyright © 2011-2022 走看看