When I have installed the Ubuntu Lucid Lynx distribution on my Dell Latitude E4300 laptop, I was not able to connect to my Wireless network with WPA encryption enabled. This post will show to you how to fix the problem.
Important notice: Steps described in the post don’t work for all users, especially for x386 Ubuntu platforms. I have written new post which may solve the problem for all users and describes more generic fix of the problem. Please check the Broadcom WiFi adapter WPA access fix on Ubuntu II post first. If it doesn’t solve the problem, you can check steps bellow as last rescue variant.
The WiFi access is essential for me long time. On my Laptop, WiFi works fine for me with previous version of the Ubuntu distribution (Ubuntu 9.10 Karmic Koala).
But when I upgrade the OS to the latest version Ubuntu 10.04 Lucid Lynx, I was not able to connect to any WPA protected network anymore. This behavior points to an latest distro software related problem, because the hardware works well in previous Ubuntu version. I cannot found any solution on the Internet, then I have started my own exploration.
I have discovered that problem is caused by newer Broadcom STA wireless card kernel driver bcmwl-kernel-source 18.104.22.168 which is not able to handle the WPA encryption correctly and I have not found any newest version to fix the problem (It’s a shame for Ubuntu developers, because this well known problem is here since Lucid has been released at end of April 2010)
NOTICE: In the latest Ubuntu 10.10 Maverick Meerkat is included the same version of the Broadcom driver. Then I expect similar problems on this OS. Please check that and let me know current status on the Maverick with original Ubuntu driver, then with my fix if original driver doesn’t wok.
Because Linux Kernel Drivers can be compatible across the distributions, I have tried to install older package from previous Ubuntu 9.10 Karmic Koala where all worked fine. Then I installed the bcmwl-kernel-source_22.214.171.124 version and it works! All WPA and WPA2 related network connections started working again!
Then, to fix the problem by my way, you have to provide these steps:
1) Download the older package from this link: http://packages.ubuntu.com/karmic/bcmwl-kernel-source. Be sure that you downloaded correct version for your CPU architecture – i386 or amd64:
Notice: The i386 version cannot be compiled on Lucid. Read below about fix of the compile problem.
2) Remove the original package:
sudo apt-get remove bcmwl-kernel-source
3) Install the downloaded package:
sudo dpkg -i package_for_your_arch.deb
I expect that you downloaded the package to the default Download sub-directory of your home folder, otherwise modify the path in cd command to directory where you have the package downloaded.
Instead of the package_for_your_arch.deb use correct package name:
- bcmwl-kernel-source_126.96.36.199+bdcom-0ubuntu4_amd64.deb for am64 architecture
- bcmwl-kernel-source_188.8.131.52+bdcom-0ubuntu4_i386.deb for i386 architecture.
Some people noticed me in comments that previous command doesn’t work.
The main problem is on i386 platform, where compilation of the wl.ko module fails. I have to notice here, that my howto has been tested on amd64 platform and here all works fine if all necessary packages are installed. Then, my recommendation is to use amd64 platform if possible. The Ubuntu system works great in 64 bit edition and brings lot of improvements here, then here is no reason to use 32bit platform if you have 64bit capable CPU. If you cannot use 64bit platform, then use my fixed package below.
If you are getting something like lines below during the build process:
bcmwl-kernel-source depends on dkms; however:
Package dkms is not installed.
then you do not have all necessary packages for build installed. To fix this, provide those steps:
sudo apt-get install patch
sudo apt-get install fakeroot
sudo apt-get install dkms
This will solve the problem and package will be correctly installed on amd64 platform. If the system notices other missing packages, install them too.
If you have the i386 platform, the package cannot be built correctly here because an include statement is missing in package sources, exactly in wl_linux.c file. During the build you can see this:
Error! Bad return status for module build on kernel: 2.6.32-24-generic (i686)
Consult the make.log in the build directory
/var/lib/dkms/bcmwl/184.108.40.206+bdcom/build/ for more information.
To fix this problem, you have to add
as the first #include statement to the beginning of the file wl_linux.c.
I have to say thank you to my friend and Linux Kernel Drivers expert Frantisek Hrbata, author of the RedirFS http://www.redirfs.org subsystem, who pointed me to the core of the problem.
The build fix is trivial on the source code layer, just add a line to the source file, but to make the fixed driver version comfortable to the users, i had to build own deb package with this fix. You can download it here:
I have no hardware with Broadcom and i386 Lucid Lynx installed and do not drive huge QA department to verify my fix. I have checked only build process of this package in virtual machine. So please try if it really helps and let me know by comment.
4) As last step, you have to lock the old package version to protect this against automatic upgrade of your system in the future.
I have tried to use terminal command:
sudo aptitude hold bcmwl-kernel-source
but it doesn’t works for me clearly and broadcom driver has been offered for upgrade during classical upgrade maintenance.
Then I have used GUI Synaptic tool:
Open the Synaptic Package Manager From system menu System->Administration->Synaptic Package Manager
Type broadcom keyword to the Quick Search window
Find the bcmwl-kernel-source item in list and highlight it. Then in Synaptic menu select Package->Lock Verison.
That’s all. Now, after reboot of your host your WiFi network will works clearly. Please let me know if it works for you or not by e-mail or comment.
Notice: Written from my Ubuntu Lucid Lynx Laptop connected by WPA WiFi network…