个人工具

WifiDocs/Driver/bcm43xx

来自Ubuntu中文

跳转至: 导航, 搜索


Using Broadcom Wireless in Ubuntu Breezy 5.10

Broadcom wireless chipset

Broadcom manufactures a chipset family called the Broadcom 43xx which is used in a lot of wireless products, including the Apple Airport Extreme, some Linksys products, and many Dell and Acer notebooks. They do not work out of the box on Ubuntu because the manufacturers have not released (open or closed) drivers for Linux; apparently they have not opened source because of security concerns (see this forum posting).

Broadcom生产的系列芯片称为Broadcom 43xx,应用于许多的无线产品中,包括苹果公司的Airport Extreme、一些linksys产品和许多Dell和Acer的笔记本电脑。由于厂商没有发布Linux下的驱动,所以,在Ubuntu系统下,它不能工作;看起来由于安全措施原因,他们也不准备开源(见 this forum posting)。

All is not lost: the very useful Ndiswrapper, which allows you to use vendor-supplied Windows wireless drivers in Linux, does work with these chips. There are occasional bugs (such as ESSID not being set or signal strength displaying incorrectly), but wireless networking can be done.

一切皆有可能:Ndiswrapper是非常有用的,它可以让你在Linux下使用厂商提供的Windows系统的无线驱动,针对这些芯片Ndiswrapper是工作的。尽管也有一些偶然的问题(比如ESSID无法呗设置或信号强度不正确显示),但无线网络是可以工作的。

How To find out if you're using Broadcom 43xx

如何确定你是否使用Broadcom 43xx

In a terminal, type `lspci`, which lists the PCI devices in your system. The output might include something like

在终端中,输入“lspci”命令,,这个命令列出你系统的PCI设备。输出结果包括

0000:02:02.0 Network controller: Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller (rev 03)

in which case you've got a Broadcom 4306. You can find out a bit more information about the driver by typing `lspci -n`, which in my case includes the line

就说明你有Broadcom 4306这个设备。你可以输入“"lspci -n" 命令可以得到这个设备更多的信息。我这里的结果是

0000:02:02.0 0280: 14e4:4320 (rev 03)

Setup

This section's contents are copied from a posting on Ubuntu forums. I suspect these instructions don't work on the Apple Airport Extreme (see WifiDocs/Device/AirportExtreme)

这部分内容引自Ubuntu论坛的一个帖子。我怀疑这些在苹果的Airport Extreme(见 WifiDocs/Device/AirportExtreme)上是不工作的。

