LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Linux Answers > Networking
User Name
Password

Notices


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.

Quick History:

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.

Conventions:
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].

Assumptions:
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 2.6.17.13 (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-2.6.17.13/kernel-source-2.6.17.13-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-2.6.17.13-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/2.6.17.13/modules.alias file.
12) Type "ndiswrapper -mi" to write the module to /lib/modules/2.6.17.13/modules.conf file.
13) Just for good measure, go to the /lib/modules/2.6.17.13 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:

.....numerous lines.......

ndiswrapper version 1.42 loaded (smp=no)
ACPI: PCI Interrupt 0000:00:1d.2[C] -> Link [LNKC] -> GSI 3 (level, low) -> IRQ 3

.....more lines.......

ndiswrapper: driver bcmwl5 (Broadcom,10/12/2006, 4.100.15.5) 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:

network={
ssid="your_ssid"
#psk="your_passphrase"
psk=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
}


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.

network={
ssid="your_ssid"
psk="your_passphrase"
#psk=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
}


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.

Finishing steps:

1) Go to your /etc/rc.d directory.
2) Open the rc.inet1.conf file
3) Find the first line that says, #IFNAME[4]="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!

Happy networking!

Blessed be!
Pappy

by alain10 on Mon, 2007-10-08 10:33
Hello Pappy id like to thank u for this , im on slackware 12 , was wondering it its the same , because i get to the point where i have to Type "wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -d, and i get stuck at EAPOL: startWhen --> 0 and it freezes there ???


WPA: Key negotiation completed with 00:13:46:a4:c6:8a [PTK=TKIP GTK=TKIP]
Cancelling authentication timeout
State: GROUP_HANDSHAKE -> COMPLETED
EAPOL: External notification - portValid=1
EAPOL: External notification - EAP success=1
EAP: EAP entering state DISABLED

by ebabin on Tue, 2008-01-01 10:58
I ran across the same problem. What I did was to run wpa_cli when the output of the wpa_supplicant stops. I then entered the "passphrase *ssid* *passphrase*" command and everything went honky dory. The wpa_supplicant output started to repeat itself and then I hit cntrl-C in that window. Everything else went on without a hitch. Thanks Pappy for your excellent help!!

by bemot on Wed, 2008-01-23 12:32
it worked great for me. I have DELL INSPIRON 6400.
Blessings to you.

by shewasoctober on Sun, 2009-01-04 07:07
Hey! I have an Acer Aspire 3680 and am running Kubuntu 8.10. I didn't follow your how tow, but then again, that was because I hadn't come across it at the time. However, the steps I performed are the same as 2 of yours, finding the XP Driver and installing ndiswrapper. Prior to that I changed my network manager to Wicd, and that supports WPA, so I didn't install wpa_supplicant.

Excellent how to. Much easier to follow than the ones I came across. I ended up finding multiple instructions that I had to piece together. Wasn't easy being new to linux. This forum is great!

by jammer_111 on Wed, 2009-01-14 21:33
whenever i get to the "make" command for ndiswrapper i get this error

make[3]: *** [/root/Desktop/ndiswrapper-1.53/driver/iw_ndis.o] Error 1
make[2]: *** [_module_/root/Desktop/ndiswrapper-1.53/driver] Error 2
make[2]: Leaving directory `/usr/src/linux-2.6.27.7'
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/root/Desktop/ndiswrapper-1.53/driver'
make: *** [all] Error 2

any advise?

by Boilawm1991 on Wed, 2023-12-27 14:20
Help

by Boilawm1991 on Wed, 2023-12-27 14:21
Connection ip

by onebuck on Thu, 2023-12-28 08:46
@Boilawm1991
High jacking necro threads is frowned upon. You provided no information for a query of a 14 year old thread. I suggest that you create a new thread and provide information to fellow members so they can help you. Be sure to create the thread in the appropriate forum.

Please consider looking at this to help compose a thread; https://www.linuxquestions.org/quest...hp?faq=welcome


  



All times are GMT -5. The time now is 03:18 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration