Broadcom43xx

Revision 46 as of 2006-04-22 04:09:08

Clear message

Note: To check if you have this chipset, do: lspci -v |grep -i bcm

It goes without saying that you are using a kernel >= to 2.6.15 to use the bcm43xx driver.

If you have over a 1-gig of ram beware that you need to download the driver from source and can't use the default native driver

BCM43xx on Ubuntu Dapper

Disclaimer: These instructions should work, but I have not verified each step. They are simpler than the instructions presented below. Please contribute if you use these instructions successfully.

If your wireless card was inserted during the install of (or upgrade to) Dapper Drake, then once your shiny new system boots you can run

lsmod | grep bcm43xx

to confirm that the driver is installed.

However it doesn't work on its own: you need to extract the firmware from the Windows driver. You need the .sys file from your CD; mine was called bcmwl5.sys. You can extract the firmware using bcm43xx-fwcutter, which is available in the Universe repository. Make sure you have Universe enabled, and type

sudo apt-get install bcm43xx-fwcutter

and once it is installed, extract the firmware from the driver:

bcm43xx-fwcutter /path/to/bcmwl5.sys

This will create a few files in the /lib/firmware directory.

You might want to rename your wireless interface from eth1 or whatever it defaults to. Edit the file /etc/iftab and replace eth1 with wlan0 or whatever you want to call it.

Essentially everything should work now if you are not using security; just go into System > Administration > Networking and configure the interface, then fire it up and start surfing.

WEP Security

