特殊:Badtitle/NS100:WifiDocs/Driver/bcm43xx/Breezy

来自Ubuntu中文
Oneleaf留言 | 贡献2007年11月21日 (三) 17:30的版本
跳到导航跳到搜索
可打印版本不再受到支持且可能有渲染错误。请更新您的浏览器书签并改用浏览器默认打印功能。

{{#ifexist: :WifiDocs/Driver/bcm43xx/Breezy/zh | | {{#ifexist: WifiDocs/Driver/bcm43xx/Breezy/zh | | {{#ifeq: {{#titleparts:WifiDocs/Driver/bcm43xx/Breezy|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:WifiDocs/Driver/bcm43xx/Breezy|1|-1|}} | zh | | }}

Using Broadcom Wireless in Ubuntu Breezy 5.10

PPC: Breezy does not support the Apple Airport Extreme without building a custom kernel (see section on [link here]), but Dapper includes a native driver UbuntuHelp:WifiDocs/Driver/bcm43xx/Dapper.


Ndiswrapper

This section's contents are copied from a posting on Ubuntu forums.


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.

First, you need to find out if this guide is applies to 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!

Removing previous ndiswrapper

  • 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.
sudo modprobe -r bcmwl5
sudo modprobe -r 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.

Installing ndiswapper

  • Copy the `bcmwl5.inf` and `bcmwl5.sys` files to your desktop.
  • Follow the advice given at How to add extra repositories.
  • 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 sed --in-place 's/RadioState|1/RadioState|0/g' $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.
  • 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.
  • 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:
  • 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.
  • 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.

You can check if your card is disabled by using the command "sudo lshw -C network". If you see: *-network:0 DISABLED you have have disabled your card using a keyboard combination by mistake!

Native Drivers (using a Custom Kernel)

This document gives Ubuntu-specific (but quite general) instructions to install a driver for wireless devices with the Broadcom bcm43xx chipset, in particular Airport extreme cards.

You can find more detailed instructions at [1]. The open-source driver development page is located on the BCM43XX Developer website.

<!> This has only been tested with Ubuntu 5.10 (Breezy Badger) release using a self-compiled kernel as the bcm43xx driver requires a 2.6.15 or newer kernel.

IconsPage?action=AttachFile&do=get&target=IconDialog-Warning1.png The following instructions are not step-by-step. As installing this driver is currently only for advanced users, you are supposed to do your job, and it is not just cutting and pasting.

Install a custom kernel

First of all, you need a recent kernel, that is 2.6.15 or newer. Since Ubuntu 5.10 (Breezy Badger) comes with a 2.6.12 kernel, you need to compile one for yourself. If you are too lazy, you can grab a deb of JoeOblivian's latest here. Once you have installed it, refresh yaboot, reboot and check if everything is working fine.

sudo -s
dpkg -i your-kernel
ybin
reboot

{i} Please note that some people prefer to use an Ubuntu 6.06 (Dapper Drake) kernel. If you prefer, feel free to use the latest kernel from Ubuntu 6.06 instead of building one for yourself.

Grab the Software

Then you need to download the IEEE 802.11 SoftMAC snapshot plus the latest snapshots of the bcm43xx driver (not the dscape one) and bcm43xx-fwcutter from the BCM43XX Developer Site. The following URLs are a known working combination.


You will also need the latest versions of some wireless utilities.

apt-get install wireless-tools
apt-get install wpasupplicant

Install the Firmware

Download and compile the fwcutter utility. {i} This tool will extract the binary firmware from the Apple Airport drivers and install it into the Linux firmware directory.

tar xjvf bcm43xx-fwcutter-20060119.tar.bz2
cd bcm43xx-fwcutter-20060119
make

Grab the firmware for your Airport Extreme from OS X. The following instructions assume you have a dualboot and you have mounted your OS X drive under Linux with root directory OSXROOT (most usually it's /macosx). If you have not done that then use some other means to copy that file ( {i} you can take a look at the README included in the fwcutter directory where some URI are given). Copy the Apple Airport driver to the build directory you just created and extract the firmware.

cp $OSXROOT/System/Library/Extensions/AppleAirPort2.kext/Contents/MacOS/AppleAirPort2 .
./fwcutter AppleAirPort2
fwcutter can cut the firmware out of AppleAirPort2
filename :  AppleAirPort2
version  :  3.90.34.0.p11 (400.17)
MD5      :  dc3a69aac95c68fe8edc760e39bbb2c9

WARNING! This firmware doesn't include support for 802.11a cards.
WARNING! Use this firmware only for 802.11b/g cards.

extracting bcm43xx_microcode2.fw ...
extracting bcm43xx_microcode4.fw ...
extracting bcm43xx_microcode5.fw ...
******: Sorry, it's not posible to extract "bcm43xx_microcode11.fw".
******: Extracting firmware from an old driver is bad. Choose a more recent one.
******: Luckily bcm43xx driver doesn't include microcode11 uploads at the moment.
******: But this can be added in the future...
extracting bcm43xx_pcm4.fw ...
extracting bcm43xx_pcm5.fw ...
extracting bcm43xx_initval01.fw ...
extracting bcm43xx_initval02.fw ...
extracting bcm43xx_initval03.fw ...
extracting bcm43xx_initval04.fw ...
extracting bcm43xx_initval05.fw ...
extracting bcm43xx_initval06.fw ...
extracting bcm43xx_initval07.fw ...
extracting bcm43xx_initval08.fw ...
extracting bcm43xx_initval09.fw ...
extracting bcm43xx_initval10.fw ...

Then install the firmware

export  FIRMWARE_INSTALL_DIR=/lib/hotplug/firmware
make installfw

Beware that the firmware shipped with OS X Tiger is not supported by fwcutter. In that case, you'll need to find a suitable firmware from one of the sources listed in the readme file. I'd post the firmware here if there were no legal issues. Update 20060121: the latest version of fwcutter successfully extracted the firmware from the OS X Tiger Airport Extreme drivers.

Install SoftMAC and bcm43xx

Download and install the latest softmac layer. This should install the softmac ieee80211 kernel drivers.

tar xvjf softmac-snapshot.tar.bz2
cd softmac-snapshot
make
make install

Then do the same for the bcm43xx snapshot. This particular snapshot works but check the website for more recent snapshots.

tar xjvf bcm43xx-20060119.tar.bz2
cd  bcm43xx-20060119
make
make install

Once you have done this, you are ready! Just type:

modprobe bcm43xx

and you should see in dmesg something like:

[   57.137024] ieee80211_crypt: registered algorithm 'WEP'
[   57.194199] bcm43xx: set security called
[   57.194215] bcm43xx:    .active_key = 0
[   57.194219] bcm43xx:    .level = 1
[   57.194222] bcm43xx:    .enabled = 1
[   57.194226] bcm43xx:    .encrypt = 1
[   57.216599] bcm43xx: PHY connected
[   57.750700] bcm43xx: InitVals fileformat error.
[   57.750764] bcm43xx: InitVals fileformat error.
[   57.758868] bcm43xx: Radio turned on
[   57.925913] bcm43xx: Chip initialized
[   57.926145] bcm43xx: DMA initialized
[   57.926156] bcm43xx: 80211 cores initialized
[   57.926358] bcm43xx: Keys cleared

Configure the network

Configure the IP address settings on eth1 using whatever method you prefer. DHCP works and can be most simply configured with System->Administration->Networking. If you use WEP can also configure your WEP key within that GUI dialog.

If you want to use WPA for greater security you need to use wpa_supplicant and that needs to be configured from the command line. The most complete instructions are in the WPAHowto. Here's a very quick guide for configuring WPA.

Modify /etc/default/wpasupplicant so Ubuntu knows that eth1 requires WPA.

cat /etc/default/wpasupplicant
ENABLED=1
OPTIONS="-i eth1 -D wext -c /etc/wpa_supplicant.conf -d"

Modify /etc/wpa_supplicant.conf to contain your preshared key (PSK) and your SSID. The PSK must match what has been set on your access point.

cat /etc/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1
network={
ssid="YourSSID"
scan_ssid=1
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
psk="YourPSK"
}

Confirm that your access point is configured for WPA and then check the status of your WPA authentication under Linux using the wpa_cli tool.

wpa_cli
> status verbose
bssid=00:00:00:00:00:00
ssid=YourSSID
pairwise_cipher=CCMP
group_cipher=TKIP
key_mgmt=WPA2-PSK
wpa_state=COMPLETED
> quit

For more details about making WPA-PSK work with the softmac version of bcm43xx take a look at the BCM43XX developer mailing list and in particular to this thread.