Slackware Wireless Networking With A BCM43XX

Andrew J. Nelson
Published: 21 July 2011


The Broadcom BCM43XX wireless networking card has proven to be as troublesome to use with Slackware as it is prevalent in many popular laptop models. This article provides a step by step guide on how to get your wireless up and running on a laptop with a BCM43XX wireless card running Slackware Linux. We will try to provide detailed information on why we do what we do, and link to references for more information if the reader wants to explore a specific topic in depth.

Required Materials and Prior Knowledge

You will, ofcourse, need a laptop with a BCM43XX card that has Slackware installed on it. A fresh install of the OS is preferred. A working knowledge of the Slackware BASH (or another shell) environment will be a big help. Commands that are specific to the process will be explained, but general navigation and working commands will not be. This method was developed from using a Dell Latitude E5500 with Slackware 13.1 (32 bit) installed on it. Make sure Slackware is fully updated. (This article tells you how to update Slackware with Slackpkg.

Step 1: Confirm That You Have A BCM43XX Card

Screenshot: Running the lspci command.

A screenshot of the output from running "lspci -v". Click to enlarge.

The first step is to make sure that the card you are running is actually a Broadcom BCM43XX. You may be sure, but lets make really sure by running lspci -v from the shell. LSPCI lists all PCI devices on your computer. The switch v requests verbosity in the reporting.

There will be a fairly long output. Scroll through it, looking for something that looks like the output in the screenshot to the right, where the first line reads, "Network Controller: Broadcom Corporation BCM4322 802.11a/b/g/n Wireless Lan Controller". If you see that, you know that you have the card.

  • lspci -v

Presuming that you see the card in your output, we can move on to the next step of installing the driver.

Step 2: Preparing The Driver

The first step is to create a directory to work in with the new driver. Where to do this is a personal choice; I use /usr/local/src. We will create a directory here called hybrid_wl.

  • cd /usr/local/src
  • mkdir hybrid_wl

We need to obtain the driver next. Download the driver from the Broadcom website to /usr/local/src/hybrid_wl. After downloading the driver, we need to extract it. (Make sure that you get the appropriate version, either 32 or 64 bit.)

Note: Your Filename May Differ!
  • cd hybrid_wl
  • tar -xzf hybrid-portsrc_x86_32-v5_100_82_38.tar.gz

Step 3: Building The Driver

We will build the driver as a loadable kernel module (lkm). We do this with the the "make clean" and "make" commands. The "make clean" command deletes any executable files and all object files that could be left over from a prior execution of "make". Running "make" then determines automatically which pieces of a large program need to be recompiled, and issues the command to recompile them.

  • make clean
  • make

In essence, "make clean" ensures we have a fresh starting point for building the driver, and "make" builds the driver. After running the commands, a file called "wl.ko" will appear at the top of the wl_hybrid directory. This is the driver. The .ko indicates it is a "kernel object", which is the new terminology for the .lkm for kernel 2.6 and up.

Step 4: Preventing Conflicts and Ensuring Dependencies

Screenshot: Running the lsmod command.

A screenshot of the output from running "lsmod | grep "b43\|ssb\|wl". Click to enlarge.

Before we load the driver into the kernel, we need to make sure that no other driver will conflict with it, and that it has a security module to work with. To find conflicting modules, we will use the lsmod command, which lists all the loaded kernel modules. The modules that can conflict are "b43", "ssb", and "wl".

Check out the screenshot to the right for an example of the output from running the command. The command example is shown below. You can see from the screenshot that on my system I had "b43" and "ssb" loaded. The next step in the process is to unload those modules.

  • lsmod | grep "b43\|ssb\|wl"

To unload the conflicting modules, we use the rmmod command, which is "a simple program to remove a module from the Linux kernel". The shell commands below are specific to my example; you may need to remove more or fewer modules.

  • rmmod b43
  • rmmod ssb

To borrow a phrase from object oriented programming, removing the modules only does so from this instantiation of the kernel. To prevent them from being loaded the next time the system reboots, we need to blacklist them. We do this by adding them to the blacklist.conf located in /etc/modprobe.d.

Open /etc/modprobe.d/blacklist.conf with your favorite text editor (I like pico- don't hate me vi lovers!). Add the following lines to the end of the file. Once again, this is specific to my example. You may have to blacklist more or fewer modules depending upon the output of your lsmod.

  • blacklist b43
  • blacklist ssb

The last step in this section is to make sure that the driver has a security module to work with. To do this, we use modprobe to add the security modules. Try both of these commands:

  • modprobe lib80211
  • modprobe ieee80211_crypt_tkip

Those are the two prevalent security modules, with the first being the newest and most common. If both commands return "FATAL: Module not found", you will need to install a security module. It is fine for one of the two to do so, but not both.

Step 5: Installing The Driver

We want to first load the module, make sure it works, and then set things up so that it loads at boot every time. To first load the module, we use insmod, which is "a simple program to insert a module into the Linux Kernel". Still at the top of /wl_hybrid:

  • insmod wl.ko
Screenshot: Running the iwconfig command.

A screenshot of the output from running "iwconfig". Click to enlarge.

That should insert the module. To test that it is functioning, we can run iwconfig, which will display your wireless adapaters. If everything has gone correctly, a new wireless adapter should be seen in the output which was not there before. Check out the screenshot to the left for an example of this output.

Now that we have confirmed that the module successfully loads, we need to set it up so that it will do so at boot. First, we need to copy the driver wl.ko into the directory where kernel objects are kept. From /wl_hybrid:

  • cp wl.ko /lib/modules/`uname -r`/kernel/net/wireless

Lets talk about that copy command for a minute, because there are a couple things to point out. First, in the middle of the target path you will notice `uname -r`. The leading and trailing symbols are backticks, not single quotes. A backtick tells the shell to execute a system command, which in this case is uname -r. The uname -r command prints the current kernel version. Because /lib/modules/ can contain multiple kernels, it could be difficult to know which kernel path to follow to insert the module into. By using uname -r, we guarantee that we will follow the path to the current kernel.

Now that the module is located in its new home, we will remove the copy in /wl_hybrid from the kernel, once again with rmmod.

  • rmmod wl

Ok, so we have a driver which we know works stored in the place that kernel modules belong. We need to build dependencies for that object, then start the module. To build the dependencies, we use depmod -a, which examines the modules and exports their dependencies to modules.dep. Then we activate the module with modprobe.

  • depmod -a
  • modprobe wl

So, why did we use insmod to activate the module the first time and modprobe the second time? Insmod activates a specified module without settings or dependencies. Modprobe is used to activate a module which has dependencies; as well, modprobe will only activate modules located in certain directories. Insmod can operate on a module no matter where it is located, such as the directory we created for this exercise.

We are almost there. The final step is to make sure the kernel object (wl.ko) loads at boot time. We do this by editing /etc/rc.d/rc.local. The rc.local file is the initialization script; any commands appended to it will run at system boot. Add this line to the end of the file:

  • modprobe wl

The driver is now fully functional and automated. The final step in our process is using it!

Step 6: Wireless Networking With WICD

I am a Slacker. I like Slackware because I can do so much from the command line and from config files. But, wireless configuration escapes me. It is easier to work with httpd.conf or php.ini than try to figure out wireless configuration for Slackware. I do like it when a GUI tool does what it is supposed to do and does it quickly and well.

The WICD network manager is such a tool. It makes wireless networking with Slackware simple, easy, and quick. By default, wicd is shipped with Slackware in /extra. We can install it with using slackpkg. (If you haven't used slackpkg before, you can reference the Webgnuru Slackpkg How To as a starting point.)

  • slackpkg install wicd
Screenshot: WICD in use.

A screenshot of the wicd tool in use. Click to enlarge.

Once wicd is installed, it is simply a matter of opening it from your desktop environment, selecting the wireless network you want to connect to and joining it. If the network is secured, click properties and enter the password. Voila! Check our the screenshot to the right for an example of what wicd looks like in use.

If you want to try your hand at understanding how to configure your wireless network settings from the shell, a good place to start is at Alienbob's Wireless Networking Page. It is by no means an impossible task, and I have made it work in the past.


The tux logo for WG.

Share this article on Google+ or your favorite social media. Thanks!

I hope this article provides some insight into getting a BCM43XX card to work with Slackware, along with why you do things a certain way. Thanks for sticking with it!

If you have any questions, concerns, suggestions, or constructive criticism, please email me.

Sources Of Information

Copyright © 2008 - 2013 Andrew Nelson under the GPL v3 License except where noted.
Please see the README file for full licensing disclosure and credits.