jump to navigation

Broadcom wifi (BCM4312) speedup to 54mbit/s on Ubuntu 8.04 on a HP nc6320 laptop [Now FIXED on Ubuntu] May 21, 2008

Posted by claudio in Uncategorized.
Tags: , , , , , ,

EDIT May 27th 2008: FIXED how to make the changes permanent.
EDIT June 4th 2008: Don’t forget to install as well
linux-ubuntu-modules (in this case linux-ubuntu-modules-2.6.22-14-generic) when upgrading your kernel.
EDIT Oct 16th 2008: The restricted driver included in Ubuntu has been FIXED and the card works out of the box when enabling it through System-Administration-Hardware Drivers. Thanks, Ubuntu!

It’s probably a regression: on this laptop the broadcom wifi worked fine on the previous Ubuntu releases (although limited to 24mbit/s) and now I see the speed is stuck to an unacceptable 1mbit/s. I guess that’s the price you pay for hardware from companies that are not open source friendly.

The steps needed to find a workaround (and recover the full 54mbit/s speed) were taken from here, so you should have a look there for updates. However, to make the changes permanent I had to take a different route as the solution described on the howto did not work for me (will be of course sent to “upstream”). Here are the steps applicable to my exact hardware (laptop HP nc6320 with bcm4312 wifi).


claudio@brisbane:~/bin$ lspci |grep Network
08:00.0 Network controller: Broadcom Corporation BCM4312 802.11a/b/g (rev 01)

claudio@brisbane:~/bin$ iwconfig
eth1 IEEE 802.11g ESSID:"xxxxxxxxx"
Mode:Managed Frequency:2.412 GHz Access Point: xx:xx:xx:xx:xx:xx
Bit Rate=1 Mb/s Tx-Power=27 dBm
Retry min limit:7 RTS thr:off Fragment thr=2346 B
Link Quality=60/100 Signal level=-78 dBm Noise level=-68 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

Solution (command line commands in a terminal: Applications – Accessoires – Terminal):

You should use this script (md5: d13462fe7fb8d37ab02f0629bfb4576c) to makes the changes:

sudo sh ./fix_bcm.sh

Or if you like to type the commands yourself, here they are:

$ echo 'blacklist bcm43xx' | sudo tee -a /etc/modprobe.d/blacklist
$ sudo apt-get install ndiswrapper-utils-1.9
$ mkdir ~/bcm43xx; cd ~/bcm43xx
$ sudo apt-get install cabextract
$ wget ftp://ftp.compaq.com/pub/softpaq/sp33001-33500/sp33008.exe
$ cabextract sp33008.exe
$ sudo ndiswrapper -i bcmwl5.inf
$ ndiswrapper -l
$ sudo depmod -a
$ sudo modprobe ndiswrapper
$ sudo cp /etc/network/interfaces /etc/network/interfaces.orig
$ echo -e 'auto lo\niface lo inet loopback\n' | sudo tee /etc/network/interfaces
$ sudo ndiswrapper -m
$ echo 'ENABLED=0' | sudo tee -a /etc/default/wpasupplicant
$ cp /etc/rc.local /etc/rc.local.origcat
$ cat /etc/rc.local.org |grep -v exit 0 > /etc/rc.local
$ echo -e '# ssb + ndiswrapper fix\nlogger "rc.local ndiswrapper init"\nMODULELIST=`lsmod |awk '{print $1}'`\nMODULESRM="b43 b44 b43legacy ssb ndiswrapper"\nMODULESADD="ndiswrapper ssb b44"\nfor i in $MODULESRM; do\n\tif [ `echo "$MODULELIST" |grep ^${i}$` ]; then\n\t\techo "Unloading module $i"\n\t\trmmod $i \n\tfi\ndone\n\nfor i in $MODULESADD; do\n\t\techo "Loading module $i"\n\t\tmodprobe $i \ndone\n# end\n\nexit 0\n' | sudo tee -a /etc/rc.local
$ rm -rf bcm43xx/

$ init 6

STATUS: native driver (instead of this ndiswrapper method) not fixed on latest ubuntu kernel 2.6.24-18.

About these ads


1. invaleed - May 25, 2008

Thanks… :)

I’m try to follow your tutorial… with little editing your script…
and amazing, i got Bit Rate 54 Mb/s from 1 Mb/s

byte@delta:~$ iwconfig wlan0
wlan0 IEEE 802.11g ESSID:”xxxxxxxxxx”
Mode:Managed Frequency:2.442 GHz Access Point: xxxxxxxx
Bit Rate=54 Mb/s Tx-Power:32 dBm
RTS thr:2347 B Fragment thr:2346 B
Power Management:off
Link Quality:65/100 Signal level:-54 dBm Noise level:-96 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

2. claudio - May 25, 2008

Yes, whenever I make an adaptation to the script (I am thinking of a script that can enable the new settings but as well restore the old one) or when someone comes up with correction, I’ll update this page …

