您的位置:首页 > 运维架构 > Linux

CentOS5.4安装BCM4312无线网卡驱动

2010-08-15 11:08 525 查看
本人历经半个月终于配置成功linux下的Broadcom 4312无线网卡驱动,从中体会到了配置Linux无线网卡的不易之处,下面我把这段时间得到的经验分享给大家,希望能给大家一些

帮助。

本人使用的机器是DELL Latitude D630笔记本电脑,安装的是CentOS 5.4版本的操作系统,内核版本是2.6.18.164,无线网卡是Broadcom(BCM) 4312

Linux安装无线网卡一般分为三种方法:

第一种:编译内核

第二种:使用linux工具软件ndiswrapper,该软件的作用就是在Linux下把windows下的驱动模拟起来使用。

第三种:就是自己写喽。(谁都不希望是这种情况)

本人使用的方法是使用Linux工具软件ndiswrapper安装Broadcom(BCM) 4312无线网卡驱动。

说心里话,本人真应该好好感谢ndiswrapper工具软件,如果没有它偶很可能要去编译内核了。

一种称为ndiswrapper的程序能够允许Linux内核模块加载到某些无线卡的Windows驱动上。这就使得手提在Linux中使用无线卡,即使没有原始的Linux驱动。

ndiswapper官方网站:

http://ndiswrapper.sourceforge.net/

提取驱动组件,这个是前提!下载了windows下的无线驱动之后,就需要提取和你的无线网络硬件相关的.sys和.inf文件了,这些就是NdisWrapper所需要的所有东西了,剩下的文

件就可以丢弃了。

[root@localhost ~]# lspci | grep Broadcom

09:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5755M Gigabit Ethernet PCI Express (rev 02)

0c:00.0 Network controller: Broadcom Corporation BCM4312 802.11b/g (rev 01)

#第一行Broadcom Corporation NetXtreme BCM5755M Gigabit Ethernet PCI Express是我的物理有线网卡;第二行Broadcom Corporation BCM4312 802.11b/g是我的无线网卡

#以上是要找出是否有不匹配的无线网卡在加载。

#即使有无线网卡驱动已经被加载了,但是不匹配的话,就等于没有!

#这可是关键的问题哦,如果忽略了这个问题,做了N多次的也没有用。

将自带的无效驱动列入黑名单,免得启动时加载。

[root@localhost ~]# vi /etc/modprobe.d/blacklist

blacklist bcm4312

#编辑 blacklist文件,将bcm4312驱动列入黑名单。

#编辑完文件保存退出

下载ndiswrapper

请打开这个网址:

http://sourceforge.net/projects/ndis...载地址:

http://downloads.sourceforge.net
... wrapper-1.56.tar.gz)。

安装ndiswrapper

[root@localhost ~]#tar zxvf ndiswrapper-1.56.tar.gz

[root@localhost ~]#cd ndiswrapper

[root@localhost ndiswrapper-1.56]#make

[root@localhost ndiswrapper-1.56]#make install

按照这样的步骤ndiswrapper工具软件包就安装成功了(这个应该没有什么太大的问题吧)。

