ubuntu下升级网卡驱动
无线局域网环境下,有个笔记本儿的无线经常断,而其它的终端都好好的,唯独它不行。所以想到检查和更新下无线网卡的驱动看看。以下是操作流程,记录一下。
阅读说明:##为标签, //为注释
##得到主板上的网卡的大概信息
lspci |grep -i network
06:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
06:06.0 Network controller: Intel Corporation PRO/Wireless 2200BG [Calexico2] Network Connection (rev 05)
//如果你是USB网卡 用lsusb
##获得无线网卡的具体信息
lspci -v //v表示详细信息
06:06.0 Network controller: Intel Corporation PRO/Wireless 2200BG [Calexico2] Network Connection (rev 05)
Subsystem: Hewlett-Packard Company nc6120/nx8220/nw8240
Flags: bus master, medium devsel, latency 32, IRQ 18
Memory at b0107000 (32-bit, non-prefetchable) [size=4K]
Capabilities: <access denied>
Kernel driver in use: ipw2200
Kernel modules: ipw2200 //得到无线网卡的型号
##检查驱动是否加载,此项可跳过。
lsmod |grep ipw2200
ipw2200 146148 0
libipw 46701 1 ipw2200
cfg80211 172392 2 ipw2200,libipw
lib80211 14570 3 ipw2200,lib80211_crypt_wep,libipw
##检查无线网卡驱动的版本号以及异常信息
dmesg |grep ipw2200
......略
[ 25.521451] ipw2200: Intel(R) PRO/Wireless 2200/2915 Network Driver, 1.2.2kmprq // 驱动版本为1.2.2
[ 25.521458] ipw2200: Copyright(c) 2003-2006 Intel Corporation
[ 25.935312] ipw2200 0000:06:06.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18
[ 25.935333] ipw2200: Detected Intel PRO/Wireless 2200BG Network Connection
[ 26.789821] ipw2200: Detected geography ZZR (14 802.11bg channels, 0 802.11a channels)
[ 484.266461] ipw2200: Failed to send SYSTEM_CONFIG: Already sending a command. //异常
[ 6471.372035] ipw2200: Failed to send SYSTEM_CONFIG: Already sending a command.
[10682.791894] ipw2200: Failed to send ASSOCIATE: Already sending a command.
[11005.568095] ipw2200: Failed to send CARD_DISABLE: Command timed out. //异常
[11516.823602] ipw2200: Failed to send SYSTEM_CONFIG: Already sending a command.
[16597.424064] ipw2200: Failed to send ASSOCIATE: Already sending a command.
[18535.294195] ipw2200: Firmware error detected. Restarting. //异常
[18535.295007] ipw2200: Failed to up device //异常
[18535.295487] ipw2200 0000:06:06.0: PCI INT A disabled
......略
##下载相应的固件
上网搜索ipw2200的驱动,在http://ipw2200.sourceforge.net/firmware.php找到了驱动,选择最新的固件,
点击相应的固件链接之后,出现的是一个许可文档,可以忽略,直接拉到下面点击I Agree就行。
我选的是driver versions v1.1.1 and newer firmware v3.1
既http://bughost.org/firmware/ipw2200-fw-3.1.tgz
##安装固件
tar zxvf ipw2200-fw-3.1.tgz,进入解压的目录cd ipw2200-fw-3.1,复制固件mv /lib/firmware/ipw2200-bss.fw /tmp;cp ipw2200-bss.fw /lib/firmware/
使固件生效。
执行rmmod ipw2200 && lsmod 核实驱动已经卸载。
对应dmesg是[ 297.215960] ipw2200 0000:06:06.0: PCI INT A disabled
modprobe ipw2200,挂载新的驱动,再执行iwconfig又会重新看到网卡了。//iwconfig用于查看无线连接情况
OK,完成,可以用iwlist scan扫描热点了。
##再用dmesg检查
[27287.321763] ipw2200: Intel(R) PRO/Wireless 2200/2915 Network Driver, 1.2.2kmprq //版本没有变化
[27287.321776] ipw2200: Copyright(c) 2003-2006 Intel Corporation
##安装完毕
由版本没有变化,说明之前的驱动已经是最新的了。问题可能没有根本解决,后续再观察。
不过,经过这番折腾,也总结了一些经验。
如果再掉线,我也不会去点什么重连了,重连慢的要命。直接rmmod ipw2200 && modprobe ipw2200 快速重连了--测试了多个命令,发现这个是最快的。
补充简单的iwconfig命令
iwconfig eth* essid xxxx key xxx
iwconfig eth* essid xxxx key open
iwconfig eth* power off
ifconfig eth* up
dhclient eth*