Ubuntu 无线热点 Set Up A Wireless Hotspot (Access Point Mode) That Supports Android
16lz
2021-01-23
A wireless hotspot enables a computer to serve as a router over Wi-Fi. Ubuntu lets you easily create a wireless hotspot by using the Network Manager, but it uses an ad hoc network and most Android and Windows Phone devices can't connect to such networks. For this reason, I've created ( in collaboration with Satya) a script called AP-Hotspot that automatically creates an infrastructure (Access Point mode) wireless hotspot in Ubuntu that should work with Android and Windows Phone devices. The script uses hostapd and dnsmasq and it requires Access Point mode support for your wireless card - AP-Hotspot checks for this automatically and won't run if your wireless card doesn't support it.
Another script feature is that it displays notifications: when the hotspot becomes active and when a device connects or disconnects from the hotspot.
That said, let's proceed with installing AP-Hotspot:
Another script feature is that it displays notifications: when the hotspot becomes active and when a device connects or disconnects from the hotspot.
Install AP-Hotspot in Ubuntu
AP-Hotspot is available in the main WebUpd8 PPA (note: there are some other packages in the main WebUpd8 PPA which you can see HERE) for Ubuntu 13.10, 13.04, 12.10 and 12.04, however, because this can't be tested in VirtualBox, it has only been tested on Ubuntu 13.04 and 13.10. The script requires Hostapd 1.0 which is available by default in Ubuntu 12.10, 13.04 and 13.10 - for Ubuntu 12.04, you can use a PPA to install Hostapd 1.0.That said, let's proceed with installing AP-Hotspot:
sudo add-apt-repository ppa:nilarimogard/webupd8sudo apt-get updatesudo apt-get install ap-hotspotIf you're not using Ubuntu or don't want to add the main WebUpd8 PPA, you can get the script from HERE (but it has only been tested in Ubuntu). If you're not using the deb, make sure you also install the following packages, required by the script: hostapd, dnsmasq and iw.
Usage
To start AP-Hotspot, use the following command:
sudo ap-hotspot startThe first time you run the script, it tries to automatically detect which network interface is connected to the Internet, the wireless network interface and so on, however, if the detection doesn't work correctly, you can enter these manually:
Then, you'll have to enter the desired hotspot Access Point name and password:
If later on you want to run the configuration again, use the following command:
sudo ap-hotspot configure
To stop the wireless hotspot, use:
sudo ap-hotspot stop
Or, if you want to restart it, use:
sudo ap-hotspot restart
To see all the supported commands, simply type the following in a terminal:
ap-hotspot
来源:http://www.webupd8.org/2013/06/how-to-set-up-wireless-hotspot-access.html
更多:http://askubuntu.com/questions/180733/how-to-setup-a-wi-fi-hotspot-access-point-mode
更多相关文章
- Activity生命周期的回调,你应该知道得更多!--Android源码剖析(上)
- 用Javascript判断访问来源操作系统, 设备, 浏览器类型
- Android中文文档v0.1 beta低调发布,期待更多同学来参加review
- android-GooglePlay安装来源追踪PlayInstallReferrer
- 日常收集的Android开发资料来源
- Android公共库——图片缓存 网络缓存 下拉及底部更多ListView 公
- 上百个android小项目源码(来源于网络)
- Android recyclerview实现查看更多/收起功能
- Android ListView列表 刷新和加载更多