这就安装了ndiswrapper工具和不同于当前运行的内核的内核模块。你必须拥有有效的内核源代码。(对大部分RPM,只需安装“内核-源”软件包。

接着,你需要找到卡的Windows驱动的副本,该副本是从已经存在的Windows系统(如果是双重导入的)找到的或是下载下来的驱动,都是没有关系的。SourgeForge.net网站列出了

可支持的卡,并且提供链接供大家下载Windows驱动。

[root@localhost ndiswrapper-1.56]# ndiswrapper -h //使用ndiswrapper -h命令可以查看ndiswrapper命令参数的用法

install/manage Windows drivers for ndiswrapper

usage: ndiswrapper OPTION

-i inffile install driver described by 'inffile'

-a devid driver use installed 'driver' for 'devid' (dangerous)

-r driver remove 'driver'

-l list installed drivers

-m write configuration for modprobe

-ma write module alias configuration for all devices

-mi write module install configuration for all devices

-v report version information

where 'devid' is either PCIID or USBID of the form XXXX:XXXX,

as reported by 'lspci -n' or 'lsusb' for the card

[root@localhost DRIVER]# ndiswrapper -i bcmwl5.inf //后面的windows驱动文件*.inf最好是指一个绝对路径

installing bcmwl5 ...

*注:安装windows驱动除了需要*.inf信息文件,还需要相应的*sys系统文件。另外,*.inf和*.sys文件必须要在一个目录里面。

如果没有*.sys文件,就会出现如下提示:

installing bcmwl5 ...

couldn't find "BCMWL5.SYS" in "."; make sure all driver files, including .inf, .sys (and any firmware files) are in "." -

installation may be incomplete

forcing parameter IBSSGMode from 0 to 2

couldn't find "BCMWL5.SYS" in "."; make sure all driver files, including .inf, .sys (and any firmware files) are in "." -

installation may be incomplete

forcing parameter IBSSGMode from 0 to 2

couldn't find "BCMWL5.SYS" in "."; make sure all driver files, including .inf, .sys (and any firmware files) are in "." -

installation may be incomplete

forcing parameter IBSSGMode from 0 to 2

couldn't find "BCMWL5.SYS" in "."; make sure all driver files, including .inf, .sys (and any firmware files) are in "." -

installation may be incomplete

forcing parameter IBSSGMode from 0 to 2

couldn't find "BCMWL5.SYS" in "."; make sure all driver files, including .inf, .sys (and any firmware files) are in "." -

installation may be incomplete

forcing parameter IBSSGMode from 0 to 2

couldn't find "BCMWL5.SYS" in "."; make sure all driver files, including .inf, .sys (and any firmware files) are in "." -

installation may be incomplete

forcing parameter IBSSGMode from 0 to 2

couldn't find "BCMWL5.SYS" in "."; make sure all driver files, including .inf, .sys (and any firmware files) are in "." -

installation may be incomplete

forcing parameter IBSSGMode from 0 to 2

couldn't find "BCMWL5.SYS" in "."; make sure all driver files, including .inf, .sys (and any firmware files) are in "." -

installation may be incomplete

forcing parameter IBSSGMode from 0 to 2

couldn't find "BCMWL5.SYS" in "."; make sure all driver files, including .inf, .sys (and any firmware files) are in "." -

installation may be incomplete

forcing parameter IBSSGMode from 0 to 2

couldn't find "BCMWL5.SYS" in "."; make sure all driver files, including .inf, .sys (and any firmware files) are in "." -

installation may be incomplete

forcing parameter IBSSGMode from 0 to 2

couldn't find "BCMWL5.SYS" in "."; make sure all driver files, including .inf, .sys (and any firmware files) are in "." -

installation may be incomplete

forcing parameter IBSSGMode from 0 to 2

couldn't find "BCMWL5.SYS" in "."; make sure all driver files, including .inf, .sys (and any firmware files) are in "." -

installation may be incomplete

forcing parameter IBSSGMode from 0 to 2

couldn't find "BCMWL5.SYS" in "."; make sure all driver files, including .inf, .sys (and any firmware files) are in "." -

installation may be incomplete

forcing parameter IBSSGMode from 0 to 2

couldn't find "BCMWL5.SYS" in "."; make sure all driver files, including .inf, .sys (and any firmware files) are in "." -

installation may be incomplete

forcing parameter IBSSGMode from 0 to 2

couldn't find "BCMWL5.SYS" in "."; make sure all driver files, including .inf, .sys (and any firmware files) are in "." -

installation may be incomplete

forcing parameter IBSSGMode from 0 to 2

couldn't find "BCMWL5.SYS" in "."; make sure all driver files, including .inf, .sys (and any firmware files) are in "." -

installation may be incomplete

forcing parameter IBSSGMode from 0 to 2

couldn't find "BCMWL5.SYS" in "."; make sure all driver files, including .inf, .sys (and any firmware files) are in "." -

installation may be incomplete

forcing parameter IBSSGMode from 0 to 2

couldn't find "BCMWL5.SYS" in "."; make sure all driver files, including .inf, .sys (and any firmware files) are in "." -

installation may be incomplete

forcing parameter IBSSGMode from 0 to 2

安装成功后系统会生成/etc/ndiswrapper/bcmwl5目录,并且在目录下生成相关文件。

[root@localhost DRIVER]# ls /etc/ndiswrapper/bcmwl5/

14E4:4311:0007:1028.5.conf 14E4:4320:0002:1028.5.conf

14E4:4311:0008:1028.5.conf 14E4:4320:0003:1028.5.conf

14E4:4311.5.conf 14E4:4320:0004:1028.5.conf

14E4:4312:0007:1028.5.conf 14E4:4320.5.conf

14E4:4312:0008:1028.5.conf 14E4:4324:0001:1028.5.conf

14E4:4312.5.conf 14E4:4324:0002:1028.5.conf

14E4:4315:000B:1028.5.conf 14E4:4324:0003:1028.5.conf

14E4:4315:000C:1028.5.conf 14E4:4324:0004:1028.5.conf

14E4:4315.5.conf 14E4:4324.5.conf

14E4:4318:0005:1028.5.conf 14E4:4328:0009:1028.5.conf

14E4:4318:0006:1028.5.conf 14E4:4328:000A:1028.5.conf

14E4:4318.5.conf 14E4:4328.5.conf

14E4:4319:0005:1028.5.conf 14E4:432B:000D:1028.5.conf

14E4:4319:0006:1028.5.conf 14E4:432B.5.conf

14E4:4319.5.conf bcmwl5.inf

14E4:4320:0001:1028.5.conf bcmwl5.sys

查看ndiswrapper安装驱动是否成功

[root@localhost DRIVER]# ndiswrapper -l //查看驱动是否安装成功

bcmwl5 : driver installed

device (14E4:4315) present

注:出现以上文字,说明我的电脑里已经成功安装了bcmwl5驱动。

加载模块

ndiswrapper -m #加载模块,但是并不会在开机的时候自动加载!建议继续使用以下两个命令。

[root@localhost DRIVER]# ndiswrapper -ma

module configuration information is stored in /etc/modprobe.d/ndiswrapper.conf

[root@localhost DRIVER]# ndiswrapper -mi

module configuration information is stored in /etc/modprobe.d/ndiswrapper.conf

#这样的话开机就会自动加载了!

[root@localhost DRIVER]# modprobe ndiswrapper

安装成功无线网卡驱动之后,就可以使用NetworkManager来管理了。

在说个事NetworkManager之前请确认wireless_tool软件工具包是否安装,如果没有安装wireless软件工具包NetworkManager也不会好用的。

[root@localhost ~]# rpm -qa | grep wireless-tool

wireless-tools-28-2.el5

目前NetworkManager的最新版本是0.8,可以到这里下载NetworkManager原码包:

http://ftp.gnome.org/pub/GNOME/sourc...可以在系

统安装光盘里面找到。

[root@localhost ~]# rpm -qa | grep NetworkManager //查看是否安装NetworkManager软件包

NetworkManager-glib-0.7.0-9.el5

NetworkManager-0.7.0-9.el5

NetworkManager-gnome-0.7.0-9.el5

注:如果出现以上三个软件包说明NetworkManager已经安装了。

如果没有安装NetworkManager,请安装NetworkManager软件包。

NetworkManager的rpm包安装方法:

[root@localhost ~]#rpm -ivh NetworkManager-glib-0.7.0-9.el5

[root@localhost ~]#rpm -ivh NetworkManager-0.7.0-9.el5

[root@localhost ~]#rpm -ivh NetworkManager-gnome-0.7.0-9.el5

或者

[root@localhost ~]# yum -y install NetworkManager NetworkManager-gnome

NetworkManager的原码包安装方法:

[root@localhost ~]tar zxvf NetworkManager-0.8.tar.gz

[root@localhost ~]cd NetworkManager-0.8

[root@localhost NetworkManager-0.8]make

[root@localhost NetworkManager-0.8]make install

NetworkManager安装完以后把它设置为开机自动启动。

[root@localhost ~]# chkconfig --level 5 NetworkManager

重新启动计算机

[root@localhost ~]#reboot

重新启动计算机后会发现在屏幕的右上角会出现一个无线网卡图标,右键点击“启用无线”,然后再左键选择一个无线资源上网即可。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  职场 驱动 休闲