Broadcom wireless cards are tricky to set up in ubuntu, and the forums are full of frustrated users seeking advice. Broadcom provide no Linux support (feel free to complain to your hardware vendor or choose a different card if you haven't yet shelled out your cash), but they can be made to work - and you're in the right place if you want to know how.

Broadcom无线网卡在Ubuntu下要谨慎的设置,论坛中充满沮丧的使用者在寻求建议。Broadcom不提供Linux的支持(如果你还没有付费,你可以向你的硬件提供商报怨或者选择其它的卡),但它确实是可以工作的-如果你想知道怎么做,你就来对地方了。

First, you need to find out if this How To is for you. Broadcom wireless cards come under many brand names and, in particular, are used in many Dell and Acer laptops. Look for the drivers supplied with your card (Dell usually store a copy in `C:/DRIVERS/NETWORK/ADDON`); if you have a file called `bcmwl5.inf` or `bcmwl5a.inf` then keep on reading. You won't succeed without following these instructions!

首先,你要明白这个介绍是否适合你。Broadcom无线网卡编入到许多商标名称,尤其是在许多的Dell和Acer的笔记本电脑中,这种情况更为明显。寻找你网卡所提供的驱动(Dell机器通常在C:/DRIVERS/NETWORK/ADDON/目录中保存一个拷贝);如果你有名字是bcmwl5.inf或bcmwl5a.inf文件的话,继续读下去。不看下面的指导,你就不能正确的配置。

  • Before you start, clear out any mess from existing failed attempts to use ndiswrapper. Note that you shouldn't use a root terminal to execute the code in this how-to; use a normal terminal session instead.
  • 开始前,清理掉以前使用ndiswrapper的失败尝试。注意,不要使用root用户终端执行本篇指导中的代码;请使用正常的终端。
sudo modprobe -r bcmwl5
sudo rmmod ndiswrapper
sudo apt-get remove ndiswrapper-utils
sudo rm -r /etc/ndiswrapper/
sudo rm -r /etc/modprobe.d/ndiswrapper

Some of these steps may report errors; just ignore them.

这些步骤可能会报错;忽略出错信息。

  • Copy the `bcmwl5.inf` and `bcmwl5.sys` files to your desktop.

拷贝bcmwl5.inf和bcmwl5.sys文件到你的桌面上。

接下来参看如何添加另外的源

  • Open a terminal session and enter this code. Note that you need an active network connection for this to work; I've assumed that if you have access to a wireless LAN, you also have access to a wired network as a fallback.

打开终端,输入如下代码。注意,这部分需要一个活动的网络连接;我假定你可以访问无线局域网,作为应急办法你也能访问有线网络。

sudo apt-get install ndiswrapper-utils
sudo ndiswrapper -i ~/Desktop/bcmwl5.inf
sudo ndiswrapper -m
for conffile in /etc/ndiswrapper/bcmwl5/*.conf; do
sudo cat $conffile | sed -e 's/RadioState|1/RadioState|0/' > $conffile
done
  • Reboot your PC. On restarting, the light on your wireless card should come on. If not, try entering

重启你的机器。在机器启动的时候,你的无线网卡的灯是亮的。如果不是,请尝试输入

sudo modprobe ndiswrapper
  • Your card is now working. Open the networking configuration tool System --> Administration --> Networking.

现在你的无线网卡已经工作了。打开网络配置工具 系统-->系统管理-->网络。

  • Select your wireless network card (probably `wlan0`) and hit the properties button.

选择你的无线网卡(名字可能是wlan0),点击属性按钮。

  • Tick the This device is configured box, and enter your network name and connection settings. Ask your office network administrator for support if you don't know what this question means, or copy your settings from Windows.

钩选上启用此连接,输入你的网络名称和连接设置。如果你不知道这些问题,从你的网络管理员处得到帮助,或者参照Windows系统下的设置。

  • BE CAREFUL entering your WEP key, if you're using one. You're expected to enter this in hexadecimal form; if you don't speak hex, prefix your key with s:

如果你使用WEP,请小心输入你的WEP密钥。你应该输入十六进制格式;如果你不使用十六进制,你的密钥前缀是s:

  • Click OK. The screen should close fairly quickly; if it hangs, you probably aren't connected properly.

点击确定。当前对话框很快关闭;如果不是,你大概不能正常的连接。

  • Back in the Network Settings screen, select your wireless device as the default gateway device.

返回网络设置,选择你的无线设备作为默认网关设备。

  • Click OK. Again, the screen should close fairly quickly.

点击确定,对话框快速关闭。

  • Enjoy wireless nirvana. If everything works, you can delete the `bcmwl` file from your desktop.

体味无线天堂的乐趣吧。如果每件事情都顺利的话,你可以删掉桌面的bcmwl文件了。

  • You might notice that the signal strength applet doesn't work properly. This is a known bug with these cards.

你可能会注意到信号强度工作不正常。这是这些卡的已知错误了。

If you have trouble, try booting into Windows - if you dual boot - and checking that the card is enabled. Some laptops allow the wireless card to be switched off, usually with a special key combination, and I've not found a reliable way to make this work in Linux.

如果你有问题,启动到Windows系统-如果你是双操作系统-检查网卡是否工作。有些笔记本电脑的无线网卡是可以关掉的,通常这是特殊的暗码,我没有找到在Linux下可靠的解决办法。

Resources

Security

I'm not sure if WPA works - I've not tried.

我不确定WPA是否工作-我没有试过。

Bugs

My Linksys PCI card occasionally crashes the computer when someone tries to use my wireless connection (I've set up my desktop to share its wired internet connection).

当有人试图使用我的无线连接的话,我的Linsys PCI卡偶尔会使系统崩溃(我已经共享了我的笔记本电脑的无线网络连接)。

Using Broadcom Wireless in Ubuntu Dapper 6.10

Using the New Broadcom Driver

Airport Extreme cards found on most Apple laptops use this chipset. The Dapper kernel has support inbuilt for the Broadcom device. You should be able to get the card working in Dapper by following the steps below.

绝大多数苹果笔记本电脑上的Airport Extreme卡都使用这个芯片。Dapper的内核已经内建了对Broadcom的支持。你按照接下来的步骤,可以使无线网卡在Dapper下工作。

Extract the Firmware

You don't need to compile the driver as a precompiled module is present. However, we need to extract the firmware for the card. Download fwcutter by checking out the subversion source.

当前,你不需要作为预编译模块编译驱动。无论如何,我们需要提取固件。通过检查坏源下载fwcutter。

svn checkout svn://svn.berlios.de/bcm43xx/trunk/fwcutter
cd fwcutter
make

Open up the readme file, and see how you can obtain the driver file. It might be illegal to post the link here. Copy the driver file to the fwcutter directory.

查阅readme文件,确定你如果获得驱动文件。在这里提交连接可能是不合法的。拷贝驱动文件到fwcutter目录中。

./fwcutter <driver_file>
sudo make installfw

The driver files will be copied to /lib/firmware.

驱动文件被拷贝到/lib/firmware目录中。

Setting up the Wireless Card

sudo modprobe bcm43xx

The device gets loaded as either eth1/eth2 (some weird kernel bug, i am guessing). Find out which one it is by doing a

驱动作为eth1/eth2两者中的一个被加载(我猜是怪异的内核错误)。使用如下命令找出一个

iwconfig

This should return the name of the interface as ethX. Check if you can scan for networks using

以ethX的名字返还。使用下面命令检查你是否能够扫描网络

sudo iwlist ethX scan

The following steps should get you connected on to the network.

接下来的步骤可以使你连接到网络。

interface=eth1
# Turning off other network devices"
sudo ifconfig eth0 down
sudo modprobe bcm43xx
# setting wireless device parameters
sudo ifconfig $interface up # This step is very very important!
sudo iwconfig $interface essid your_essid_here
sudo iwconfig $interface mode managed
sudo iwconfig $interface key off # see man iwconfig for wireless encrpytion
"Setting up dhcp"
sudo dhclient $interface

An alternative script is given below.

这是一个可选的脚本。

#!/bin/bash <br>
if [ -z "$2" ]<br>
then<br>
iwlist  scan | grep ESSID<br>
echo "+++++++++++++++++++++++++++++++++++++++++++++++  "<br>
echo "Usage: getit [interface] [essid]  "<br>
echo "Pick one of the above essid's "<br>
echo "use the interface that had the essids"<br>
echo "+++++++++++++++++++++++++++++++++++++++++++++++  "<br>
exit $E_NOARGS<br>
fi  <br>
echo "Bringing network down"<br>
ifdown eth1 &>3<br>
echo "Bringing network back up"<br>
ifup $1 &>3<br>
echo "Changing to $2"<br>
iwconfig $1 essid $2 &>3<br>
echo "Changing to rate to 11M"<br>
iwconfig $1 rate 11M &>3<br>
echo "acquiring IP"<br>
dhclient $1 <br>

The forum link (applies to Dapper, to be released around 4/2006) where this is discussed is http://ubuntuforums.org/showthread.php?t=114922



Reader Comments

  • Dapper section needs cleanup, testing, and expansion... towsonu2003 02.08.2006
  • Both scripts should be merged . VenkatRaghavan 02.12.2006