bcm43xx
ContentsBRTableOfContents |
1. Using Broadcom Wireless in Ubuntu Breezy 5.10
1.1. 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 HP, Compaq, Dell and Acer notebooks. They do not work out of the box on Ubuntu 5.10, (but does most of the time in Ubuntu Dapper 6.10) because the manufacturers have not released (open or closed) drivers for Linux; apparently they have not opened source because of security concerns (see [http://ubuntuforums.org/showpost.php?p=2839&postcount=5 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.
1.2. How To find out if you're using Broadcom 43xx
In a terminal, type lspci, which lists the PCI devices in your system. The output might include something like
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
0000:02:02.0 0280: 14e4:4320 (rev 03)
1.3. Setup
This section's contents are copied from [http://ubuntuforums.org/showthread.php?t=25683 a posting on Ubuntu forums].
PPC: Breezy does not support the Apple Airport Extreme without building a custom kernel (see ["WifiDocs/Device/AirportExtreme"]), but Dapper includes a [#head-e70dd6b5c57894d32e3eddc4f3e21d7d6d02230f native bcm43xx driver] as of kernel version 2.6.15.
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 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!
1.4. 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.
1.5. Installing ndiswapper
Copy the bcmwl5.inf and bcmwl5.sys files to your desktop.
Follow the advice given at [https://wiki.ubuntu.com/AddingRepositoriesHowto 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.
1.6. Resources
[https://wiki.ubuntu.com/WiFiBroadcomDriver Another Howto Page that really works]
[http://ubuntuforums.org/showthread.php?t=114922 Forum posting] about drivers included in Dapper
[http://ubuntuforums.org/showthread.php?t=25683 BCM Howto] on the forum
[http://bcm43xx.berlios.de/ Open source Broadcom 43xx project]
[http://openfacts.berlios.de/index-en.phtml?title=Bcm43xxDevices Devices which work with the open driver]
[http://wifinetnews.com/archives/006116.html Driver news article]
WifiDocs/AirportExtreme also describes a (rather more difficult) way to get the BCM chip working on an Apple
1.7. Security
WPA works, but wpasupplicant may hang your machine when the interface is deconfigured via /sbin/ifdown.
1.8. 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).
2. Using Broadcom Wireless in Ubuntu Dapper 6.06
2.1. Upgrading to Dapper, keeping ndiswrapper
If you have upgraded from Breezy Badger to Dapper Drake and your ndiswrapper wireless is broken (and you have a broadcom 43xx card) and you would like to still use ndiswrapper, you can easily disable the bcm43xx driver by running:
echo 'blacklist bcm43xx' | sudo tee -a /etc/modprobe.d/blacklist
This will ensure that the bcm43xx driver doesn't load at startup and will therefore not conflict with ndiswrapper.
To get it working without a reboot, you must unload the native driver and load up ndiswrapper. Simply run these commands:
sudo rmmod bcm43xx sudo rmmod ndiswrapper sudo modprobe ndiswrapper
2.2. 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.
WARNING: There have been reports the firmware package mentioned below can hang the system at bootup in Apple Powerbooks with a 4318 controller! Check whether you have one of these using:
lspci -v
The 1.1 version of the firmware package checks for one of these cards and refuses to install if one is found.
2.2.1. Prerequisites
You must broadcast your essid from your router. This is not essential, and the wireless card will connect if broadcast is turned off and you specify the essid by hand, but it makes it easier to test.
Don't use ifup and ifdown until you configure your /etc/network/interfaces file. (see below for instructions on howto do that ["http://ubuntuforums.org/showpost.php?p=899926&postcount=24"] here [url]; .)
You must remove ndiswrapper if you where using it before, instructions on how can be found [#head-f63b172ef162fdab65dae57bbd33e6df20ca4114 here];
You must remove wifi-radar, as it has a driver conflict with the driver.
2.2.2. Obtaining the Firmware
You don't need to compile the driver as a precompiled module is present. However, we need to obtain the firmware for the card from a windows, Mac OS X or Access Point driver. You can install the firmware from a 3rd party package (See [#head-cf3f0ec9146ae9441b39c4bed74e5d044ef78d2f Experimental Firmware Packages]) or extract it yourself.
2.2.2.1. Extract it Yourself
If/when Ubuntu do a kernel upgrade to 2.6.17 or later you MUST use wl_apsta.o (the script does that). The new module does not have the invalid AP bug. To obtain the wl_apsta.o visit http://drinus.net/airport/wl_apsta.o. (From the bcm43xx team).
sudo apt-get install bcm43xx-fwcutter
Links to various drivers come with the package. View them via
zless /usr/share/doc/bcm43xx-fwcutter/README.gz
and pick one to download. Extract the firmware parts and install them to the correct location.
sudo bcm43xx-fwcutter -w /lib/firmware <downloaded file>
The driver files will be copied to /lib/firmware.
Alternatively you can run the provided script: /usr/share/bcm43xx-fwcutter/install_bcm43xx_firmware.sh
2.2.2.2. Experimental Firmware Packages
If you do not want to go looking for a windows driver and chop it up, there is an experimental package containing the firmware modules. You can fetch the package using the following command:
wget http://ubuntu.cafuego.net/pool/bcm43xx/bcm43xx-firmware_1.1-0ubuntu1_all.deb
Then install it using
sudo dpkg -i bcm43xx-firmware_1.1-0ubuntu1_all.deb
This will install all firmware files to /lib/firmware for all currently installed kernels.
2.2.2.2.1. Problems
If your kernel is updated, but the symbolic links are not updated for this new kernel, you may encounter the following message in dmesg:
[4363141.967000] bcm43xx: Error: Microcode "bcm43xx_microcode5.fw" not available or load failed. [4363144.826000] bcm43xx: Error: Microcode "bcm43xx_microcode5.fw" not available or load failed.
This can be resolved by upgrading to the latest firmware package version, which no longer uses symbolic links.
2.2.3. 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
iwconfig
This should return the name of the interface as ethX. Check if you can scan for networks using
sudo iwlist ethX scan
VERY IMPORTANT: MOST PEOPLE NEED TO USE THE FOLLOWING COMMAND TO GET CONNECTED
sudo iwconfig ethX rate 11M
You can add this to you /etc/network/interfaces file to get connected at startup. Like so:
iface eth1 inet dhcp pre-up sudo iwconfig eth1 rate 11M
Alternatively just add "rate 11M" to /etc/network/interfaces like this example of an 802.11b WEP network:
iface eth1 inet dhcp rate 11M wireless-essid My network wireless-key 1234-5678-9abc-def0-1234-5678-9a
If when you type iwconfig eth1 you get
eth1 IEEE 802.11b/g ESSID:"troublemaker" Nickname:"Broadcom 4318" Mode:Managed Frequency=2.437 GHz Access Point: '''Invalid''' Bit Rate=11 Mb/s Tx-Power=18 dBm RTS thr:off Fragment thr:off
you need to run
sudo iwconfig eth1 ap any
this will fix it, it might also do to add this to you /etc/network/interfaces file, (sounds like a good time to make a script? and runn that with preup?) This has been fixed as of kernel 2.6.17. You must use wl_apsta.o ( http://drinus.net/airport/wl_apsta.o) with that kernel to fix the problem (from the bcm43xx team) here's an example of my startup script
sudo ifconfig $myInterface up &>/dev/null sudo iwconfig $myInterface essid $myEssid &>/dev/null sudo iwconfig $myInterface rate 11M # &>/dev/null
note I don't know if 'sudo' is needed or 'if ifconfig ethX up' is needed but I use it and it works
Note 'sudo iwconfid eth1' will report any WEP key, but 'iwconfig eth1' (as unprivileged user) does not.
2.3. NetworkManager
As of kernel 2.6.15-20, the driver appears to play nice with NetworkManager and nm-applet. When trying this, make sure wpasupplicant is disabled in /etc/default/wpasupplicant and all lines referring to the wireless card in /etc/network/interfaces are commented out.
2.4. Security
WPA works, but wpasupplicant may hang your machine when the interface is deconfigured via /sbin/ifdown.
Sample options from /etc/default/wpasupplicant
OPTIONS="-i eth0 -D wext -c /etc/wpa_supplicant.conf"
2.5. Trouble Shooting in Dapper
2.5.1. Were you using NDISwrapper ? OR Crashing when trying to use Networking
try
sudo rmmod bcm43xx sudo rmmod ndiswrapper sudo modprobe bcm43xx
Then run one of the below scipts
If your card starts to work then you need to remove ndiswrapper from your system follow the steps in Removing Ndiswrapper from the Breezy section above.
2.5.2. Scripts to get Connectivity
Here are Two Scripts to get Connectivity:
Both will prompt for root password (use: ./[script-name])
2.5.2.1. Managed Connectivity Script
interface=eth1 # fill in whatever your interface is here it should typically be eth1 # Turning off other network devices" sudo ifconfig eth0 down # assumes you have a wired NIC remove if you don't have one 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 mode auto # another suggested mode sudo iwconfig $interface key off # see man iwconfig for wireless encrpytion echo "Setting up dhcp" sudo dhclient $interface
2.5.2.2. Connectivity Script For Beginners
It must be run as root to work. i.e (sudo ./[script-name])
Good script for beginners, if you don't know how to run a script: google it and then use this one, don't read this script unless you understand scripting already as it's ugly to read.
Run the script without arguments and this script will try and auto connect to your most likely interface and essid to use:
if [ "$1" == --help ] then echo "Listing of ESSID's" # Lists the availble ESSIDs iwlist scan | grep ESSID echo "Likely interface: " # Grabs the name of the interface that succefully scanned iwlist scan | grep completed | sed "s/Scan\scompleted\s://g" echo "+++++++++++++++++++++++++++++++++++++++++++++++ " echo "Usage: getit [interface] [essid] " echo "Pick one of the above interface and essid's" echo "use the interface that had the essids" echo "+++++++++++++++++++++++++++++++++++++++++++++++ " exit fi if [ -z $2 ] ; then myEssid=any else myEssid=$2 fi if [ -z $1 ] ; then myInterface="eth1" # typically eth1 but may be something else else myInterface=$1 fi echo "Bringing network down" sudo ifconfig $myInterface down &>/dev/null echo "Bringing network back up" sudo ifconfig $myInterface up &>/dev/null echo "Changing to $myEssid" sudo iwconfig $myInterface essid $myEssid &>/dev/null echo "Changing to rate to 11M" # this isn't always necessary but helps for Broadcom 4318 cards sudo iwconfig $myInterface rate 11M &>/dev/null # if your having issue getting connected to a network echo "acquiring IP" sudo dhclient $myInterface
The forum link (applies to Dapper, to be released around 6/2006) where this is discussed is http://ubuntuforums.org/showthread.php?t=114922
2.5.3. Changing Back to ndiswrapper
If the driver isn't for you then you can change back to ndiswrapper by following the above breezy steps for installing bcml4344. You also need to make the additional step of adding bcml43xx to /etc/modprobe.d/blacklist so that the driver isn't automatically added into the kernel at boot. The quick command to do this is:
echo "blacklist bcm43xx" | sudo tee -a /etc/modprobe.d/blacklist
3. Reader Comments
- Dapper section needs cleanup, testing, and expansion... towsonu2003 02.08.2006
Both scripts should be merged . VenkatRaghavan 02.12.2006
- On my Acer Ferrari 4005 this driver needs to be set to freq 11M so I can use WEP/WPA: sudo iwconfig eth1 rate 11M
- the /etc/network/interfaces system probably understands lines like "wireless-foo arg" to mean "iwconfig [correctInterface] foo arg". Using that shortcut would simplify some of the lines shown above. -drewp
On my Acer Aspire 5024 Amd64 based the ndiswrapper module provided with amd64-k8 ubuntu kernel didn't work, and I had to build it from sources available at http://prdownloads.sourceforge.net/ndiswrapper/ndiswrapper-1.13.tar.gz?download
This document is a must and should be included in the OFFLINE Dapper documentation. I already have a bug filed about this here https://launchpad.net/bugs/42453 please comment -thanks
I have had success with a Belkin BCM4306 F5D7000 Rev 2.0. However I can no longer access System -> Administration -> Networking without it breaking the install. Also I think more info should be provided re the scripts and how to get them to run at startup. the_tiger 05.05.2006
I finally got the BCM4306 in my iBook working with the Dapper kernel. Critical things for me (in addition to these docs) were: 1) Had to change my network to use Open System authentication, it didn't work with Shared Key. 2) Added "post-up iwlist eth1 scan" to my interfaces file. I also added "post-up iwconfig eth1 rate 54M", since 11M is now the default, and 54M seemed much stable for me (less packet loss). 3) Added a script to /etc/apm/resume.d which runs "ifdown eth1; ifup eth1" to re-associate when the computer resumes from sleep. - JohnSteeleScott 31.05.2006