检查网卡是否兼容
ifconfig wlan0 create wlandev ath0 # 以 ath0 为例 ifconfig wlan0 list caps drivercaps=6f85ed01 cryptocaps=1f
包含 HOSTAP 则表示兼容
创建无线网络接口
ifconfig wlan0 destroy ifconfig wlan0 create wlandev ath0 wlanmode hostap
写人 hostapd 配置文件
/etc/hostapd.conf
interface=wlan0 debug=1 ctrl_interface=/var/run/hostapd ctrl_interface_group=wheel ssid=heiher.info # 以 heiher.info 为例 wpa=1 wpa_passphrase=passwd # 此处填写密码 wpa_key_mgmt=WPA-PSK wpa_pairwise=CCMP TKIP
启动无线AP
/etc/rc.d/hostapd forcestart