News | About | Get Frugalware | Packages | Documentation | Discussion Forums | Bug Tracker | Wiki | Community | Development

Broadcom wireless

From FrugalWiki

Jump to: navigation, search



Contents

Introduction

Broadcom has been notorious in its support for its Wi-Fi cards on Linux. Until recently, most Broadcom chips were entirely unsupported or required the user to tinker with firmware. A limited set of wireless chips were supported by various reverse-engineered drivers (brcm4xxx, b43 etc). The reverse-engineered b43 drivers have been in the kernel since 2.6.24.

In August 2008, Broadcom released the 802.11 Linux STA driver officially supporting Broadcom wireless hardware on Linux. These are restrictively licensed drivers, but Broadcom promised to work towards a more open approach in the future. They do not work with hidden ESSIDs.

In September 2010, Broadcom finally released fully open source drivers for its hardware. This driver, brcm80211, has been included into the kernel since 2.6.37.

At the time of writing, there are three choices for users with Broadcom Wi-Fi chips:

  • brcm80211
  • broadcom-wl
  • b43

Determine which driver you need/can use

First, determine your card's PCI-ID. Type the following (case-sensitive) command into a console:

$ lspci -vnn | grep 14e4

If your card is in the following list, you can use the brcmsmac driver:

PCI-ID Name
[14e4:4727] BCM4313
[14e4:4353] BCM43224
[14e4:4357] BCM43225

If your card is in the following list, you can use the brcmfmac SDIO driver:

Name
BCM4329

A more up-to-date list may be found here.

If your card is not in the above lists, you need to use the older b43 or b43legacy driver, wich supports following devices.

PCI-ID Name Notes
[14e4:4301] BCM4301 legacy-only
[14e4:4306] BCM4306  ?legacy
[14e4:4307] BCM4306
[14e4:4311] BCM4311
[14e4:4312] BCM4311
[14e4:4313] BCM4311
[14e4:4315] BCM4312 Not in kernel26-lts
[14e4:4318] BCM4318
[14e4:4319] BCM4318
[14e4:4320] BCM4306  ?legacy
[14e4:4321] BCM4321 Not in kernel26-lts
[14e4:4324] BCM4306 legacy-only
[14e4:4325] BCM4306 legacy-only
[14e4:4328] BCM4321 Not in kernel26-lts
[14e4:4329] BCM4321 Not in kernel26-lts
[14e4:432a] BCM4321
[14e4:432b] BCM4322 Not in kernel26-lts
[14e4:432c] BCM4322
[14e4:432d] BCM4322
[14e4:4358] BCM43227
[14e4:4359] BCM43228

?legacy means that there are devices with same PCI-IDs, but with differend hardware awaiable. Some of these work with the b43 driver, but some might need b43legacy driver. legacy-only means that you need to use the b43legacy driver.

A more up-to-date list may be found here.

If your card is in the following list, you can use the broadcom-wl driver:

PCI-ID Name
[14e4:4311] BCM4311
[14e4:4312] BCM4311
[14e4:4313] BCM4311
[14e4:4315] BCM4312
[14e4:4727] BCM4313
[14e4:4328] BCM4321
[14e4:4329] BCM4321
[14e4:432a] BCM4321
[14e4:432b] BCM4322
[14e4:432c] BCM4322
[14e4:432d] BCM4322
[14e4:4353] BCM43224
[14e4:4357] BCM43225
[14e4:4358] BCM43227
[14e4:4359] BCM43228

A more up-to-date list may be found here.

Getting the driver

brcmsmac (brcm80211)

The brcm80211 drivers have been included in the kernel since 2.6.37. Since the release of 2.6.39, they have been renamed to brcmsmac (for PCI cards) and brcmfmac (for SDIO).

These drivers should be automatically loaded during startup and no further action should be required of the user.

Note: The bcma module can prevent some cards from showing up and may need to be blacklisted.
Note: wireless.kernel.org states that brcm80211 does not support older PCI/PCI-E chips with ssb backplane.

broadcom-wl

Warning: This driver is more likely to cause problems than to resolve them. Most of the problems reported by users on Broadcom chips are caused by this driver. Using this is HIGHLY NOT recommended. Before you even think of trying out this one, make sure to try the other drivers first.

For users of the broadcom-wl driver, there is a package:

Root terminal 48px.png
# pacman-g2 -S bcmwl


add the followings to /etc/sysconfig/blacklist:

blacklist b43 
blacklist ssb 
blacklist lib80211
Note: You may need to blacklist ohci_hcd as well, if that’s loaded on your system.

and add the followings to /etc/sysconfig/modules:

lib80211_crypt_tkip 
wl   

Then reboot, you'll see a new network interface named eth1 for example.

b43/b43legacy

The drivers are included in the kernel since 2.6.24.

Loading the b43/b43legacy kernel module

Fisrt, install the firware tool

Root terminal 48px.png
# pacman-g2 -S b43-fwcutter


Since version 2.6.24, the bcm43xx driver is deprecated, replaced by the b43 and b43legacy modules.

The module should be loaded automatically, in case it isn't, you can load it manually:

