LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-24-2008, 04:55 AM   #1
proc
Member
 
Registered: Jul 2007
Location: /dev/urandom
Posts: 70

Rep: Reputation: 15
Why is WPA almost impossible to use on Slackware?


For the life of me, I can not figure out what is going on, if I set my router to WEP I can configure Slackware just fine, set it to WPA tho and I can follow the instructions fine it doesn't work, it just doesn't work, it's my only explanation to this, I've spent nearly 2 days now trying to get WPA to work, but I just can't I don't have any problems building an entire OS from the ground up but can't configure WPA.. this saddens me to no end.

WEP = 5 min configuration
WPA = Longer then trying to brute force your way into an 8 phrase passkey 256bit rsa encryption algorithm.


My questions you all your guys is WHYYYYYY!!!!?!?!?!!!?????????
 
Old 05-24-2008, 05:12 AM   #2
Takla
Member
 
Registered: Aug 2006
Distribution: Debian
Posts: 188

Rep: Reputation: 34
I can't tell you why, not being a Slackware user, but maybe I can point you in the right direction for how. I've used several Slackware derivatives with WPA and a very good gui tool for wireless and wired connections is Wicd. You can get a Slackware package for 12.1 from rworkman's Slackware Packages Wicd has worked for me in Zenwalk & Wolvix (Slackware based) and I use it in Debian (lenny) in preference to network-manager.

edit: be sure to have pygtk and dbus-python already installed.

Last edited by Takla; 05-24-2008 at 05:15 AM.
 
Old 05-24-2008, 05:16 AM   #3
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
WPA isn't difficult at all, just use wpa_supplicant and that's it. Shortly put, create a configuration file (usually /etc/wpa_supplicant.conf) or modify existing one by adding a network section there for your connection.

You can create a basic network entry with wpa_passphrase:
Code:
wpa_passphrase network_ssid_here network_passphrase_here
Fill in network SSID and passphrase, and that prints a short network section with encrypted key; you can use the encrypted key or non-encrypted key, just make sure there is only one psk line in the section that is not commented. Copy that and paste it to the wpa_supplicant configuration file. Then add any extra configurations to the network section (or outside it if needed) you might want, such as
Code:
key_mgmt=WPA-PSK
Also there should almost surely be this line outside the network sections (usually in the beginning):
Code:
ctrl_interface=/var/run/wpa_supplicant
Other than that, you shouldn't need much else. With ndiswrapper driver you might need to set eapol_version to a non-default value, but I haven't needed that with any other driver. Then just save and try if it works:
Code:
wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -B
dhcpcd wlan0
Change wlan0 to eth1 or whatever you use if the device is not wlan0, and make sure the configuration file is correct. And if you use dhclient instead of dhcpcd (or something else), change that too. If that doesn't work,
Code:
killall -q dhcpcd
killall -q wpa_supplicant
modify configuration file and re-try (maybe with verbose output if you like).

The shortest file I used was somewhat like this if I remember it correctly:
Code:
ctrl_interface=/var/run/wpa_supplicant
network={
	ssid="networkssid"
	key_mgmt=WPA-PSK
	psk="verysecretpassphrase"
}
Not sure if key_mgmt was even needed. But anyway, it wasn't nearly as difficult as it looked like in the beginning if you can connect with WEP encryption, WPA isn't much more difficult.

It might be even easier if you used one of the graphical tools of KDE to make the connection, but wpa_supplicant simply works.

Last edited by b0uncer; 05-24-2008 at 05:19 AM.
 
Old 05-24-2008, 05:24 AM   #4
proc
Member
 
Registered: Jul 2007
Location: /dev/urandom
Posts: 70

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by b0uncer View Post
WPA isn't difficult at all, just use wpa_supplicant and that's it. Shortly put, create a configuration file (usually /etc/wpa_supplicant.conf) or modify existing one by adding a network section there for your connection.

