Chinaunix首页 | 论坛 | 博客
  • 博客访问: 399909
  • 博文数量: 100
  • 博客积分: 3893
  • 博客等级: 中校
  • 技术积分: 1040
  • 用 户 组: 普通用户
  • 注册时间: 2007-12-11 13:50
文章分类

全部博文(100)

文章存档

2013年(2)

2012年(3)

2011年(8)

2010年(38)

2009年(40)

2008年(9)

我的朋友

分类: LINUX

2009-02-13 00:37:12

  前几天从淘宝网上淘了一个无线网卡,是broadcom4306的,在windows下装了驱动后正常使用,但是在linux下就没法使用,用lsmod和modprobe命令都没有找到加载的网卡驱动,经过学习研究发现,broadcom的linux驱动不好使,只能使用ndiswrapper,通过加载windows下的驱动来是这个网卡在linux下工作,具体步骤如下:
 首先要安装ndiswrapper,然后找到broadcom4306的windows驱动,切换到这个驱动的目录下,执行:ndiswrapper -i bcmwl5.inf -i选项说明是安装的意思;bcmwl5.inf是windows下无线网卡驱动的配置文件。
  然后驱动就装好了,接下来可以把这个驱动模块加载到运行的驱动模块中,以后开机后就会自动加载无线网卡模块了,命令如下:ndiswrapper -m 命令简单明了。
  接着就可以使用你的无线网卡了,首先搜索附近的无线信号:iwlist wlan0 scan ;然后使用信号强的无线信号:iwconfig wlan0 ssid ssid-num ;最后自动获取地址:ifup-dhcp wlan0
 如果你装的是GNOME桌面,其实最后一步可以在图形界面里面操作了。下面我把SUSE Linux圣经里面关于在SuSE下如何使用无线网卡的原文粘贴下来,希望对需要的朋友会有所帮助:
  One of the best of the networking technologies that have come along in the past few
