29 April 2008

Broadcom 4318 Working Under Ubuntu Hardy Heron 8.04 (Ndiswrapper)

Posted by Robert under: all posts; hardware; linux; tech; wisdom .

In my dad’s PC is a wireless card - a Linksys WRT54GS I think. Anyway it uses the Broadcom BCM 4318 chipset, as seen by a quick lspci:

richard@hades:~$ lspci | grep roadc
00:0a.0 Network controller: Broadcom Corporation BCM4318 [AirForce One 54g]
802.11g Wireless LAN Controller (rev 02)

Unfortunately the new b43 / b43-fwcutter package (installed from / by ‘restricted drivers’) stopped this working. I’m not sure why exactly; it’s possibly because it was designed for a later chipset (I’ve heard 04 for one of the chipsets), but in any case this is moot. It doesn’t work at the moment. This affects PCI cards, some internal laptop wireless cards, and some removable wireless cards.

Now, the card worked under Gutsy using ndiswrapper. So, that’s what I tried to get this working. There is a post at the Ubuntu forums that details how to do this. I’m going to briefly reproduce the procedure here because quite a lot of people are interested in getting their card woking, but thanks to Mazza558 for the info.

1) Remove the b43-fwcutter package
sudo aptitude remove b43-fwcutter

2) Reinstall ndiswrapper

a)
sudo apt-get install ndisgtk

b) Download and install wireless driver
WMP54GS Driver
or
wget http://roberthallam.com/wmp54gs.tgz
tar -xzf wmp54gs.tgz
ndiswrapper -i wirelessdriver/WMP54GS.inf

3) Create bash script to fix wireless
sudo gedit /etc/init.d/wirelessfix.sh
Into the file, put:
#!/bin/bash

modprobe -r b44
modprobe -r b43
modprobe -r b43legacy
modprobe -r ssb
modprobe -r ndiswrapper
modprobe ndiswrapper
modprobe b44

Save it, then change the permissions to 755:
cd /etc/init.d/ && sudo chmod 755 wirelessfix.sh

And finally execute:
sudo update-rc.d wirelessfix.sh defaults

And then you can reboot and have working wireless, or just (as root) execute the commands you put into the wirelessfix.sh file.

NB: To get a root bash prompt in Ubuntu, execute:

sudo bash

Enjoy your wireless, on whatever card card you have!

Update: Ed points out quite rightly that can be somewhat hard to update using an internet connection if you don’t have a working wireless card. A situation not unlike what good is a phone call… if you’re unable to speak? In any case, you have a number of options, some of which may or may not be possible:

  1. Plug a cable into your ethernet port
  2. Use an old Ubuntu 7.10 Gutsy Gibbon CD to update from. This should Just Work, that is you put it in the CD drive and you will be asked if you want to use it as a repository source (or similar). If not, the
    deb-cd
    command is your friend
  3. Download the .deb files manually elsewhere. Get both ndiswrapper-common and ndiswrapper-utils-1.9 (links to mirrors, not direct). Note that ndiswrapper-utils-1.9 has a couple dependencies like perl which you should have, but may not. Save them to a USB flash drive or whatever. Then use dpkg to install the deb files. Or:
    [insert USB drive and cd to it]
    wget
    http://mirrors.kernel.org/ubuntu/pool/main/n/ndiswrapper/ndiswrapper-common_1.50-1ubuntu1_all.deb
    wget
    http://mirrors.kernel.org/ubuntu/pool/main/n/ndiswrapper/ndiswrapper-utils-1.9_1.50-1ubuntu1_i386.deb

    [move USB drive to target machine, open a terminal and cd to the drive]
    dpkg -i ndiswrapper-common_1.50-1ubuntu1_all.deb
    dpkg -i ndiswrapper-utils-1.9_1.50-1ubuntu1_i386.deb

And you should be good to go, even if you are without an internet connection!

28 Comments so far...

Peter Says:

30 April 2008 at 12:04 am.

Same problem here after upgrading from 7.10 to 8.04 (Dell Latitude)
I blacklisted the b43 and applied your solution.
It works perfect for me :-)

Thanks for sharing the procedure !!

Ed Says:

30 April 2008 at 3:25 am.

Dude, I’m impressed you were able to come up with a solution less than a week after the official Hardy release. One thing that was a show stopper for me was the ndiswrapper packages weren’t installed and also were unavailable from the install CD. Luckily, I had my good ol’ 7.10 CD available to bail me out. After adding the Gutsy CD to the repository, I was able to install the ndiswrapper packages (ndiswrapper-common and ndiswrapper-utils-1.9). You might be wondering why I didn’t just apt-get them (I love it when they do this in official docs). Well, in case you hadn’t noticed, my internet connection isn’t available. Duh!