WEP is fairly weak security. It can be easily configured through the Networking menu, or you could edit the file /etc/network/interfaces to include a stanza like {{{auto wlan0 iface wlan0 inet dhcp

Type man wireless at the command prompt to see information about wireless configuration.

WPA Security

WPA is strong security for wireless networks, and many users will be using WPA-PSK (pre-shared key). You'll need to install the "supplicant" (or client) for WPA:

sudo apt-get install wpasupplicant

You can configure your system to use WPA simply by editing your /etc/network/interfaces file to include the stanza {{{auto wlan0 iface wlan0 inet static

  • wpa-ssid "MyAccessPoint" wpa-psk "My Secret Passphrase" address 192.168.1.6 netmask 255.255.255.0}}}

If your access point gives you an IP address through DHCP, then you don't need to have the address and netmask bits, and you should change static to dhcp. You should prevent people from reading this file if you use this method (using sudo chmod go-rwx /etc/network/interfaces) to prevent anyone from seeing your passphrase.

The ability to configure WPA through /etc/network/interfaces is fairly new, and described in /etc/wpa_supplicant/wpa_supplicant.conf. To see all the possible commands you can issue using wpa-COMMAND, take a look at the wpa_supplicant.conf manual page.

If this doesn't work, you can still start up wpa_supplicant yourself. Edit the file /etc/wpa_supplicant/wpa_supplicant.conf to include your ssid and passphrase, and then issue the commands {{{sudo ifconfig wlan0 up sudo wpa_supplicant -i wlan0 -D wext -c /etc/wpa_supplicant/wpa_supplicant.conf -d}}} You'll get some debugging output, which should tell you if you're authenticated to your access point. You can also open up another terminal and use the wpa_cli command to see what's going on; on of the more useful things is to ask for status: sudo wpa_cli wlan0 status.

BMC43xx has only worked with WEP and WPA since January 2006, so this is still perhaps a little experimental. Conventional wisdom has it that if you get WPA to work, you might have trouble with DHCP; try using a static IP address if you're having trouble.

There is a GUI for wpa_supplicant which is currently available in Universe; take a look at package wpagui.

Related manual pages: wireless, interfaces, iwconfig, wpa_supplicant, wpa_cli, wpa_supplicant.conf

Using the ndiswrapper driver, fixing your system

If you've upgraded and your internet is broken, and you use a broadcom 43xx card, and you would like to still use ndiswrapper (because it was working, and you want it to remain working), simply do:

echo 'blacklist bcm43xx' | sudo tee -a /etc/modprobe.d/blacklist

This will make it so the bcm43xx driver doesn't load, and ndiswrapper will be happy, after you reboot your computer. To get it working without a reboot, simply run these commands:

sudo rmmod bcm43xx
sudo rmmod ndiswrapper
sudo modprobe ndiswrapper

Using the bcm43xx driver

Now, if you would like to use this driver, first [https://wiki.ubuntu.com/WifiDocs/Driver/bcm43xx#head-d8961e98f659b27d3da44669e74b18feefd66093 uninstall ndiswrapper.] Alternatively, (what I do), you can keep ndiswrapper installed and just blacklist it:

echo 'blacklist ndiswrapper' | sudo tee -a /etc/modprobe.d/blacklist

Now you have two options. The first of which is to install a simple deb, the other version is extracting the firmware yourself. The first method is recommended.

First Method:

wget http://ubuntu.cafuego.net/pool/bcm43xx/bcm43xx-firmware_1.0-0ubuntu1_i386.deb
sudo dpkg -i bcm43xx-firmware_1.0-0ubuntu1_i386.deb

Now you're ready to skip down to the "Skip down to here!" header.

The second method isn't as easy, or as pretty, but it's highly elite, here it is:

Acquire the source for fwcutter by either:

svn checkout svn://svn.berlios.de/bcm43xx/trunk/fwcutter

or by downloading and extracting the archive by:

wget http://download.berlios.de/bcm43xx/bcm43xx-fwcutter-003.tar.bz2
tar xjf bcm43xx-fwcutter-003.tar.bz2

Now, go into the fwcutter directory and run these commands to compile: Note, you'll probably need build-essential installed.

make 
make install

If you have ndiswrapper working with your card previously, there is probably this file:

/etc/ndiswrapper/bcmw15/bcmwl5.sys

copy it to the fwcutter directory by:

cp /etc/ndiswrapper/bcmw15/bcmwl5.sys .

If it's not there, get it by:

wget http://metahusky.net/~gavin/home/bcmwl5.sys

Now type:

sudo ./bcm43xx-fwcutter -w /lib/firmware/ bcmwl5.sys

Skip down to here!

Now you have your firmware installed, either by the deb or manually.

Now, if you look at iwconfig, you should get an entry similar to:

lo             no wireless extensions

eth0           no wireless extensions

eth1           IEEE 802.11b/g ESSID:"seekret"  Nickname:"Broadcom 4306"
               Mode: Managed  Frequency=2.462 GHz  Access Point: 13:37:be:ef:13:37
               Bit Rate=11 mB/s  Tx-Power=15 dBm
               RTS thr:off   Fragment thr: off
               Encryption key: yeah right    Security mode: open

By this time, some of you following this may have a working card, just ifconfig eth1 up, and run dhclient eth1, and you may get an address (depending on how your wireless AP is set up).

If you have a broadcom 4318 card then you need some extra configuration

sudo iwconfig eth1 rate 11M
sudo iwconfig eth1 ap any

If this all works then you need to add a pre-up script to your interface in '/etc/network/interfaces'

add this line to your interfaces file:

iface eth1 inet dhcp 
[indent] pre-up /path/to/file/network_Startup_script [/indent]

in /path/to/file/network_Startup_script my script looks like this:

if [ `iwlist scan 2> /dev/null | grep ubc | wc -l` -ge 1 ] # this looks for my usual essid at school and connects to it if it's present, change ubc to your usual essid then 
    myEssid="ubc" ## change to your essid
else 
    myEssid="any" # finds any open essid and connects to it 
fi 
    myInterface="eth1" # typically eth1 but may be something 
else 
    iwconfig $myInterface essid $myEssid &>/dev/null 
#sudo iwconfig $myInterface ap any &>/dev/null # uncomment if you have issues with invalid access point issues 
iwconfig $myInterface rate 11M # &>/dev/null # necessary part of script for bcm4318 driver and usually bcm4306

NOTE: there are more elegant ways to do this but I haven't experimented with them

Looking at /var/log/messages, you may see some messages concerning your card and driver. One of the bottom-most messages may say something silly like:

ADDRCONF(NETDEV_UP): eth1: link is not ready

This means your card isn't set up correctly, and is most likely not working.

Sometimes it's difficult to get that link to be ready -- but once it is, it'll work. Keep trying, don't give up! Smile :)

For me, running this command solved this problem:

sudo iwconfig eth1 mode auto
sudo iwconfig eth1 rate 11M
sudo iwconfig eth1 ap any

Now, surely, this driver should work. Feel free to make changes or corrections or comments to this file.

Troubleshooting

If you don't see your device under iwconfig or ifconfig -a, make sure you have your ndiswrapper driver unloaded:

sudo rmmod ndiswrapper

and make sure you have the bcm43xx driver loaded:

sudo modprobe bcm43xx

The result of the command lsmod|grep -i bcm should be similar to:

bcm43xx             114444   0
ieee80211softmac    28544    1  bcm43xx
ieee80211           35144    2  bcm43xx,ieee80211softmac


Troubleshooting techniques: keep trying iwconfig commands. Perhaps explicately stating your AP might work. There's something about SoftMAC and authentication that needs to occur for your device to start working.


I can see the essid but can't get an ip address

try setting your wireless card to 11M as it's the only setting that works for 4306 and 4318 broadcom cards.

sudo iwconfig eth1 rate 11M


Removing wifi-radar because of driver conflict

If you can scan and see access points but can't connect, make sure you don't have wifi-radar installed! It runs a daemon that conflicts with the bcm43xx driver.

sudo aptitude purge wifi-radar


==="Network down"=== If you get the "Network down" message, or other errors when your card is "recognized", and you used the first method of installation, and last but not least there are no files beginning with "bcm43xx" in /lib/firmware/, try loading the drivers manually. This only needs to be done once...

sudo bcm43xx-fwcutter -w /lib/firmware/ bcmwl5.sys


Access Point: Invalid

If you get "Access Point: Invalid' like this below

lo             no wireless extensions

eth0           no wireless extensions

eth1           IEEE 802.11b/g ESSID:"seekret"  Nickname:"Broadcom 4306"
               Mode: Managed  Frequency=2.462 GHz  Access Point: Invalid
               Bit Rate=11 mB/s  Tx-Power=15 dBm
               RTS thr:off   Fragment thr: off
               Encryption key: yeah right    Security mode: open

then you need to run this command to fix it up

sudo iwconfig eth1 ap any

the real issue stem from not specifing a essid, so specify on in your /etc/network/interfaces file as mentioned above in the section "If you have a broadcom 4318 card then you need some extra configuration"

Router not braodcasting it's essid

Is your router broadcasting it's essid? Some driver's have issues if the essid isn't broadcast. (i.e. bcm4306 and bcm4318)

KISS priniciple for encrypted network troubleshooting

Finally, encypription is good, but to get wireless cards working use 'scary' un-encrypted network, then add the encryption back in once it's working.

Success Stories

NicholasWheeler: My own success (and basis for this wiki page) is on a lspci -v|grep -i bcm

0000:03:03.0 Network controller: Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller (rev 03)

maydayjay : "Successfully got my 4318 working using the 'iwconfig eth1 rate 11M' command in a pre-up statement in /etc/network/interfaces"

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

trubblemaker : "Successfully got my 4318 working with rmmod bcm43xx and modprobe bcm43xx

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

JullianGafar : Hi, I just want to comment that I am using a PCMCIA Linksys WPC54G with a Broadcom BCM4306.

Contrary to the report below, I am using kernel 2.6.12-9-686 and it works fine with ndiswrapper, no need to blacklist it either. I'll try to add more report tomorrow about installing it.

--- I installed Dapper Flight 6 this weekend, and spent hours slogging to make the wireless work. It associates when there is NO security, but using WEP or WPA breaks it - it claims to connect, but data doesn't get to the access point (this may be due to me not using the right firmware for my Linksys WMP54G, although it works with ndiswrapper...). I decided to write down on this page what I think should work, and what appears to be the "best practice" way of using BCM43xx. -- RobertSchumann DateTime(2006-04-16T17:59:03Z) ---

Please visit the Ubuntu Forums for more information or help.

Or, visit here: https://wiki.ubuntu.com/WifiDocs/Driver/bcm43xx I'm not sure if there's any more or less information, but there is indeed information. :),

Original Author: NicholasWheeler


CategoryHardware CategoryCleanup CategoryDocumentation