在Gentoo下一直没有安装成功NetGear 511g PC Card无线网卡,通过Gentoo Live CD 启动系统后,可以看到网卡芯片信息:
02:00.0 Ethernet controller: Marvell Technology Group Ltd. 88w8335 [Libertas] 802.11b/g Wireless (rev 03)
这块芯片我在网上没有找到合适的Linux驱动程序,直到发现ndiswrapper程序允许Linux内核模块加载到某些无线卡的Windows驱动编译内核,立马找一台Windows机器,安装Netgear驱动程序,找到WG511v2.INF,WG511v2.sys和WG511v2XP.sys三个文件。
安装无线网卡驱动前,先检查内核配置,支持无线网络和PC Card。
Networking --->
Wireless --->
<*> Improved wireless configuration API
<M> Generic IEEE 802.11 Networking Stack (mac80211)
Device Drivers --->
[*] Network device support --->
Wireless LAN --->
[*] Wireless LAN (IEEE 802.11)
<*> Marvell 8xxx Libertas WLAN driver support
<*> Marvell Libertas 8388 USB 802.11b/g cards
Bus options (PCI etc.) --->
<*> PCCard (PCMCIA/CardBus) support --->
--- PCCard (PCMCIA/CardBus) support
[ ] Enable PCCARD debugging
<*> 16-bit PCMCIA support
[*] Load CIS updates from userspace (EXPERIMENTAL)
[*] PCMCIA control ioctl (obsolete)
-*- 32-bit CardBus support
*** PC-card bridges ***
<*> CardBus yenta-compatible bridge support
<*> Cirrus PD6729 compatible bridge support
<*> i82092 compatible bridge support
安装ndiswrapper 程序和PCMCIA工具包。
emerge -av pcmcia-cs pcmciautils ndiswrapper
将前面在Windows中复制出来的驱动程序传到Linux中,通过WG511v2.INF将驱动添加到ndiswrapper中。
ndiswrapper -i WG511v2.INF
查看驱动程序是否正常安装:
ibmr40e ~ # ndiswrapper -l
wg511v2 : driver installed
device (11AB:1FAA) present
看到device present说明设备可以正常工作了,然后加载ndiswrapper内核模块:
modprobe ndiswrapper
添加ndiswrapper到/etc/modules.autoload.d/kernel-2.6中,系统重新启动时自动加载ndiswrapper模块。
到此为止,无线网卡驱动已经正常工作了,接下来安装wireless-tools和wpa_supplicant来配置无线网络。
emerge -av wireless-tools wpa_supplicant
执行iwconfig命令,可以看到一块新网卡wlan0,在/etc/init.d/中添加net.wlan0启动文件:
ln -s net.lo net.wlan0
编辑/etc/conf.d/net文件,添加新网卡设置和WPA设置:
# Set dhcp for both network adarpter
config_eth0=( "dhcp" )
config_wlan0=( "dhcp" )
dhcpcd_eth0="-t 5" # Timeout after 5 seconds
dhcpcd_wlan0="-t 5" # Timeout after 5 seconds
essid_wlan0="wireless"
modules=( "wpa_supplicant" )
wpa_supplicant_eth1="-Dwext"
在wpa_supplicant.conf文件中,配置SID和密钥等信息:
network={
key_mgmt=NONE
priority=-9999999
}
network={
ssid="wireless"
proto=WPA
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP WEP104 WEP40
psk=179e4afae068d33ffda68d7eff4a8cc872347ad94ae907bb3cb86e5cd44ec5a4
priority=10
}
为了防止在配置文件中写明文的密码,将明文密码转换成WPA PSK密钥:
# wpa_passphrase wireless mypasswd
network={
ssid="wireless"
#psk="mypasswd"
psk=4c5f7b33b841aad3cec35a6ef0ce6116663837e4afab4b31d40d5dcc7749731c
}
测试能否成功登录无线网络:
wpa_supplicant -Dwext -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
如果一切正常,启动无线网卡:
/etc/init.d/net.wlan0 start
Comments
There are currently no comments
New Comment