Saturday, June 06, 2009

Netbook Broadcom (43xx) Cards with Debian Lenny




So with Ubuntu 9.04 (and possibly earlier) the Broadcom Wireless NIC in your Netbook (mine happens to be a Lenovo Ideapad S10) should just work. But obviously this will not happen with Debian 5.0. Because very little in Debian just works.

So the first thing to know is to ignore an articles such as these that tell you to mess with firmware. Also ignore whatever is on the Debian.

You do NOT have to use the fwcutter tools. Do it this way.

First, install your kernel headers (I use an OpenVZ kernel)

# apt-get install linux-headers-`uname -r`

Download the module source for the Linux STA driver from Broadcom.

Create a directory and uncompress the tarball (mine was hybrid-portsrc-x86_32-v5_10_91_9.tar.gz)

debian-s10:~/bc# pwd
/root/bc
debian-s10:~/bc# ls
built-in.o Makefile src wl.mod.o
hybrid-portsrc-x86_32-v5_10_91_9.tar.gz modules.order wl.ko wl.o
lib Module.symvers wl.mod.c

The above is what you should see when you after you compile the module using the step below. Execute the command below from wihtin the directory that has the Makefile

# make -C /lib/modules/`uname -r`/build/ M=`pwd`

The resulting module you care about is wl.ko (assuming you have the ieee80211 module installed you will be able to insmod this and see the following in dmesg)

[  922.523743] ACPI: PCI Interrupt 0000:05:00.0[A] -> GSI 18 (level, low) -> IRQ 18
[ 922.523997] PCI: Setting latency timer of device 0000:05:00.0 to 64
[ 922.622849] ieee80211_crypt: registered algorithm 'TKIP'
[ 922.623123] eth1: Broadcom BCM4315 802.11 Wireless Controller 5.10.91.9
and with a lshw

description: Wireless interface
product: BCM4312 802.11b/g
vendor: Broadcom Corporation
physical id: 0
bus info: pci@0000:05:00.0
logical name: eth1
version: 01
serial: 00:21:00:7e:7a:7d
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=wl0 driverversion=5.10.91.9 ip=192.168.1.24 latency=0 module=wl multicast=yes wireless=IEEE 802.11bg

so I modified /etc/modules so that it looks like

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# Parameters can be specified after the module name.
loop
ieee80211

So that ieee80211 gets loaded and then added the following line to my rc.local file (before the exit 0, obviously)

insmod /usr/local/lib/modules/`uname -r`/wl.ko

After copying the module there and creating the directory (remember mkdir -p is your friend)

Now NetworkManager should work just fine. And WPA2 worked just fine with my crappy Westell AP.

I tried putting in somewhere in lib/modules/`uname -r` with no luck, but this works for me...

* * *

NOTE: Don't click on the image PCI Express Card image. It contains Chinese Ghostnet Malware that will turn your Mac (and only your Mac) into a Zombie botnet enabling a complete blackout or extortion of the power grid.

Additional keywords: NERC, FERC. SCADA. Project Grey Goose. Cyberwar. ISN. TASE.2

3 comments:

Anonymous said...

Debian Squeeze contains two (non-free) packages:broad-sta-common and broadcom-sta-source. These might work with Lenny as well.

Anonymous said...

Thank you for your post. It worked like a charm on Vostro 1520 with debian-503-amd64-netinst.iso

Anonymous said...

I've got a Broadcom bcm4311, and getting it to work with Debian Lenny was much simpler than the procedure presented here. I used the following steps:

1. Make sure you've got the appropriate kernel headers installed.
apt-get install linux-headers-`uname -r`
will install headers for the kernel that is currently running. This is most likely what you want.

2. Download and extract the broadcom source as indicated above.

3. cd to the directory containing the makefile, and issue the following command:
make && make install
(you may have to run this command as root in order to install the module)

4. finally, run
depmod -a
(again, you may need to run as root)

5. Restart your computer.

At this point, if your card is supported by the driver, it should "just work"; "depmod -a" should have resolved any module dependencies (ieee80211), so there is no need to mess around with /etc/modules or rc.local.

Note that if you update your kernel, you'll have to repeat the process to recompile the module against the new kernel headers.