Root terminal 48px.png
# modprobe b43


or (depending of the model):

Root terminal 48px.png
# modprobe b43legacy

Don't forget to add the correct module to /etc/sysconfig/modules

Restart your computer and configure your device as normal.

Then reboot, you'll see a new network interface named wlan0 for example.

b43 with open source firmware

Introduction

Thanks to the OpenFWWF project, now you can use an open source firmware with your b43 card instead of the proprietary one. Here’s a step-by-step guide how to get it work with your card. Don’t be scared by the length of this article, the process itself will only take about 2 minutes.

You will have to install a few tools during the process such as git, make, flex, bison and so on, install them when you get an error. I think you’ll need a quite recent version of the kernel to use this firmware, but it might work with older versions, too (for example, it works with the Ubuntu 9.04 Live CD). To avoid confusion, you won’t need b43-fwcutter for this to work.

It worked for me nicely, even with WPA2. If distros started to ship this firmware out-of-box, these cards would start to work without any hacking. Since this firmware is open source, it shouldn’t cause legal problems the closed one does.

Acer-specific

I had an Acer Aspire 3023 WLMi which needs acer_wmi to activate WiFi functionality. On most distros you don’t have to bother with such stuff.On Frugalware, Ubuntu and Debian it loaded up automatically. The hardware of this laptop is:

06:05.0 Network  controller: Broadcom Corporation BCM4318 [AirForce One 54g] 802.11g  Wireless LAN Controller (rev 02)

Building the assembler

Get a fresh copy of b43-tools, a collection of tools related to the b43 driver:

git clone http://git.bu3sch.de/git/b43-tools.git

Then build the assembler:

cd b43-tools/assembler
make

Assembling the firmware

Download the latest sources of OpenFWWF from SVN:

cd ../..
svn export svn://svn.berlios.de/fullstory/openfwwf/trunk openfwwf

Now assemble the firmware with the assembler you just built:

cd openfwwf
PATH=$PATH:../b43-tools/assembler make

Installing the firmware

If everything goes fine you’ll have 3 firmware files (.fw). Now copy them to the proper location as root:

mkdir /lib/firmware/b43
cp *.fw /lib/firmware/b43

Now you have to disable QoS and hardware-accelerated cryptography for the b43 module (the open source firmware does not support these at the moment). For this, you have to create a configuration file for the b43 module, it should be placed in /etc/modprobe.d:

echo -e 'options b43 qos=0\noptions b43 nohwcrypt=1' > /etc/modprobe.d/b43.conf

In other words, put the following 2 lines into /etc/modprobe.d/b43.conf (you'll probably have to create it) with your favourite text editor:

options b43 qos=0
options b43 nohwcrypt=1

Usage

Make the module aware of the changes, unload the b43 module and load in again:

modprobe -r b43
modprobe b43

That’s it. Now you have to configure the network interface, which is usually wlan0. Use the various tools (such as netconfig). If your network is up and running, you can safely remove the b43-tools and openfwwf folders.

Troubleshooting

If you’re in trouble, you can check out what’s happening with the driver:

dmesg | grep b43

Notes

On Debian I had failures when the ethernet cable was plugged in on boot, somehow the WiFi card was unable to produce traffic (besides leasing an address via DHCP) if the ethernet card was activated previously. I don’t know whether this problem’s related to the driver or Debian’s (and other distros’) network scripts though.

The driver seems to work without manually disabling hw crypto:

b43-phy0: Loading OpenSource firmware version 410.31754 (Hardware crypto not supported)

There’s an svn commit log for OpenFWWF which says:

* talk about nohwcrypt=1 for kernels << 2.6.30.

This could be the reason for why it worked for me on 2.6.29. Even taking care of QoS may have become unnecessary with 2.6.30, since b43 should be able to check whether the firmware is cabable of these or not. The patch can be found among the links. It's in theory merged into newer kernels. I’ve tested it with 2.6.30-rc4 with the patch, and my WiFi then worked even when I deleted /etc/modprobe.d/b43.conf:

b43-phy0: Loading OpenSource firmware version 410.31754
b43-phy0: Hardware crypto acceleration not supported by firmware
b43-phy0: QoS not supported by firmware

Please note that this patch should have gotten upstream so it shouldn't be needed anymore and you should use it for testing purposes only.


Troubleshooting

Wi-Fi card does not work/show up since kernel upgrade (brcmsmac)

Note: This affects kernel 3.0.

This is caused by the kernel using the bcma module instead of the brcmsmac module. The solution is to blacklist the bcma module in /etc/sysconfig/blacklist

blacklist bcma


Wi-Fi card does not show up

  • If you use the broadcom-wl driver, check if you are loading the correct modules. You may need to blacklist the brcm80211, b43 and ssb modules to prevent them from loading automatically in /etc/sysconfig/modules.
blacklist brcm80211
blacklist b43
blacklist ssb

Note that you may not have to blacklist the brcm80211 driver, though as of 2011/06/20 it will still default to loading the brcm80211 module before the wl driver, preventing wl from being used.

External links

Personal tools
Namespaces
Variants
Actions