MADWiFi step by step――以Atheros芯片为基础的无线网卡的Linux驱动解决方案
Debian GNU/Linux sid
kernel 2.6.12-enVision ;-)
TP-LINK WN310G测试成功
之前曾经写过Linux下驱动无线网卡的方法
主要是ndiswrapper加Windows下的网卡驱动的方法
今天找文档的时候无意中发现MADWiFi http://madwifi.sourceforge.net
网站上的简介说:
MADWiFi is short for Multiband Atheros Driver for WiFi. In other words: this project provides a Linux kernel driver for Atheros-based Wireless LAN devices. The driver works such that your WLAN card will appear as normal network interface in the system. Additionally there is support for the Wireless Extensions API. This allows you to configure the device using the usual tools (ifconfig, iwconfig and friends).
Some of the driver´s key features are:
* Allows operation as station, AP, ad-hoc, monitor. WDS is work in progress. * Supports Wireless Extensions API. * One driver for miniPCI and cardbus devices. USB devices are not yet supported. * Most of the current Atheros WLAN chipsets are supported. * Supports WEP and WPA/802.11i. * Support for 802.1x authentication in AP mode.
MADWiFi step by step:
一、检查你的网卡是否是基于Atheros芯片的无线网卡
在Atheros的官方网站上可以查网卡是不是基于Atheros芯片的,链接
http://customerproducts.atheros.com/customerproducts
或者用lspci | grep Atheros看看
如果有类似如下的输出就满足条件了
0000:03:00.0 Ethernet controller: Atheros Communications, Inc.: Unknown device 001a (rev01)
二、检查一下条件是否满足
2.4或者2.6版本的内核
无线扩展版本大于14(推荐16)
内核支持sysctl
若要使用802.1x认证,还需要crypto API支持(HMAC和MD5)
若使用Cardbus卡,需要hotplugd
编译MADWiFi时,需要uudecode,(许多发行版通常在一个叫做sharutils的包里面,debian user可以apt-get install sharutils)
可以在编译的时候用make configcheck来检查
feuvan@envision:~/madwifi-cvs/madwifi$ make configcheck
Checking if all requirements are met… ok.
三、下载编译MADWiFi
feuvan@envision:~$ cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/madwifi co madwifi
在madwifi里就放着MADWiFi的cvs代码了
不必担心cvs代码不够稳定,据说MADWiFi cvs代码是almost stable,呵呵
四、编译安装
su到root用户,make,make install即可完成安装
示例如下:
feuvan@envision:~$ su -
Password:
envision:~# cd /home/feuvan/madwifi-cvs/madwifi/
envision:/home/feuvan/madwifi-cvs/madwifi# make
make完了之后
envision:/home/feuvan/madwifi-cvs/madwifi# make install
即可完成安装
另外,make all的话,会在tools目录下生成一堆工具
不过如果网络工作正常的话,也就没啥好用的
五、使用配置
modprobe ath_pci
然后就可以用了
会增加一个叫做ath0的网卡
iwconfig和ifconfig怎么用我就不多说了,hiahia,自己man或者–help吧
需要WEP加密的话再modprobe wlan_wep
六、一些诡异的问题的解决
WEP相关:
有时候一直无法和启用了WEP加密的AP关联,一直在搜索网络,这个问题我也碰到了
解决方法:
ifconfig ath0 down
iwconfig ath0 key restricted
iwpriv ath0 authmode 2
ifconfig ath0 up
然后就可以了,hmmm
我的网络配置文件(Debian系统)
cat /etc/network/interfaces
auto ath0
iface ath0 inet static
address 192.168.0.102
netmask 255.255.255.0
network 192.168.0.0
boardcast 192.168.0.255
gateway 192.168.0.1
wireless_essid roomxxx
wireless_mode Managed
wireless_rate 54M auto
wireless_key s:dummy
写完了,就这样子。hope it helps
[相关文章]
http://www.newsmth.net/pc/pccon.php?id=264&nid=147967&s=all