You can create a basic network entry with wpa_passphrase:
Code:
wpa_passphrase network_ssid_here network_passphrase_here
Fill in network SSID and passphrase, and that prints a short network section with encrypted key; you can use the encrypted key or non-encrypted key, just make sure there is only one psk line in the section that is not commented. Copy that and paste it to the wpa_supplicant configuration file. Then add any extra configurations to the network section (or outside it if needed) you might want, such as
Code:
key_mgmt=WPA-PSK
Also there should almost surely be this line outside the network sections (usually in the beginning):
Code:
ctrl_interface=/var/run/wpa_supplicant
Other than that, you shouldn't need much else. With ndiswrapper driver you might need to set eapol_version to a non-default value, but I haven't needed that with any other driver. Then just save and try if it works:
Code:
wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -B
dhcpcd wlan0
Change wlan0 to eth1 or whatever you use if the device is not wlan0, and make sure the configuration file is correct. And if you use dhclient instead of dhcpcd (or something else), change that too. If that doesn't work,
Code:
killall -q dhcpcd
killall -q wpa_supplicant
modify configuration file and re-try (maybe with verbose output if you like).

The shortest file I used was somewhat like this if I remember it correctly:
Code:
ctrl_interface=/var/run/wpa_supplicant
network={
	ssid="networkssid"
	key_mgmt=WPA-PSK
	psk="verysecretpassphrase"
}
Not sure if key_mgmt was even needed. But anyway, it wasn't nearly as difficult as it looked like in the beginning if you can connect with WEP encryption, WPA isn't much more difficult.

It might be even easier if you used one of the graphical tools of KDE to make the connection, but wpa_supplicant simply works.


Thats the part that makes me scream I just did that character by character and nothing changes, it does the same thing it try to connect I even get wap_gui telling me it has associated but dhcpcd hangs then disabled wlan0 and I am back where I started.
 
Old 05-24-2008, 06:11 AM   #5
proc
Member
 
Registered: Jul 2007
Location: /dev/urandom
Posts: 70

Original Poster
Rep: Reputation: 15
Found the problem, I donno how or why, but for fun I recompiled the b43 driver (my card is a bcm4318) and it works!
 
Old 05-24-2008, 07:43 AM   #6
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
oh, so you have a broadcom card ... those are know to be tough to configure, mostly because either the drivers are incomplete or the card manufacturer sucks.
 
Old 05-24-2008, 10:10 AM   #7
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Well the card manufacturer doesn't "suck", it's just that drivers haven't been released for Linux by them, so it makes the road a little bumpy..actually 4318 works pretty well today, compared to what it was like earlier.

I don't remember having to recompile b43 module, but if it helped, I'm glad for you I had a fight with that card using ndiswrapper, but luckily found bcm43xx module after that, along with fwcutter..and then came along b43 and b43-fwcutter which have worked without any pains (other than having to get Windows drivers and run fwcutter after installation).

