$ lspci -nn | grep 14e4
This should return something that looks like this:
03:00.0 Network controller [0280]: Broadcom Corporation BCM4312 802.11b/g [14e4:4315] (rev 01)
The important things above are the BCM4312 and the [14e4:4315]. If you see these things, then you know that you'll need to download the wl driver here. Or you can use wget from the terminal:
$ mkdir broadcom_wl && cd broadcom_wl
$ wget http://www.broadcom.com/docs/linux_sta/hybrid-portsrc-x86_32-v5_10_91_9.tar.gz
$ wget http://www.broadcom.com/docs/linux_sta/hybrid-portsrc-x86_32-v5_10_91_9.tar.gz
Before we can compile and install the driver, we're going to have to make sure we have a couple packages installed on our system:
# apt-get update
# apt-get install build-essential linux-headers-`uname -r`
# apt-get install build-essential linux-headers-`uname -r`
Now we want to untar the file so we can get to installing it
$ tar -xvf hybrid-postsrc-x86_32-v5_10_91_9.tar.gz
You should notice two directories: lib and src as well as one file: Makefile in the directory where you untarred the download. Now we're going to do some cleanup and then compile the driver:
$ sudo make -C /lib/modules/`uname -r`/build M=`pwd` clean
$ sudo make -C /lib/modules/`uname -r`/build M=`pwd`
$ sudo make -C /lib/modules/`uname -r`/build M=`pwd`
Now you should see a file wl.ko in the directory. Now we want to see if there are any of the following moudles loaded on your system: b43, b43legacy, or bcm43xx.
$ lsmod | grep 43
Make a note of which of the above mentioned modules you found with the above command. You'll want to unload the corresponding module with the appropriate command:
# rmmod b43
# rmmod b43legacy
# rmmod bcm43xx
# rmmod b43legacy
# rmmod bcm43xx
You will want to double check that the module(s) got unloaded correctly with the lsmod command above. After confirming that these modules have been unloaded, we will want to copy the wl.ko file into the appropriate directory for the system to find it:
# cp wl.ko /lib/modules/`uname -r`/kernel/net/wireless/wl.ko
Now we should be able to load the wl driver, and if you need to use wpa_supplicant, we'll load the ieee80211_crypt_tkip module as well:
# depmod
# modprobe ieee80211_crypt_tkip
# modprobe wl
# modprobe ieee80211_crypt_tkip
# modprobe wl
Now your wireless adapter should be working properly. You should confirm that the system sees the adapter now:
$ /sbin/ifconfig
You should see at least three adapters displayed:
- eth0 - This is your ethernet adapter
- lo - This is your loopback adapter
- eth1 or wlan0 - This is your wireless adapter, mine shows up as eth1
Now you should be able to connect to your wireless network through network-manager, wicd, or whatever program you use to manage your network connections.
The next important step is that we want to make sure that our new wireless driver starts up on system start up. This means we get to roll up our sleeves and edit some system files. First we'll start by blacklisting the drivers that we had to unload before. You'll want to add the appropriate lines from the following into your /etc/modprobe.d/blacklist file:
blacklist b43
blacklist b43legacy
blacklist bcm43xx
blacklist b43legacy
blacklist bcm43xx
You can add these lines by opening the file with your favorite text editor:
# vim /etc/modprobe.d/blacklist
Or:
# gedit /etc/modprobe.d/blacklist
If you want to be a little quicker about it, you can use the echo command:
# echo "blacklist b43" >> /etc/modprobe.d/blacklist
# echo "blacklist b43legacy" >> /etc/modprobe.d/blacklist
# echo "blacklist bcm43xx" >> /etc/modprobe.d/blacklist
# echo "blacklist b43legacy" >> /etc/modprobe.d/blacklist
# echo "blacklist bcm43xx" >> /etc/modprobe.d/blacklist
This will prevent the above modules from being loaded in the future. Now we want to make sure the ieee80211_crypt_tkip and wl modules are loaded by default. We'll have to edit the /etc/modules file to add the following lines to it:
ieee80211_crypt_tkip
wl
wl
Again, you can edit this file in your favorite text editor or with the echo command:
# vim /etc/modules
Or:
# gedit /etc/modules
Or:
# echo "ieee80211_crypt_tkip" >> /etc/modules
# echo "wl" >> /etc/modules
# echo "wl" >> /etc/modules
Now that we've got the wireless adapter working and loading on system start up, the next thing you may notice is that the wireless adapter does not work after resuming from suspend. There is a pretty easy fix for this. We are going to create a file that will tell the system how to deal with the wireless adapter on suspend. It doesn't really matter what you name this file, as long as it is located in /etc/pm/config.d/ you're ok. I followed a convention that you may notice in other Linux system folders and named my file 01-modules. The file needs to contain the following text:
SUSPEND_MODULES="wl"
You can create this file with your favorite text editor or with the echo command:
# vim /etc/pm/config.d/01-modules
Or:
# gedit /etc/pm/config.d/01-modules
Or:
# echo "SUSPEND_MODULES=\"wl\"" > /etc/pm/config.d/01-modules
Now that you've got that file created, your wireless adapter should be working whenever you boot up your Mini 9 and when you resume from standby.
Next time we'll get the audio working on the Mini 9
perfect
ReplyDeleteVery nice article and worked perfectly. Thanks
ReplyDeleteworked like a charm.. thanks a whole ton.. i had been trying to do this since a long time!!
ReplyDeleteThanks!! I'm just installing Debian and this is very useful
ReplyDeletehey.. i know that this is perhaps a very old post and you hardly come back to it.. i have posted above if you see.
ReplyDeleteI have been using your post for reference a number of times when I have had to compile to module (for myself and a number of friends that had the same chip and needed help).
However today I updated my kernel, and following these steps is not building the module. Instead the very first command, i.e. the clean command is giving this error:
make: Entering directory `/usr/src/linux-headers-2.6.31-19-generic'
make: Makefile: No such file or directory
make: *** No rule to make target `Makefile'. Stop.
same for the make command. Now another thing that is funny is that `uname -r` is pointing to the wrong directory (it should be just 2.6.31-19). it points to the right directory if I just do a cd /path/`uname -r` but not in the make command. However that isn't all. Even if I manually try to make by pointing to the right directory I get the same error.
Could you help out? or at least explain the problem if you get it, and I will try fixing it on my own.
Thanks. Hope you check this post.
Akhil,
ReplyDeleteIt sounds like you haven't installed the headers for the kernel version you're running.
So, I'm just guessing that when you run the following:
$ uname -r
The output is:
2.6.31-19-generic
But if you run:
$ ls /usr/src
you do not see:
/usr/src/linux-headers-2.6.31-19-generic
If that is the case, try running:
$ sudo apt-get update
$ sudo apt-get install linux-headers-2.6.31-19-generic
Hopefully that will help. Please let me know if I am mistaken and if this works.
I'm glad this has worked for you in the past. I hope it's not too much trouble to get it working this time.
Cheers,
grabag-linux
hey.. i visited again after a long time today.. and indeed you were right then, I had not installed the kernel headers.. i later on realised this on my own.. but forgot to come here and check for your reply.. thanks (belated) for the help!
ReplyDeleteCheers.
4 years later and this still is solid advice! ZI used this to resurrect my Dell Mini with Zorin OS. The name of the ieee80211_crypt_tkip file is now lib80211_crypt_tkip. But that was the only change.
ReplyDeleteThanks!
Links are dead...any new links to either WGET or download form the internet?
ReplyDelete