先介绍一下 create_ap.
这是一个在Linux中创建热点用的脚本, 托管在github中, https://github.com/oblique/create_ap/
在http://git.2f30.org/create_ap/
可以看到github中这个项目的提交日志。
之前试过ap-hotspot,但是自身的ubuntu版本问题(14.04)找不到好的源,
在apt-get update的时候,一直报错。
后面转投create-ap的怀抱,在网上貌似很多失败的声音。
不过在搜索引擎的帮助下
###cd 到安装目录
####下载源
git clone git://git.2f30.org/create_ap.git
看看以太网(eth)和wifi的interface
你可以看readme.mk里具体的Usage
sudo ./create_ap wlan[0,1,2,...] eth[0,1,2,..] MyAccessPoint MyPassPhrase
执行脚本前先把网卡关了
可是我这边一直会报错
WARN: Your adapter does not fully support AP virtual interface, enabling --no-virt
WARN: Realtek drivers usually have problems with WPA1, enabling -w 2
WARN: If AP doesn't work, please read: howto/realtek.md
Config dir: /tmp/create_ap.wlan2.conf.3bPEnlaC
PID: 7340
Network Manager found, set wlan2 as unmanaged device... DONE
RTNETLINK answers: Operation not possible due to RF-kill
Doing cleanup.. done
后面用如下两个命令,先看看rfkill的状态,然后设置下unblock
最后就大功告成了.
WARN: Your adapter does not fully support AP virtual interface, enabling --no-virt
WARN: Realtek drivers usually have problems with WPA1, enabling -w 2
WARN: If AP doesn't work, please read: howto/realtek.md
Config dir: /tmp/create_ap.wlan2.conf.is9vpOgg
PID: 7732
Network Manager found, set wlan2 as unmanaged device... DONE
Sharing Internet using method: nat
hostapd command-line interface: hostapd_cli -p /tmp/create_ap.wlan2.conf.is9vpOgg/hostapd_ctrl
WARN: Low entropy detected. We recommend you to install `haveged'
Configuration file: /tmp/create_ap.wlan2.conf.is9vpOgg/hostapd.conf
Failed to update rate sets in kernel module
Using interface wlan2 with hwaddr 28:e3:47:a8:47:41 and ssid 'Cao_space'
wlan2: STA 68:3e:34:a6:f0:9e IEEE 802.11: authenticated
wlan2: STA 68:3e:34:a6:f0:9e IEEE 802.11: associated (aid 1)
wlan2: AP-STA-CONNECTED 68:3e:34:a6:f0:9e
wlan2: STA 68:3e:34:a6:f0:9e RADIUS: starting accounting session 58773330-00000000
wlan2: STA 68:3e:34:a6:f0:9e WPA: pairwise key handshake completed (RSN)
wlan2: STA 68:3e:34:a6:f0:9e WPA: group key handshake completed (RSN)
wlan2: STA 68:3e:34:a6:f0:9e WPA: group key handshake completed (RSN)
wlan2: STA 68:3e:34:a6:f0:9e WPA: group key handshake completed (RSN)