years is wireless networking. Wireless networking is having its quickest adoption in
the laptop market, and many machines now come with the Centrino chipset from
Intel.
If your laptop does not include an onboard wireless chipset, you will probably find
a good PCMCIA (an expansion slot for laptops) card that provides wireless support
for you. A lot of Linux users have had great results with the Cisco wireless cards.
If you are not sure whether your wireless networking card is supported in Linux, or
you are looking to purchase one, Google is always your friend. Use Google to search
for the term “Linux” and the model number of the wireless networking card you are
interested in.
Starting with SUSE 9.3 and in subsequent releases, SUSE has added a lot more sup-
port for the popular Centrino chipset. The firmware files for these chipsets are now
included in the distribution and are configurable in the same way as a normal net-
work card under YaST.
Chapter 15 ✦ Linux Networking
ndiswrapper
If you do not use one of the popular wireless cards supported out of the box in
SUSE, you can potentially use ndiswrapper. ndiswrapper is a great system that will
enable you to wrap a Linux kernel driver around a Windows network card driver to
be able to provide you with support for pretty much any network card out there.
Before you start with the configuration of your networking with ndiswrapper, you
must make sure you download the correct Windows drivers. If you are using a 64-
bit laptop (for example, an AMD 64), you must download the 64-bit version of the
driver. Similarly for a 32-bit laptop, you must use the 32-bit Windows drivers.
To get ndiswrapper working:
1. You need to install the ndiswrapper package using YaST. For more information
about how to install new applications under SUSE, refer to Chapter 1.
2. In the YaST package search screen, search for ndiswrapper and select it for
installation.
3. After ndiswrapper has been installed, you will need to download or copy the
Windows driver package to your SUSE installation. We use the A-Link WL54H
chipset as an example.
4. When downloaded, unarchive the package (Windows drivers usually come as
a zip file, so in this case use the unzip command — see Listing 15-17).
Listing 15-17: Using unzip to Unarchive a Windows Network
Driver
linux:~ # unzip WL54driver2.2.6.0.zip
Archive: WL54driver2.2.6.0.zip
inflating: RaLink2_RT2560.exe
creating: Win2K/
inflating: Win2K/rt2500.cat
inflating: Win2K/Rt2500.INF
inflating: Win2K/rt2500.sys
creating: Win9xMe/
inflating: Win9xMe/Rt2500.INF
inflating: Win9xMe/rt25009x.sys
creating: WinXP/
inflating: WinXP/rt2500.cat
inflating: WinXP/Rt2500.INF
inflating: WinXP/rt2500.sys
III ✦ Using the Command Line in SUSE Linux
5. After the driver archive has been unarchived, you need to install the driver
under ndiswrapper. If you want to support WPA (Wi-FI protected access), you
will need to use Windows XP version of the drivers. To install the driver, you
i
need to use ndiswrapper – (install). See Listing 15-18.
Listing 15-18: Using ndiswrapper to Install a Windows
Network Driver
linux:~/Win2K # ndiswrapper -i Rt2500.INF
Installing rt2500
linux:~/Win2K #
6. After the driver has been installed, you can then check whether ndiswrapper
has successfully recognized it by listing the driver it has installed using the –
l
option (list). See Listing 15-19.
Listing 15-19: Listing ndiswrapper Drivers
linux:~/Win2K # ndiswrapper -l
Installed ndis drivers:
rt2500 driver present
linux:~/Win2K #
7. If you are happy with the installed driver, you can load the ndiswrapper
module into the kernel and continue configuring your wireless network. See
Listing 15-20.
Listing 15-20: Installing the ndiswrapper Driver into the
Kernel
linux:~/Win2K # ndiswrapper -m
linux:~/Win2K # modprobe ndiswrapper
linux:~/Win2K #
Chapter 15 ✦ Linux Networking
The ndiswrapper – m command creates the module configuration and an alias for
your wireless network adapter so that the ndiswrapper module is always loaded
when you need to access your wireless network card.
Now that the ndiswrapper driver has been installed, you can access your Windows
wireless card like any other Linux-enabled driver.
Configuring Your Wireless Network
One of the first things you need to do to configure and join a wireless network is to
search for any wireless base stations that are within range. To do this you need to
use the iwlist command (see Listing 15-21).
Listing 15-21: Searching for a Wireless Network
thinkpad:~ # iwlist eth1 scan
eth1
Scan completed :
Cell 01 - Address: 00:30:BD:62:80:7A
ESSID:”WLAN”
Mode:Master
Frequency:2.462GHz
Bit Rate:1Mb/s
Bit Rate:2Mb/s
Bit Rate:5.5Mb/s
Bit Rate:11Mb/s
Quality:20/100 Signal level:-78 dBm Noise level:-98 dBm
Encryption key:off
The iwlist command returns all wireless networks in range as well as the frequency
and signal strength. In this case, you have found the network WLAN that you need
to join and configure.
To join a wireless network, you use the iwconfig command, which is effectively
ifconfig for wireless networks.
thinkpad:~ # iwconfig eth1 essid WLAN
The iwconfig command takes two very important parameters, the interface your
wireless network card has been attached to (eth1) and the ESSID (the network
name of your wireless network) of the wireless LAN you want to connect to.
III ✦ Using the Command Line in SUSE Linux
When the command has completed, you can then enable DHCP (Dynamic Host
Configuration Protocol) for that interface. SUSE includes ifup-dhcp and ifdown-
dhcp to attach a DHCP client to the network card. In this example, you attach the
DHCP process to eth1, which has now been configured and attached to the WLAN
wireless network.
thinkpad:~ # ifup-dhcp eth1
Starting DHCP Client Daemon on eth1... . IP/Netmask: 192.168.1.80 / 255.255.255.0
You can see that the wireless network has picked up 192.168.1.80/24 as our network
configuration.

阅读(2379) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~