I forgot to mention in my earlier post that the device wlan0 (or whatever it is called, but the wireless device anyway) should be "up" before running wpa_supplicant..so if it's not,
Code:
ifconfig wlan0 up
should be done as root. If wpa_supplicant does that too when it's run, good, but in case it doesn't.. (I don't remember right now if it does)

Another solution for mean wireless cards without Linux drivers is to buy a usually cheap USB-connected small wireless dongle that has native Linux drivers (such as A-Link's wl54usb). Of course it's money too, but around $20 isn't horribly much if it spares the user a lot of headache..and in addition it's easy to move to another machine if needed.

Last edited by b0uncer; 05-24-2008 at 10:12 AM.
 
Old 05-24-2008, 12:34 PM   #8
Stealthy_C
LQ Newbie
 
Registered: Sep 2003
Posts: 29

Rep: Reputation: 15
I only ran into a small problem with WPA. Before I noticed the wpa_gui app under "K->Internet" I had used Wireless Assistant to setup the WPA connection. But for some reason the connection still failed to connect.

Then I noticed in wpa_gui, that the Encryption was set to CCMP instead of TKIP. Works now
 
Old 05-24-2008, 12:41 PM   #9
Stealthy_C
LQ Newbie
 
Registered: Sep 2003
Posts: 29

Rep: Reputation: 15
Quote:
Originally Posted by b0uncer View Post
Well the card manufacturer doesn't "suck", it's just that drivers haven't been released for Linux by them, so it makes the road a little bumpy..actually 4318 works pretty well today, compared to what it was like earlier.

Another solution for mean wireless cards without Linux drivers is to buy a usually cheap USB-connected small wireless dongle that has native Linux drivers (such as A-Link's wl54usb). Of course it's money too, but around $20 isn't horribly much if it spares the user a lot of headache..and in addition it's easy to move to another machine if needed.
Or one could use NDISwrapper http://ndiswrapper.sourceforge.net/
Quote:
Originally Posted by NDISwrapper.sourceforge.net
Many vendors do not release specifications of the hardware or provide a Linux driver for their wireless network cards. This project implements Windows kernel API and NDIS (Network Driver Interface Specification) API within Linux kernel. A Windows driver for wireless network card is then linked to this implementation so that the driver runs natively, as though it is in Windows, without binary emulation.

With ndiswrapper, most miniPCI (builtin), PCI, PCMCIA (Cardbus only) or USB wireless network cards work in Linux with x86 or x86-64. Although ndiswrapper is intended for wireless network cards, other devices are known to work: e.g., ethernet cards, USB to serial port device, home phone network device etc.
 
Old 05-24-2008, 06:33 PM   #10
proc
Member
 
Registered: Jul 2007
Location: /dev/urandom
Posts: 70

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Stealthy_C View Post
I only ran into a small problem with WPA. Before I noticed the wpa_gui app under "K->Internet" I had used Wireless Assistant to setup the WPA connection. But for some reason the connection still failed to connect.

Then I noticed in wpa_gui, that the Encryption was set to CCMP instead of TKIP. Works now

for wpa_gui to work you need to do the following:

edit /etc/wpa_supplicant.conf and add the following to the top of it.

Code:
update_config=1
restart wpa_gui it should ask you for the root password,
scan for an ap, double click on the ap you wish to connect to, now put in all the information you need click connect (this will also save the profile so you dont need to do this anymore for this ap anyways)

now open a terminal and as root type the following:

Code:
dhcpcd wlan0
this will connect you, I wish there was some way of passing info to wpa_supplicant to spawn a dhcpcd request on its own, but I can't see a way to do this yet.

Last edited by proc; 05-24-2008 at 06:34 PM.
 
Old 05-24-2008, 08:39 PM   #11
anon099
Member
 
Registered: Oct 2002
Posts: 188

Rep: Reputation: Disabled
Quote:
Well the card manufacturer doesn't "suck"
Yes it does. imho.

I just replaced my broadcom 4309 card with and intel 2200. works like a dream and no more stupid broadcom issues. wifi cards are pretty cheap. I would recommend switching to a vendor that actively supports linux. A new issue pops up with broadcom every day like the latest Asus issue in the kernel right now.
 
Old 05-24-2008, 10:06 PM   #12
fair_is_fair
Member
 
Registered: May 2005
Posts: 516

Rep: Reputation: 52
Broadcom does suck. Linux users would be best served to avoid them like the plague.

Don't hold your breath for Broadcom Linux drivers. There are a couple of internet petitions regarding linux support and I believe the one petition is a few years old.

Thank goodness for Ndiswrapper and the efforts of those who are reverse engineering linux drivers.

http://www.petitiononline.com/bcmdrive/petition.html
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
slackware 12 configure wpa wifi ajshevitz Linux - Newbie 5 02-21-2008 07:17 PM
Netgear MA111 with WPA under slackware 12. mr.gizm0 Linux - Wireless Networking 3 11-20-2007 10:11 PM
Slackware 12 - wireless with 2200bg and wpa Slackovado Slackware 7 07-22-2007 03:20 AM
near impossible to install slackware 10.2 on sony PCG 984L salviadud Linux - Laptop and Netbook 15 11-13-2005 12:47 AM
Connect to a WPA-encrypted router in Slackware garnser Linux - Wireless Networking 0 08-22-2004 02:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:39 PM.

Main Menu
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