Before beginning the post, I would like to convey my gratitude to Ershad who has been there for me whenever I was in need of assistance.
It so happened that one fine day I decided to do my entire main project in the Debian distro. As if to motivate me, Debian came out with their latest release 6.0, squeeze, just then itself. So I decided to go with it.
I downloaded the CD-ROM iso from this site and made a bootable flash with it. I installed it in my netbook in the middle of which it fetched about 1120 packages from the net (which inhibited all my work for almost three long hours) and installed them. I hadn’t created the ‘root’ account deciding to use ‘sudo’ for administrative privileges whenever I needed them.
The installation was successful and I booted into it. Everything was fine. There stood the bluetooth applet proudly in the notification area alongside whom stood the network manager applet displaying the message ‘wired connection auto eth0 active’. Life was good.
Happily when I was just about to retire back to my room, I pulled out the Ethernet cable. And to my dismay I noted that the internet was disconnected. That is, the Wi-Fi connectivity was not there.
I tried left clicking on the applet and it did not show any wireless reception. I realized that my system was not detecting the presence of my modem’s wireless signal in the vicinity. The problem? Wireless not working in Debian 6.0, squeeze.
I had feeling that the trail I was about to blaze was going to be long and hard.
THE QUEST BEGINS
What was the first thing to do? Google for the problem, of course. All the sites that I referred to told me to install the package ‘wireless-tools’ before going any further. Well, I went ahead and installed it.
sudo apt-get install wireless-tools
It installed peacefully. I remembered that there was a command called ‘iwconfig’ within this package. So just to try out what it did, I typed in ‘iw’ and pressed tab for the tab completion. Nothing happened.
I typed the entire thing in as ‘iwconfig’ and hit enter. I was greeted with a friendly message.
bash: iwconfig: command not found
Okay, so the package was not installed? I had no clue. Just to try it, I typed in ‘ifconfig’ and hit enter whose output was no more helpful than a banana peel.
bash: ifconfig: command not found
So where the heck were these packages?? Being as irritated as I was, I don’t know why, but I craved for more power and accessed my root account with ‘sudo -i’. Ha! And then in that flow I simply just typed in ‘iw’ and tried tab completion and viola! There it was! ‘ifconfig’ was there too.
Debian really doesn’t appreciate its local ignorant users tinkering with super cool tools I guess. After that moment onwards, everything that I did was as root.
However, I really was sitting without any clue so as to what to do next. But then I noticed that Ershad was online by this time. We entered into a casual chat me mocking his status message in gtalk. His status was, ” ‘Reboot’ has the magical power of fixing issues sometimes 😉 “. Although in my case, ‘suspend’ was a magician too. However, after a while, I presented my problem to him.
He asked me which was my wlan hardware. I, being the genius that I am, had no clue what he was talking about. He told me to run the following command.
dmesg | grep -i wireless
Its output was:
[ 13.312354] eth1: Broadcom BCM4315 802.11 Hybrid Wireless Controller 18.104.22.168
Ah! So there it was. My wlan device was Broadcom and its model number was BCM4315. He mentioned that Broadcom needed proprietary drivers in order to work. He also mentioned that Broadcom had gone open source lately and its drivers were available in the latest Linux kernel releases. The article regarding that is here.
So I had two options. One, to fix the wireless issue by installing the driver and playing with the wireless tools. Second, by updating my kernel by downloading and compiling the latest stable version.
The second option sounded too much fun. But if doing that fixed the wireless issue, I thought that it would deny me the chance of learning what all would happen in manually trying to fix the wireless issue by itself. So I promised I would compile the kernel separately after fixing my wireless and thus decided to go with my option numero uno.
THE DRIVER HUNT
I googled for a way to install the Broadcom drivers and found quite a good description in this page. I had to add a non free repo to my Debian repository. So by accessing my /etc/apt/sources.list file, I added the following line to it.
deb http://ftp.us.debian.org/debian squeeze main contrib non-free
Mind you, I am doing everything in root. After saving the file, I ran:
and then installed the package that I required by doing:
apt-get install firmware-brcm80211
The installation finished successfully. And since the driver is a part of the kernel, you needed to load it into the kernel. For that we do:
modprobe -r brcm80211 ; modprobe brcm80211
Alright. I was good to go. But wasn’t that too easy? Yes it was. And as such, something was bound to go wrong and guess what? It did! Nothing had changed except that I had wasted a huge amount of my time. So what went wrong?
An obvious fact that my device was BCM4315 and not brcm80211! Oh how silly I was!
THE CORRECT DRIVER (or chauffeur?)
I was narrowing down to the point where my answer lay. I could feel that the end was near. Googling for BCM4315 drivers, I found the site here. The names of the drivers that the BCM43xx series wanted was given there. And I, in all the happiness, went and installed the first one.
apt-get install firmware-b43-installer
It started to work. Yes! Was I done? Oh no… Of course not. The installation showed an error. And the line that caught my eye was:
Not supported low-power chip with PCI id 14e4:4315!
Whoa! They had mentioned something about the PCI id not being sufficient enough to identify the chipset. And that itself caused the problem. So I followed the next link they had provided and reached here.
I learned a few things over here. One was that the PCI id was a pair of hexadecimal numbers just like the one that we saw above. (14e4:4315). The first four indicated the vendor and the last four indicated the device. But I hadn’t figured this out then. It was after I did the following command that I understood it.
lspci -vnn | grep 14e4
Its output was:
02:00.0 Network controller : Broadcom Corporation BCM4312 802.11b/g LP-PHY [14e4:4315] (rev 01)
Subsystem: Broadcom Corporation Device [14e4:04b5]
And there in the first square brackets was the PCI id. It was the same one as earlier. The following table lists whether mine is supported or not. (I have italicized and made bold my PCI id in the table). And the table says mine is supported.
|PCI-ID||Supported?||Chip ID||Modes||PHY version||Alternative|
|14e4:0576||no||BCM43224||?||?||wl (aka STA)|
|14e4:4315||yes (2.6.33+)||BCM4312||b/g||LP (r1)||wl|
|14e4:4320 (USB)||no (USB device)||BCM4320||a/g||?||rndis_wlan|
|14e4:4321||partially in 2.6.39+||BCM4321||?||N (r2)|
|14e4:4323 (USB)||no (USB device)||BCM4323||a/b/g/n||?||ndiswrapper|
|14e4:4324||yes (b43legacy)||BCM4306||?||G (r1/2)|
|14e4:4328||partially in 2.6.39+||BCM4321||b/g/n||N (r2)||wl|
|14e4:4329||partially in 2.6.39+||BCM4321||b/g/n||N (r1)||wl/brcm80211|
|14e4:432b||partially in 2.6.39+||BCM4322||?||N (r4)||wl|
|14e4:4331||no (WIP)||BCM4331||?||HT (r1)|
|14e4:4353||yes (3.1+)||BCM43224||a/b/g/n||N (r6)||wl/brcm80211|
|14e4:4357||yes (3.1+)||BCM43225||a/b/g/n?||N (r6)||wl/brcm80211|
Now what? Mine is supported so what do I do? I again went back to the site from where I had mentioned earlier I had installed the first command shown. And there, a careful reading revealed to me that it was the second one that I had to install and I did:
apt-get install firmware-b43-lpphy-installer
Thank goodness! The installation was completed successfully. And in order load the driver into the kernel, I did
Alright the drivers were loaded nice and smooth. But there remained the task of actually getting our good old wireless device up and running. And as for that matter, what we have to do, quite literally, is:
ifconfig wlan0 up
Viola! I was done! Was I? Yes I was! Left-clicking on the network manager applet now showed my modem’s Wi-Fi signal! But when clicking it, nothing happened. It was then that I remembered the magic Ershad had taught me. Reboot!
I rebooted my system and here I am blogging from my room while my modem is sitting way far away in the hall.
It was a day well spent. 🙂