ubuntu 下通过无线网卡建立 AP 让其它无线设备上网

来源:互联网 发布:apache有什么作用 编辑:程序博客网 时间:2024/05/30 04:14

1、查看你的网卡是否支持AP模式。现在网卡一般都支持

k@k-C410:~$ iwlist
Usage: iwlist [interface] scanning [essid NNN] [last]
              [interface] frequency
              [interface] channel
              [interface] bitrate
              [interface] rate
              [interface] encryption
              [interface] keys
              [interface] power
              [interface] txpower
              [interface] retry
              [interface] ap
              [interface] accesspoints
              [interface] peers
              [interface] event
              [interface] auth
              [interface] wpakeys
              [interface] genie
              [interface] modulation

如果显示 ap,则表示你的网卡支持 ap 模式。


也可以用下面命令查看:

k@k-C410:/etc$ iw list

你也可以到下面地址查看你的网卡是否支持ap

http://wireless.kernel.org/en/users/Drivers


2、建立无线 ap

hostapd:

主页:http://w1.fi/hostapd/

文档:http://wireless.kernel.org/en/users/Documentation/hostapd?highlight=%28hostapd%29


ubuntu下可以用下面命令安装:

sudo apt-get install hostapd

你也可以从源码编译。


k@k-C410:/home/hostap/hostapd$ sudo ./hostapd /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
nl80211: Could not configure driver mode
nl80211 driver initialization failed.
hostapd_free_hapd_data: Interface wlan0 wasn't started



参考:

http://www.360doc.com/content/14/0108/11/13232598_343535168.shtml

blog.csdn.net/q1302182594/article/details/8684893

http://forum.ubuntu.com.cn/viewtopic.php?f=116&t=329742&start=0

nl80211驱动:www.360doc.com/content/12/0607/16/9424702_216641332.shtml

0 0
原创粉丝点击