Robert Says:

1 May 2008 at 4:02 pm.

Peter: Glad it worked :)

Ed: It wasn’t me that came up with the solution - I might have gotten there eventually, but it was Mazza558 that posted it to the Ubuntu forums. It was on the bug tracker (bugs.launchpad.net/ubuntu/) I first saw a similar solution, and it lead me to do some looking and (eventually) get the soltution.

Good point with regards to the CD though, I forget that for some wireless is their sole means of connection!

Cheers

Daniel Says:

14 May 2008 at 4:25 am.

Everything was plain sailing until I pressed
cd /etc/init.d/ && sudo chmod 755 wirelessfix.sh
and
sudo update-rc.d wirelessfix.sh defaults

In the terminal nothing happened! Why? any help?

Bob Says:

19 May 2008 at 11:57 pm.

It works ! After 3-weeks of trying numerous web ‘how-to’s”, your procedure finally worked !
Like Ed, a wireless ‘apt-get install’ doesn’t work without a wired web connection to start with.
I’ve been using ndiswrapper since Edgy, but Hardy’s application was the toughest to-date.
I’ve seen this procedure in 2-other posts, but yours was the cleanest, clearest & simplest.
Good Show, and Thank You for sharing to the ( open-source ) community…

Steve Says:

22 May 2008 at 10:28 pm.

I can’t thank you enough for posting this. I spent weeks trying to get this to work, and your directions provided the solution I needed. Thank you.

clayton Says:

24 May 2008 at 3:49 pm.

this actually worked… ive been searching since hardy’s release and this ACTUALLY worked first time.., thank you so much i have a dual booting laptop and it was KILLING me to boot windows for the internet!!!!

Robert Says:

24 May 2008 at 6:37 pm.

@ Daniel

Which command did it fail on? Did sudo not prompt you for your password?

@ Bob

Glad it worked out for you. I think things are a lot easier to get through when they are laid out clearly, that’s why I wrote it. It’s good that people find it useful, thanks :-)

@ Steve + clayton

Glad to be of help :-)

Ryan Says:

25 May 2008 at 3:14 am.

Robert-
I had this work for me once, but I’ve reinstalled Ubuntu and have to do it again and it won’t seem to work. When I run ndiswrapper -i wirelessdriver/WMP54GS.inf I get the following:
couldn’t open wirelessdriver/WMP54GS.inf: No such file or directory at /usr/sbin/ndiswrapper-1.9 line 219.

Any suggestions?

Robert Says:

25 May 2008 at 10:00 am.

Ryan:

Do you have ndiswrapper-utils-1.9 installed? Also, did you redownload the wireless drivers? It seems like it cant find the .inf file. If you know where it is, just do:

sudo ndiswrapper -i /path/to/drivers/WMP45G.inf

Replacing /path/to/drivers with /home/ryan/wirelessdriver/ or whatever. Hopefully that’ll do it!

Ryan Says:

26 May 2008 at 5:39 am.

Robert-
I ended up formatting and re-installing and it worked straight away. Weird how these things happen…

johno Says:

27 May 2008 at 9:55 pm.

Works fantastic, thanks. I tried so many other recipes from other sites, none which worked.

Martin Says:

28 May 2008 at 4:05 pm.

I’ve tried to get this to work for the past 2 years, and after having used your guide, it still seemed as if it wouldn’t and I was as frustrated as always. However, then I remembered that I had a driver specific for my card and I tried it and now it works!! It’s actually quite incredible… I’m not sure if it’s your guide or the driver I’ve found, but thanks anyway. I have a HP nx8220 with broadcom 4318, and the driver I used can be found here:
http://h10025.www1.hp.com/ewfrf/wc/genericSoftwareDownloadIndex?cc=us&dlc=en&lc=en&softwareitem=ob-55703-1&jumpid=reg_R1002_USEN

Extract the exe file in windows, wine didn’t want to do for me, and use bcmwl5.inf. It was released in november 2007 so it’s quite recent.

Mojojojo78 Says:

30 May 2008 at 5:34 am.

It works perfect for me

thanks

gobuntu Says:

23 June 2008 at 8:05 pm.

In Feisty Ubuntu I had wifi working with ndiswrapper because fwcutter worked with a weak signal. I have an HP Pavillion with Broadcom.

I upgraded to Gutsy Ubuntu and the upgrade put fwcutter via restricted drivers. It worked but not good enough at a location which was working OK before. This was due to a weaker signal of fwcutter, in comparison to nddiswrapper.

So I followed the instructions in this site and I now have a much stronger signal, and faster connection. Thanks!

