ubuntu下设置一个wifi热点
来源:互联网 发布:控制台java 编辑:程序博客网 时间:2024/06/07 06:11
我使用的是ap-hotspot,比较简单,命令行一共就三四步的样子。先来提一下配置的方法,然后讲我遇到的问题。
第一步:安装hoseapd和ap-hotspot。
sudo apt-get updatesudo apt-get install postapdsudo apt-get install ap-hotspot
第二步:配置ap-hotspot
sudo ap-hotspot configureDetecting 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密码
第三步:热点启动
sudo ap-hotspot start
等到出现wireless hotspot active,这样一个wifi就启动了。
遇到的问题:
1、启动了以后进程一直阻塞着。
一直阻塞的话就是不成功,去/tmp/文件夹下查看hostapd的日志文件显示如下
Configuration file: /etc/ap-hotspot.conf nl80211: Could not configure driver modenl80211 driver initialization failed.hostapd_free_hapd_data: Interface wlan0 wasn't started
发现问题是nl80211后边这一串。解决办法是
//这两行的意思是先关闭wlan,然后关闭接口让ifconfig可以工作sudo nmcli nm wifi off sudo rfkill unblock wlan//用ifcongif升级wlan,然后允许一秒的延迟sudo ifconfig wlan0 10.15.0.1/24 upsleep 1//重启设备sudo service isc-dhcp-server restartsudo service hostapd restart
问题解决。
这几个命令要在普通用户下运行,sudo权限个root用户下运行并不一样。
2、启动了以后终端提示Another process is already running
这是因为已经启动过一遍了,再启动一遍就会提示这个错误。解决办法是去临时文件夹下删除hotspot.pid文件。
sudo rm /tmp/hptspot.pid
0 0
- ubuntu下设置一个wifi热点
- ubuntu 14.04 设置wifi热点
- Ubuntu笔记本设置WiFi热点
- Ubuntu 设置 wifi 无线热点
- Ubuntu 12.04下设置笔记本成为wifi热点
- ubuntu下发射wifi热点
- win8下设置wifi热点
- Win7下设置WiFi热点
- Win7下设置WiFi热点
- 图解Ubuntu 12.04设置wifi无线热点
- 图解Ubuntu 12.04设置wifi无线热点
- ubuntu设置电脑作为wifi热点
- Ubuntu 下建立WiFi热点的方法
- ubuntu下发射无线WIFI热点
- ubuntu系统下建立wifi热点
- Win7下设置电脑为WIFI热点
- ubuntu建立WiFi热点
- wifi热点-ubuntu
- ios之单例模式
- [51MCU] Chapter1:reg51.h
- 如何做好测试管理工作
- leetcode 25:Reverse Nodes in k-Group(15-10-11)
- hdu 5500 Reorder the Books(模拟)
- ubuntu下设置一个wifi热点
- 二、机器学习系统设计笔记之对真实样本分类
- Qt中实现删除文件某一行内容
- 欢迎使用CSDN-markdown编辑器
- dump pcm数据和一些备忘
- 三、机器学习系统设计笔记之聚类
- Fedora安装Texlive2013时出现Can't locate Digest/MD5.pm的解决方法
- C# Lambda表达式
- Linux 硬中断和软中断