Setting up Broadcom wireless networking under Slackware 11
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
By pappy_mcfae at 2007-05-07 01:33
I am going to start right off with a warning. These instructions are going to be a bit long-winded. In order to make sure that I am as complete as possible, I will put forth every step I took in getting my wireless network running under Slackware Linux 11.0. Many of these steps will cross over into other Linux distributions. However, some steps and file names are exclusive to Slackware. If you find a file or a directory that isn't in your particular distribution, you will have to know which files in your distribution are analogous to the files named herein. Perhaps an enterprising person (or persons) out there can re-write this document specifically for their particular distribution. As far as I am concerned, the GNU ideal applies even to this document. All I ask is if you do rewrite this document for your distribution, please list me, Pappy McFae, as the original author. Thanks in advance.
I am going to make every attempt to spare the geek speak as much as possible. It is an unavoidable necessity considering that we are talking about computer operating systems, networking protocols, and programs. However, just because something is complex and involved on the surface doesn't mean there aren't simple steps that can be taken to get the job done. Besides that, the information about getting wireless networks operating under Linux that exists on the Internet is already cryptic enough. The last thing I want to do here is to add another layer of obfuscation to an already incredibly confusing and poorly documented subject. I'd hardly be following the spirit of open source operating systems, GNU, and Linus Torvalds if I took this document as an opportunity to profess myself as a superior geek. I am not. I am just tenacious when it comes to solving a problem.
This would all be academic as well as non-existent had I not recently purchased a new Compaq C504US laptop computer. It came with a Broadcom bcm43xx wireless network adapter built in. As a matter of fact, every laptop I looked at had some kind of wireless setup. I made my choice of machine due to monetary constraints. It was cheap...well, sort of. It came with Windows Vista pre-installed. That wasn't going to work for me! Windows Vista is a complete resource hog. I had no intention of having my new computer run slower than the old PII sitting next to my foot. I replaced Windows Vista with Windows XP Professional, and set up a dual boot with Slackware. I refuse to have a computer that doesn't have Linux.
Of course, all the bells and whistles worked fine as frog hair under Windows XP. Almost everything worked under Linux. The widescreen 1280x800 and the Wireless network adapter didn't. Thus began my search to find out how to make both items work as they should. The first and most disheartening thing I discovered was the Broadcom wireless adapter had no Linux native drivers. Had there been a native driver for the adapter, I'd have had an easier time getting things working. I just happened across a daemon that took care of the screen resolution as I was looking up files and procedures on the Internet. It installed with hardly a whimper! Happy happy, joy joy!
In order to get the wireless network to operate, I had to use [ndiswrapper], [cabextract] and [wpa_supplicant]. The only documentation for these programs is recycled man pages, especially [ndiswrapper]. Therein was the root my problem. Therein lies the reason for this document. After a week and a half of searching and researching, I finally hit upon a workable method for getting the wireless network operating.
File and directory names will be given in italics. Commands typed at a command prompt will be given in "quotes". Lines to be added to configuration files will be given in bold. Any output to the screen (standard output) will be listed in bold italic. Package names will be [italicized within brackets].
It is assumed that you are logged in as the root user. If you are not, you should log out and log back in as root. You may be able to cheat by using "su", but that's not how I did it. It is also assumed you know enough about Slackware Linux to be able to compile a kernel, expand a .tar.gz file, and compile those files contained in the .tar.gz package. It is also assumed that you know how to install a standard Slackware .tgz file using the Slackware package manager. If you are unfamiliar with these terms or operations, familiarize yourself with them before proceeding. Finally, it is assumed you realize that I am using the "latest and greatest" versions of the required packages. This document was hard enough to keep straight without sweating over making sure I put in the version numbers.
How I did it:
1) The most important step is to compile a 126.96.36.199 (or greater) version of the kernel. None of the listed packages will function under the default 2.4.33 kernel that ships with Slackware 11. The kernel source files are located on the Slackware distribution DVD and CD. The required file is /extra/linux-188.8.131.52/kernel-source-184.108.40.206-noarch-1.tgz. If you installed with the Slackware CD's, that file is located on the second disk.
2) Open the Slackware package manager and drag the kernel-source-220.127.116.11-noarch-1.tgz to it. Install it by clicking the Install button.
Note: There are numerous instructions on the Internet for compiling the kernel. I'll only add these important caveats: be sure to compile file system support (ie. ext3, reiserfs, etc.) directly into the kernel. Don't expect the modules to load the file system properly. They won't, and neither will initrd. You'll be left with kernel panic. Do the same with ACPI. In order for [ndiswrapper] to locate the adapter, ACPI is required.
3) While your package manager is still open, make absolutely sure that [wireless-tools-28-i486-3] is installed. It will be required later in the installation process. If you checked the default installation option, everything, it was installed by default. If not, the required file is /slackware/n/wireless-tools-28-i486-3.tgz. It will be located on the first install CD.
Getting the Windows Drivers:
Note: This computer uses a Broadcom adapter; therefore, the file names given reflect that fact.
1) If you are set up for a Windows XP dual boot like myself, the drivers you need will be on your partition containing your Windows XP installation. The latest drivers for the bcm43xx adapter are available at http://www.hp.com. Search for sp34152a.exe
2) If you don't have a machine set up to run Windows XP, you can use [cabextract] to extract the required files from sp34152a.exe.
3) The [cabextract] package is available at: http://www.kyz.uklinux.net/cabextract.php
4) Download the .tar.gz archive, and extract the contained files.
5) "cd" to the extracted directory.
6) Type "./configure && make && make install" to configure, compile, and install [cabextract].
7) Place the sp34152a.exe into its own directory (I use filehold as my default directory, but you can use whichever directory you wish).
8) "cd" to the directory where sp34152a.exe is.
9) Type "cabextract sp34152a.exe"
10) This will expand the files contained in sp34152a.exe.
11) For this installation, the files bmcwl5.inf and bmcwl5.sys are the only files required. The other files can be deleted if you wish.
Setting up [ndiswrapper]:
1) [ndiswrapper] is available at http://sourceforge.net/projects/ndiswrapper/.
2) Download the file and extract it.
3) "cd" to the extracted source directory for [ndiswrapper].
4) Type "make uninstall".
5) Type "make"
6) Type "make install"
7) "cd" to the directory with the expanded files (bmcwl5.inf and bmcwl5.sys).
8) Type "ndiswrapper -i bmcwl5.inf".
9) Type "ndiswrapper -l". You should receive the following message: driver present, device (HEX ADDRESS) present where HEX ADDRESS is an eight digit hexadecimal number separated by a colon reflecting the address of the Broadcom adapter.
10) Type "ndiswrapper -m" to write the modprobe configuration for [ndiswrapper].
11) Type "ndiswrapper -ma" to write the module alias to the /lib/modules/18.104.22.168/modules.alias file.
12) Type "ndiswrapper -mi" to write the module to /lib/modules/22.214.171.124/modules.conf file.
13) Just for good measure, go to the /lib/modules/126.96.36.199 directory and type "depmod". This step will insure that the [ndiswrapper] modules are installed and set up properly.
Note: At this point, I recommend a reboot. That way, you can check your work to this point to make sure that [ndiswrapper] does indeed come up. To make sure that all is well, once you finish your reboot, enter an X Windows session, start a terminal, and type "dmesg". If all is well to this point, you should see the following:
ndiswrapper version 1.42 loaded (smp=no)
ACPI: PCI Interrupt 0000:00:1d.2[C] -> Link [LNKC] -> GSI 3 (level, low) -> IRQ 3
ndiswrapper: driver bcmwl5 (Broadcom,10/12/2006, 188.8.131.52) loaded
ACPI: PCI Interrupt 0000:06:00.0[A] -> Link [LNKC] -> GSI 3 (level, low) -> IRQ 3
PCI: Setting latency timer of device 0000:06:00.0 to 64
ndiswrapper: using IRQ 3
wlan0: ethernet device 00:1a:73:20:85:cb using NDIS driver: bcmwl5, version: 0x4640f05, NDIS version: 0x501, vendor: '', 14E4:4311.5.conf
wlan0: encryption modes supported: WEP; TKIP with WPA, WPA2, WPA2PSK; AES/CCMP with WPA, WPA2, WPA2PSK
usbcore: registered new driver ndiswrapper
If you have successfully come to this point in the process, you are fairly close to getting your wireless adapter up and running. There are only a few steps left.
Setting up [wpa_supplicant]:
NOTE! This is the trickiest part of the installation!
1) [wpa_supplicant] is available at http://hostap.epitest.fi/releases/wp...t-0.5.7.tar.gz.
2) Extract [wpa_supplicant] in its own directory.
3) "cd" to the extracted source directory.
4) Create a text file called .config and open it.
5) Open the file called defconfig
6) Copy all the text from defconfig to .config and save the .config file.
7) You don't have to change any lines in .config. The defaults work just fine.
8) Type "make" to compile.
9) Copy the executable files to the /usr/local/bin directory by using the command "cp wpa_cli wpa_supplicant wpa_passphrase /usr/local/bin".
10) Copy the file wpa_supplicant.conf from the expanded directory into the /etc directory.
11) Open /etc/wpa_supplicant.conf (not the one in the source directory. Keep that one pristine just in case.
12) Edit out everything in that file after the line that reads: # Example blocks:.
13) Open a terminal (konsole).
14) Type "wpa_passphrase *ssid* *passphrase*" where *ssid* is the wireless indentifier (without the "*" 's) and *passphrase* is your default passphrase (once again, without the "*" 's).
15) This will generate the following:
where "your_ssid" is *ssid*,and "your_passphrase" is *passphrase* as entered in line fourteen above. The psk=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line is a 64 digit hex code key generated by wpa_passphrase.
16) Use your mouse to select this code. Alternatively, you can also type "wpa_passphrase <ssid> [PASSPHRASE] > passphrase.txt" to redirect the output to the file passphrase.txt.
17) Paste this code into the /etc/wpa_supplicant.conf file after the line that reads # Example blocks:.
18) Change the position of the "#" as shown below. This will eliminate an error source.
19) Save the file wpa_supplicant.conf.
20) Type "wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -d". You will see numerous chunks of code go flying past your screen. When things die down to the same three lines going past (about ten to thirty seconds depending on your system), hit ctrl+C.
21) Type the command "wpa_cli". This command will enter you into an interactive session with wpa_cli.
22) At the > prompt, type the following: "passphrase *ssid* *passphrase*" where *ssid* is the wireless identifier (without the "*" 's) and *passphrase* is the passphrase for that ssid (once again, without the "*" 's).
23) After you hit <enter>, wpa_cli will output OK, then the > prompt will come back.
24) Type "quit" to exit wpa_cli.
25) Type "dhcpcd wlan0". If everything is proper, you should come up with an IP address when you type "iwconfig".
26) If that happens, take five. Smoke 'em if you got 'em. We're almost done here.
1) Go to your /etc/rc.d directory.
2) Open the rc.inet1.conf file
3) Find the first line that says, #IFNAME="wlan0", and remove the # at the beginning of the line to un-comment it.
4) Save the file.
5) Open the rc.local file.
6) Add the line /usr/local/bin/wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -B to start the [wpa_supplicant] daemon automatically.
7) Add the line /sbin/dhcpcd wlan0 to automatically assign an IP address to your wireless adapter.
8) Save the file.
9) Right click on rc.local, select "properties", then select the "permissions" tab, and check the "is executable" check box.
10) Quit your X Windows session and reboot. If all went well, you should come up with a fully functional wireless network connection.
If you have any further problems, go back and make sure you took all the listed steps, especially the steps for [wpa_supplicant]. I personally had the greatest amount of trouble getting [wpa_supplicant] working properly. It really is tricky!
The above listed steps have rendered my Broadcom bcm43xx wireless adapter functional. While Samba doesn't work by way of wireless at this point, that is a configuration glitch in the wireless router, not the adapter in this machine. I'll leave that for another day!
It is my hope that these instructions will save you the time I lost, and the frustration I felt trying to get things running. If you are appreciative, reply here and let me know. It's nice to know I am appreciated. Since I am not going to make any money on this, a nice "thanks" goes miles with me!