Friday, May 9, 2008

Setting up Broadcom B43 Wireless with Ubuntu 8.04

After installing 8.04, I never had a chance to test wireless until now. I was always plugged the ethernet in under my desk. I notice one time at home that Fn-F2 was not enabling my wireless radio. I checked hardware drivers in System->Administration->Hardware Drivers. My Broadcom B43 wireless driver was in use but no enabled. When I clicked enable, it would install drivers and prompt for a restart. After a restart, it was again unchecked as enabled.

I looked on the ubuntu forums and google to see if anyone else was having problems. I found this tutorial but the last step was causing me trouble so I decided to modify it for you.

First, you can find out what Wireless Card you have by typing
lspci
Mine is:
Broadcom Corporation BCM4309 802.11a/b/g (rev 03)
I like to keep everything I download to install in a properly named "Installs" folder

So lets begin. This will allow us to build the driver

sudo apt-get install build-essential
Now make the Installs directory and download b43-fwcutter which will allow us to extract firmware for Broadcom driver
sudo mkdir ~/Installs
cd Installs
wget http://bu3sch.de/b43/fwcutter/b43-fwcutter-011.tar.bz2

Now we are going to extract and compile
tar xjf b43-fwcutter-011.tar.bz2
cd b43-fwcutter-011
make
export FIRMWARE_INSTALL_DIR="/lib/firmware"

Now we are ready for the firmware and to properly install it.
wget http://downloads.openwrt.org/sources/broadcom-wl-4.80.53.0.tar.bz2
tar xjf broadcom-wl-4.80.53.0.tar.bz2
sudo b43-fwcutter -w /lib/firmware broadcom-wl-4.80.53.0/kmod/wl_apsta.o
The output should look something like this:
This file is recognised as:
ID : FW11
filename : wl_apsta.o
version : 351.126
MD5 : 9207bc565c2fc9fa1591f6c7911d3fc0
Extracting b43/ucode4.fw
Extracting b43/ucode5.fw
Extracting b43/ucode11.fw
Extracting b43/ucode13.fw
Extracting b43/pcm4.fw
Extracting b43/pcm5.fw
Extracting b43/b0g0initvals4.fw
Extracting b43/b0g0bsinitvals4.fw
Extracting b43/a0g0initvals4.fw
Extracting b43/a0g0bsinitvals4.fw
Extracting b43/b0g0initvals5.fw
Extracting b43/b0g0bsinitvals5.fw
Extracting b43/a0g0initvals5.fw
Extracting b43/a0g1initvals5.fw
Extracting b43/a0g0bsinitvals5.fw
Extracting b43/a0g1bsinitvals5.fw
Extracting b43/lp0initvals13.fw
Extracting b43/lp0bsinitvals13.fw
Extracting b43/b0g0initvals13.fw
Extracting b43/b0g0bsinitvals13.fw
Extracting b43/a0g1initvals13.fw
Extracting b43/a0g1bsinitvals13.fw
After that, restart the computer and your radio should be working. Make sure, that in the BIOS, the wireless device is set to on/fn-f2. You can load BIOS by tapping F2 while the computer is turning on.

12 comments:

  1. Thanks for the tutorial -- I was able to create the .fw files.

    I have a Linux noobie question... I created the .fw files on my laptop for use on my old desktop, where I'm running 8.04 off a liveCD for now. My question: I have the .fw files on a USB stick: can I tell Ubuntu to look on the stick rather than in /lib/firmware for the files? Unfortunately my desktop will not boot from USB, so that's not an option.

    Thanks,
    Nick

    ReplyDelete
  2. Awesome! Its working just perfect.

    Cheers man! ;)

    ReplyDelete
  3. Thank you SIR! That worked perfectly. I was having trouble getting Hardy to recognize my wireless. This worked perfectly well.

    ReplyDelete
  4. Great tutorial but as a new to Linux I could not get further than creating Installs directory. After command:
    wget http://bu3sch.de/b43/fwcutter/b43-fwcutter-011.tar.bz2

    system returned:
    Cannot write to 'b43-fwcutter-011.tar.bz2' (Access Denied). What am I doing wrong?

    Jacek

    ReplyDelete
  5. jacek, you need to log into terminal as a superuser, or root.

    to do so, simply type:

    sudo -s
    password:


    Now I have a question of my own... after this part:

    b43-fwcutter-011# sudo b43-fwcutter -w /lib/firmware broadcom-wl-4.80.53.0/kmod/wl_apsta.o

    I get the following:

    sudo: b43-fwcutter: command not found


    I've gone through this whole process 3 times and everything else worked successfully except for this command. I know I am typing it correctly because I am copy + pasting....


    thanks!

    ReplyDelete
  6. pr4y, thank you for the hint. After spending few more hours I found the answer last night. Was stopped at the same place as you. Hope someone has figured out this one.

    Thanks, Jacek

    ReplyDelete
  7. Hi pr4y,

    I think I solved this puzzle. The issue is related to a search path for executable. The b43-fwcutter executable is located in the b43-fwcutter-011 directory and Linux will not search this directory, hence return: Command not found.
    In order to execute the following command line:
    sudo b43-fwcutter -w /lib/firmware broadcom-wl-4.80.53.0/kmod/wl_apsta.o
    you will need to make a small modification and here it is:
    sudo ./b43-fecutter-011/b43-fwcutter ....
    and the rest is the same.

    Hope this will help.

    I installed driver successfully but cannot figure out where to find which radi bands are supported a,b or g.

    Good luck, Jacek

    ReplyDelete
  8. Since I didn't have an internet connection from Ubuntu to begin with, I went to the location directly in windows. Saved the files in a cd, then moved them to where I supposed is the directory in should go. For example, the fwcutter I moved this to the Installs directory. My problem: It didn't look like the make worked as I saw numerous errors and warnings. Any idea?

    ReplyDelete
  9. what errors are you receiving? you need to install build-essential packages in order to compile (make) the firmware

    ReplyDelete
  10. It appears that you can't copy the file in windows. I had to move my computer closer to the router in order to connect using wired. I ran the steps and the make worked.

    now my problem is with getting b43-fwcutter to work. I'm getting that same message as PR4Y. I tried Jacek way but it didn't work either.

    ReplyDelete
  11. figured out how to get b43-fwcutter to work. It needs to be installed. Here's how you do it:
    sudo apt-get install b43-fwcutter

    You should get a screen asking to install firmware. Since I didn't want to proceed with this, I said no and then used the sudo way as described in the step above.

    ReplyDelete
  12. @grouch: so you were able to finalize your wireless?

    ReplyDelete