By the way, the windows drivers to use for ndiswrapper are available from HP, in my case. Trying to install them as per this webpage got me a message that THEY WERE already installed, and as such the rest worked OK.

Robert Says:

7 July 2008 at 3:25 pm.

Thanks for the link Martin, very helpful :-)

Mojojojo78, gobuntu - glad it worked!

Alistair Says:

17 July 2008 at 7:06 am.

Hey thanks for your guide so far. My wireless card picks up surrounding networks in gnome but I cannot connect. When I run the modprobe script I receive.

not found.le b44
not found.le b43
not found.le b43legacy
not found.le ssb
not found.le ndiswrapper
not found.le ndiswrapper

Any help?

Robert Says:

17 July 2008 at 12:19 pm.

Alistair:

It looks like those modules aren’t installed or loaded - do you have ndiswrapper installed?

Basak Says:

27 July 2008 at 11:51 pm.

Thanks,but it didnt work unfortunately .I aplied all the commands but i couldnt connect my modem via wpa although i saw the possibble wireless modems in enviroment.I thougt that i broke my chains by putting windows away.But i was wrong i should set a virtual box with windows :(((

HappyBuntu Says:

29 July 2008 at 6:07 am.

BIG UP!!!

Bertie, your awesome man. Thanks for posting this on the internets!

I also followed the guide here:
http://ubuntuforums.org/showthread.php?t=766560

One thing your missing in the wirelessfix.sh script is:
**modprobe ndiswrapper**
My adapter was unable to load without this line.

I have the Broadcome4319 rev2 as well. I used these drivers:
bcmwl5.inf
I am going to do some speed tests to see which one is better.

Thanks again!

Robert Says:

12 August 2008 at 3:03 pm.

Bazak: It’s a shame it didn’t work.

HappyBuntu: Glad it worked!

Frustrated Ubuntu Says:

14 August 2008 at 7:29 pm.

I have a similar problem to Basak. This fixed marked progress over trying to use b43/bcm43xx/b43legacy/ssb modules because I could readily scan the surrounding wireless networks with “sudo iwlist scanning.” And the output of iwconfig made perfect sense, right essid, access point, frequency, etc… The problem is I couldn’t ‘connect’ to anything on the network. ping 192.168.1.1 results in host unreachable. I’m not sure where to go from here other than try a different driver or a revert to Ubuntu 7.10. My kernel version is 2.6.24-19-generic. And I have a broadcom 4306 rev 03. I’m using WPA-PSK. Advice?

NUBUNTU Says:

4 September 2008 at 1:17 am.

I had wifi working at first in the Ubuntu 7.xx version. Then I got greedy and upgraded to the Ubuntu 8.xx only to find wifi to be a problem. I finally got it working, but every time I log on I have to jump through hoops to reset the connection to WPA2 which is required for me to use my work laptop from home. The new box I am learning Ubuntu on is an HP Pavilion xt919 that was given to me as a “we don’t need it anymore” type thing. My wifi card is a WMP54GS version 1.1 for what it is work. Be gentle as I am an old DOS geek with years of Oracle, SQL Server, PeopleSoft, and recently SAP experience.

bman Says:

5 October 2008 at 3:24 am.

All the usual tricks weren’t working, but I guess that’s a common theme. This worked great. Thanks for posting it.

Kent57 Says:

19 October 2008 at 11:56 pm.

I followed all the directions and received no errors. BUT after rebooting still no wireless. Any suggestions?

Andy Says:

21 October 2008 at 8:39 pm.

Woo, this worked for me with 8.04 after several days of trying solutions from elsewhere. I’m using a US Robotics Wireless MAXg PCI card with a Broadcom 4318 Rev 2 chipset. I downloaded the (huge) XP driver package from them and used the USRMAXG.inf from there with ndiswrapper instead of the WMP54GS.inf file in the example. Your script made the difference for me, thank you for laying it out like this!

shane Says:

30 October 2008 at 12:43 pm.

Thanks a million!

I had my wireless setup but it used to work only sometimes… usually after a reboot it wouldn’t detect the wireless networks. this was after using Ubuntu’s jockey and then a guide from linuxwireless. So far this setup seems to work great… even after reboots.

Thanks!

Robert Says:

9 November 2008 at 10:59 am.

Sorry for lack of comments from me, I wasn’t getting notified of new comments. Kent57, Frustrated and NUBUNTU, I’d suggest doing a fresh install of 8.10 (if you can, otherwise upgrade). Wireless drivers are constantly being updated. If you’re still having problems, come back and I’ll try and help you out.

bman,, Andy and shane: glad it worked!

It would be nice if it solved everyone’s problems, but subtle chipset differences can make for big headaches.

Leave a Reply