Difference between revisions of "Broadcom wireless"

From ArchWiki
Jump to: navigation, search
(Introduction: Substantially rewrote the introduction. Added more relevant links, explained choices of drivers.)
Line 3: Line 3:
 
= Introduction =
 
= Introduction =
  
Finally Broadcom has released a linux driver for most of its wireless chipsets. See the [http://ubuntuforums.org/showthread.php?t=914697  Ubuntu forums] and the [http://forums.debian.net/viewtopic.php?p=174719&sid=801a8f97aa7112c8c1c4f9294ad5d3e9 Debian forums]. It seems to work with all modern 43xx Broadcom cards. Up until recently the only way to get some of these working, such as 4328, was via [[ndiswrapper|ndiswrapper]].  Broadcom chipsets are used in most Dell laptops, among others.
+
Broadcom has been notorious in its support for its wifi 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 [http://wireless.kernel.org/en/users/Drivers/b43 b43] drivers have been in the kernel since 2.6.24.
  
Unfortunately, the driver does not work with hidden ESSID's.
+
In August 2008, Broadcom released the [http://www.broadcom.com/support/802.11/linux_sta.php 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 ESSID's.
 +
 
 +
In September 2010, Broadcom [http://thread.gmane.org/gmane.linux.kernel.wireless.general/55418 finally released] fully open source drivers for its hardware. This driver, [http://wireless.kernel.org/en/users/Drivers/brcm80211 brcm80211] has been included into the kernel since 2.6.37.
 +
 
 +
At the time of writing, there are three choices for users with Broadcom wifi chips:
 +
 
 +
* brcm80211
 +
* broadcom-wl
 +
* b43
  
 
= Determine whether you actually have one of these cards =
 
= Determine whether you actually have one of these cards =

Revision as of 03:59, 2 February 2011

Introduction

Broadcom has been notorious in its support for its wifi 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 ESSID's.

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 wifi chips:

  • brcm80211
  • broadcom-wl
  • b43

Determine whether you actually have one of these cards

Type in console (mind the letter case):

$ lspci -nn | grep 14e4

Look at the numbers at the end, in square brackets.

Here is a list of cards which work with this driver:

[14e4:4311]
[14e4:4312]
[14e4:4313]
[14e4:4315]
[14e4:4727]
[14e4:4328]
[14e4:4328]
[14e4:4329]
[14e4:432a]
[14e4:432b]
[14e4:432c]
[14e4:432d]
[14e4:4353]
[14e4:4357]

This document should have more up-to-date information.

If you have some other Broadcom model you might try the b43 driver. List of cards supported by b43 is here, although other cards (e.g. 4727) may also work with this driver.

Driver installation

Get the driver

There's a PKGBUILD in AUR. Or, you can download the driver from here, where you will also find a README file.

It is better to use the PKGBUILD, that way pacman will track all the files.

Load the kernel module

Before loading the module, remove b43, or any other module you are using for your wireless card:

# rmmod b43

Load the module:

# modprobe lib80211_crypt_tkip
# modprobe wl

You might also need to generate modules.dep and map file again by:

# depmod -a

Now you can make the change permanent by including lib80211_crypt_tkip in your MODULES array in Template:Filename.

MODULES=(lib80211_crypt_tkip ...

Or if you installed module via AUR package you just need:

# rmmod b43 # (or any other module you are using for your wireless card)
# modprobe wl

Now in iwconfig you should see a wireless device (for example eth1). You might need to restart your computer to see the device in iwconfig.

To make the module load at boot just add in Template:Filename:

MODULES=(lib80211_crypt_tkip wl !b43 !ssb ...

By blacklisting the 'b43' and 'ssb' modules, you will prevent the kernel from autoloading them instead of the desired modules.

Note on using multiple Broadcom kernel modules

In my Dell Inspiron Laptop, i have a Broadcom BCM4401 Ethernet card and a Broadcom BCM4328 Wireless card. If I just remove b43, I can load the wl driver, but no wireless card shows up. However, if i first remove the b44 (and ssb) driver for my ethernet card, and then load the wl driver, I get a wireless eth0. Afterwards, I can load b44 again, to have an ethernet eth1.

Short version:

  • Put "lib80211_crypt_tkip" and "wl" at the BEFORE b44 (if you have it) position in MODULES= in /etc/rc.conf
  • Don't forget to blacklist b43
  • Your wireless card will be eth0
  • Your ethernet card will be eth1
  • Both will work fine


Troubleshooting

Interfaces swapped every time

This is a common problem with this driver. And the next process works for me with the BCM4312 following the udev post:

Create a file called /etc/udev/rules.d/10-network.rules and bind the MAC address of each of your cards to a certain interface name:

SUBSYSTEM=="net", ATTR{address}=="aa:bb:cc:dd:ee:ff", NAME="eth0"
SUBSYSTEM=="net", ATTR{address}=="ff:ee:dd:cc:bb:aa", NAME="eth1"

Where:

  • NAME="eth0" is the name of the interface that you want, for example the same name "eth0". You can use other names, for example "lan0" for eth0 or "wlan0" for eth1.
  • To get the MAC address of each card, use this command: udevadm info -a -p /sys/class/net/<yourdevice> | grep address. Please, note that this is case sensitive and you must use lower-case.

But first you need know if eth0 isn't eth1 or vice versa, you can perform a scan: iwlist scan So if eth0 is really eth1 then the MAC of eth1 is that of eth0.

Don't forget to update your /etc/rc.conf and other config files using the old ethX notation!

Module wl does not work after a kernel upgrade

This is because the driver is compiled with the current kernel, you need recompile the driver with the new kernel for the module to function properly. Bear this in mind when doing kernel updates.

Device not showing up

Be sure of trying "ifconfig -a", "ifconfig" only shows interfaces that are active.

Here is one short script that helped me out, because I was loading modules incorrectly:

#!/bin/bash

rmmod b43 ssb wl lib80211_crypt_tkip lib80211

modprobe lib80211_crypt_tkip
modprobe wl

depmod -a

This helped me when sometimes I couldn't get the interface to show up. Else, I recommend adding the modules in rc.conf:

MODULES=([...] !b43 !ssb !lib80211 lib80211_crypt_tkip wl)

Worked for me in a Dell Latitude 2100 with Broadcom BCM5764M (eth) and BCM4312 (wifi). Also works in a HP Compaq 6715s with Broadcom BCM4311 (wifi).

Also works on the HP Mini 110-1020LA netbook using BCM4312 chipset.

The above did not work for me (Broadcom 4312 [14e4:4315]) however if I removed the exclamation mark infront of lib80211 then everything works fine.

Original b43, ssb, and lib80211 won't go away

If you've followed the Speed_Up_udev advice, you'll see that the modules you try to prevent loading with a ! will load anyway. That's because the steps on that page (and I missed this reading it the first time) will effectively bypass the MODULES=() line in Template:Filename.

Yeah, there's a section that explains what you need to do if you're blacklisting modules, but honestly I didn't notice any boot-time savings so I reverted to the original Template:Filename.