3. Ubuntu on HP nc6230 laptop « *n*x - May 28, 2008

[...] is very easy and straight forward. There are two things you need to fix: enabling the mic and pump up the wifi speed. The only thing I haven’t tried is the fingerprint reader (I find it [...]

4. Chris - May 28, 2008

Thanks for the script it worked for me after a small modification.

However, now any time I try to sudo anything it takes forever. I can’t even use sudo now.

..any idea how this could have happened after running your script?

5. claudio - May 28, 2008

Mmm, I fail to see how the changes could affect sudo (the script is only executed with sudo, but no changes to sudo/users is made in the script itself).

Can you type this as a user?

$ id

6. claudio - May 28, 2008


If the modification is relevant, can you post it here so I can add it to the howto?

When the howto seem valdiated by enough people I plan to write a small program to make the settings … and undo the changes when needed (in case you want to test the normal driver in a new kernel).

7. Jeff - May 30, 2008

Will WPA2 Enterprise Continue to work with the NDISWrapper?

8. claudio - May 30, 2008

I only have wpa2-personal at home and no wifi at work. I supposed it should work as ndiswrapper wraps the windows driver that already has that functionality.

9. dave asuncion, jr. - May 30, 2008

@ claudio: This sounds very interesting. As of now, I am actually happy with the how-to that invaleed supplied even though that the speed is somewhat slow.

@ invaleed: May I know what were the changes you did on your script as we both have the same laptop? Sorry, I am still a newbie on this. Thank you.

10. urke - May 30, 2008

Hello everyone. I tried your script and i cant get 54 Mbit. It is still 1 Mbit.

Invaleed and chris, could u post here yours scripts.

11. claudio - May 30, 2008

Do you have a bcm4312 card?

12. urke - May 30, 2008


13. urke - May 30, 2008

Im sry. I have bcm4311 card.

14. claudio - May 30, 2008

I am shure it should be very trivial to work with bcm4311 as well. Maybe try this (assuming you did the rest):

$ wget ftp://ftp.compaq.com/pub/softpaq/sp34001-34500/sp34152.exe
$ cabextract sp34152.exe
$ cabextract sp33008.exe
$ sudo ndiswrapper -i bcmwl5.inf
$ ndiswrapper -l
$ sudo depmod -a
$ sudo modprobe ndiswrapper

15. urke - May 30, 2008

i did that

sudo rmmod b43
sudo rmmod b44
sudo rmmod b43legacy #this step added Apr 27 2008
sudo rmmod ssb
sudo rmmod ndiswrapper
sudo modprobe ndiswrapper
sudo modprobe ssb
sudo modprobe b44 #this step added May 1 2008

16. claudio - May 31, 2008

@Jeff: this is what I see when ndiswrapper loads:

May 31 11:51:45 brisbane kernel: [ 583.390011] ndiswrapper: using IRQ 16
May 31 11:51:46 brisbane kernel: [ 583.813759] wlan0: ethernet device 00:1a:73:6c:8d:ee using NDIS driver: bcmwl5, version: 0×4281300, NDIS version: 0×501, vendor: ‘NDIS Network Adapter’, 14E4:4312.5.conf
May 31 11:51:46 brisbane kernel: [ 583.814392] wlan0: encryption modes supported: WEP; TKIP with WPA, WPA2, WPA2PSK; AES/CCMP with WPA, WPA2, WPA2PSK

17. dave asuncion, jr. - June 2, 2008


I am using a Lenovo 3000 g400 with broadcom wireless.

I tried using your script but its a no go for me.

This one worked: https://www.blogger.com/comment.g?blogID=8744935&postID=6226110368491991991&pli=1

I hope this helps.

18. dawid - July 28, 2008

Works great with Dell XPS M1530 and BCM4312.


19. claudio - July 29, 2008

I have received several confirmation of this howto working, and commended a java gui to simplify this for newbies. However, I am stuck because I lack the time…

20. ubuntu_learner - November 5, 2009

I have bcm4312 and I installed the ndiswrapper drivers.

It works great with open Wifi and WEP wifi. But it fails to connect to WPA or WPA2 personal wifi.

It keeps asking for the pass-key again and again.

I have blacklisted the relevant drivers and my ndiswrapper driver is loading properly. Also I installed drivers from HPs website as I have a HPdv4t-1400 laptop. They are different from the drivers mentiond in your post.

When I tried the drivers mentioned in your post ndiswrapper said that they were not for the device.

anyway so I think I have the right windows drivers (as I tested the same drivers on win xp and the same drivers work great on win xp), and I also have ndiswrapper set up properly.

The windows driver connect to wep , WPA, WPA 2 in winxp, but under ndiswrapper in ubuntu 9.1 they only connect to to open and WEP (WPA and WPA2 does not work).

any suggestions?

21. Next Jimbun Punya - March 30, 2010

Nice info. I would try on my ubuntu, because my wifi is problem

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 135 other followers

%d bloggers like this: