LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-22-2009, 02:46 PM   #1
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Rep: Reputation: 53
wpa_supplicant-Cannot get an ip address


Hello everyone

First, I know it has been asked before and it is all over the web, but I have tried everything I can find on setting up wpa-psk in Slack 12.1 and I an running into errors. It seems to set up, but will not get an ip address. iwlist scan finds the router, but the wpa_supplicant and ifconfig command just won't work.

So, I was wondering if some kind sould would be willing to share their wpa_supplicant.conf file that is working for them (without anything confidential, of course) so that I can try using that model. I have been at it for hours with no result.

My Ubuntu and Fedora machines were no issue that they just came up with a gui asking for the passphrase. Slack is where I do a great deal of my work and need to get connected to my home network.

I have no experience with wpa_supplicant as I previously had an unsecured network. But, we've a new house and in this neighborhood I now need wireless security.

Can anyone help?

Thanks in advance

Bob

Last edited by BobNutfield; 04-22-2009 at 02:48 PM.
 
Old 04-22-2009, 03:06 PM   #2
Libu
Member
 
Registered: Oct 2003
Location: Chennai
Distribution: Slackware 12.1
Posts: 165

Rep: Reputation: 36
Quote:
# This line enables the use of wpa_cli which is used by rc.wireless
# if possible (to check for successful association)
ctrl_interface=/var/run/wpa_supplicant
# By default, only root (group 0) may use wpa_cli
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1

# WPA protected network, supply your own ESSID and WPAPSK here:
network={
ssid="myessid"
psk=9b7bd6261c49cf2e190aa8ce2d5de0e703c57f4910bb6489a88261ed6b02b3d2
}

You do know that you can generate the passkey using wpa_passphrase ?
Quote:
wpa_passphrase myessid passphrase
 
Old 04-22-2009, 03:37 PM   #3
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Original Poster
Rep: Reputation: 53
Hello, thanks for the response. Yes, I know that, and I have been using that. But, when I run:

Quote:
iwlist encryption
I get:

Quote:
wlan0 2 key sizes : 40, 104bits
4 keys available :
(1) off
(2) off
(3) off
(4) off
Current transmit key: (1)
The keys are "off" and that is where I am having my probelem. My wpa_supplicant file looks just like yours. I had no trouble connecting when I was using an unsecured network. Any suggestions about what I might be doing wrong?

Thanks
Bob
 
Old 04-22-2009, 03:40 PM   #4
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Maybe this will help understanding what happens under the hood: http://alien.slackbook.org/dokuwiki/...wpa_encryption

Eric
 
Old 04-22-2009, 03:41 PM   #5
Libu
Member
 
Registered: Oct 2003
Location: Chennai
Distribution: Slackware 12.1
Posts: 165

Rep: Reputation: 36
I assume you are connecting using the rc.inet1 script ? If so what do you have in your rc.inet1.conf ?

Plus you are sure that your card supports wpa encryption ?
 
Old 04-22-2009, 03:50 PM   #6
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Original Poster
Rep: Reputation: 53
Hi, yes the card support wpa. The laptop dual boots and Ubuntu handles it fine, but I normally use Slack on the laptop and Ubuntu and Fedora on the Desktop. The only thing in /rc.d/inet1 that deals with WPA is the line:

Quote:
WLAN_IWPRIV(4)="set
Quote:
AuthMode=WPAPSK
Which I have uncommented to make it active.

Hi Eric, thanks, and I have been through your wiki a couple times now. I have a script in /etc/rc.d/ called rc.wifi_wpa which I created from a tutorial I found on the web as I wasn't getting anywhere using the Slack docs. This script is call from rc.local at startup, but doesn't seem to do anything except mess with the dcop server in KDE. Not sure what is going on and why the keys remain off.

Bob

Last edited by BobNutfield; 04-22-2009 at 03:59 PM.
 
Old 04-22-2009, 04:58 PM   #7
Libu
Member
 
Registered: Oct 2003
Location: Chennai
Distribution: Slackware 12.1
Posts: 165

Rep: Reputation: 36
I have set these two variables in the conf as well

Quote:
WLAN_WPA[4]="wpa_supplicant"
WLAN_WPADRIVER[4]="wext"
 
Old 04-22-2009, 05:22 PM   #8
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Original Poster
Rep: Reputation: 53
Thanks, I have those entries as well. When I restart wlan0 with /etc/rc.d/rc.inet1 wlan0_restart, I get:

Quote:
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
That explains why I keep getting "keys off" when I run iwlist encryption. I guess I have a bad install of wpa_supplicant. I suppose I will have to uninstall and install it again.

Bob
 
Old 04-22-2009, 06:10 PM   #9
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Original Poster
Rep: Reputation: 53
Solved

Thanks for your replies and help. But it turned out that my wireless was not associated with the hardware address of the access point. As soon as I ran

Code:
iwlist wlan0 00:11:50:91:89:33
The wireless came up. And when I ran

Code:
wpa_cli status
it seemed to solve the wpa problems.

Not sure why, but enough tinkering usually fixes things in Slack. Haven't been defeated yet (with a lot of help here, of course..)

Thanks again

Bob
 
Old 04-23-2009, 03:00 AM   #10
Libu
Member
 
Registered: Oct 2003
Location: Chennai
Distribution: Slackware 12.1
Posts: 165

Rep: Reputation: 36
Good going dude. Glad you got it resolved.
 
  


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
Router gateway address being picked up as primary DNS address under SuSe Hubmasterflex Linux - Networking 13 10-18-2008 01:40 PM
wpa_supplicant appears to allow connection, but can't obtain IP address leontini Linux - Wireless Networking 2 10-14-2007 05:58 AM
Unable to get IP Address with ipw2200 and wpa_supplicant Crushing Belial Slackware 2 02-14-2007 10:15 AM
how to get ip address, broadcast address, mac address of a machine sumeshstar Programming 2 03-12-2005 04:33 AM
Address family error [wpa_supplicant for Linux in ARM platform] smshahriar Linux - Wireless Networking 0 01-04-2005 03:38 PM

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

All times are GMT -5. The time now is 04:10 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