LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 05-03-2010, 10:01 AM   #1
dpp777
Member
 
Registered: May 2004
Location: Austin, Tx
Distribution: RHEL / Slackware
Posts: 33

Rep: Reputation: 15
Connect to WPA wireless network


Hello! I recently installed slackware 13 on a dell latitude D620, and am having some issues connect to a wireless network with WPA security. The wireless seems to work ok, b/c when connecting to a WEP network it works just fine. Here's what I've tried thus far:
(this is what works for wep)
ifconfig wlan0 up
iwconfig wlan0 essid MyNetwork key MyKey
dhclient

However, the iwconfig command blows an error: Error for wireless request "Set Encode" set failed on device wlan0 ; invalid argument.

I've also tried editing /etc/wpa_supplicant.conf,
When I run the /etc/rc.d/rc.inet1 ath0 I get a sloew of IFNAME, ipaddr[0] netmaks[0] use_dhscp[0], dhcp_hostname[0] command not found (this is from: http://alien.slackbook.org/dokuwiki/...wpa_encryption

I really have no idea as to what to do next, not finding much love from google right now. Any suggestions are greatly appreciated!!! thanks!!
 
Old 05-03-2010, 12:31 PM   #2
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
Ah - I just figured this out, a few days ago.

You have to use wpa_supplicant. Edit your /etc/wpa_supplicant.conf file (there's an example that is already mostly filled-in) and fill in your network's ESSID and WPA key, then add a line similar to the one as follows, to /etc/rc.d/rc.local to have it configure your wlan0 interface on boot.
Code:
--/etc/rc.d/rc.local---------
...
...
echo -n "--Starting wpa_supplicant: "
wpa_supplicant -Dwext -c/etc/wpa_supplicant.conf -iwlan0 -B
echo "DONE"
Once you log in, you can fetch an IP address just by running "dhclient wlan0" either as root, or if you have it set up, through sudo.

I left the "dhclient wlan0" out of /etc/rc.d/rc.local in the event where I'm traveling, and I don't want my system to hang up looking for an IP while it's booting.
 
Old 05-03-2010, 01:23 PM   #3
dpp777
Member
 
Registered: May 2004
Location: Austin, Tx
Distribution: RHEL / Slackware
Posts: 33

Original Poster
Rep: Reputation: 15
Thanks for the reply! Still no luck, i'm wondering if maybe this network is set up goofy, here's how I set it up:
sudo pkill wpa_supplicant
sudo pkill dhcpcd
sudo iwconfig wlan0 essid MyNetwork
sudo ifconfig wlan0 up
sudo wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf
sudo dhclient wlan0

My wpa_supplicant.conf looks like this:
ctrl_interface=/var/run/wpa_supplicant

network {
ssid="MyNetwork"
#psk="MyKey"
psk=11111111111111111111111111111111111111111111111111111111111111111
}

I have the plain text key for the network, so I ran the wpa_passphrase MyNetwork MyKey to get the value that plugs into psk.

All seems to go well until running the dhclient (have also tried dhcpcd). Here's what comes back:
Listening On LPF/wlan0/...
Sending on LPF/wlan0/
sending on Socket/fallback
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 20
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 16
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
No DHCPOFFERS received
Trying to recorded lease 192.168.2.104
PING 192.168.2.1 1 packets transmitted 0 recieved.
No working leases in persistent database - sleeping

Any ideas? Networking is very far from my strong suit....

Thanks for the assistance!!
 
Old 05-03-2010, 02:27 PM   #4
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,769
Blog Entries: 1

Rep: Reputation: 410Reputation: 410Reputation: 410Reputation: 410Reputation: 410
If you haven't already, install wicd, which you'll find in the extra directory of your Slackware installation disk. It is VERY easy to use and manages connections well. It has both GUI and console interfaces that allow you to configure your network settings.


Also, if you want to stick with command line, I've had much better luck with dhcpcd than I ever have with dhclient.
 
Old 05-03-2010, 04:16 PM   #5
dpp777
Member
 
Registered: May 2004
Location: Austin, Tx
Distribution: RHEL / Slackware
Posts: 33

Original Poster
Rep: Reputation: 15
I'm going to have dig out my slack discs then and find that wicd and give that a try...

I did try sudo wpa_supplicant -dd -Dwext -i wlan0 -c /etc/wpa_supplicant.conf
getting the extra debug info...
I keep getting skip - SSID mismatch. That strikes me as odd as I know the ssid I entered is correct (works on the windows, box), and I do know that the ssid is not broadcasted, does that change the game a bit? I would assume no, but then again, I'm just guessing and doing some trial and error here.

Thanks for all the help!!
 
Old 05-03-2010, 05:46 PM   #6
nimnull22
Senior Member
 
Registered: Jul 2009
Distribution: OpenSuse 11.1, Fedora 14, Ubuntu 12.04/12.10, FreeBSD 9.0
Posts: 1,571

Rep: Reputation: 92
Please do:
sudo pkill wpa_supplicant
sudo pkill dhcpcd
sudo ifconfig wlan0 down
sudo ifconfig wlan0 address 192.168.2.50 up
sudo iwlist wlan0 scan

Please check in the output of the last command your AP details. Especially, an encryption type.
 
Old 05-05-2010, 04:14 PM   #7
dpp777
Member
 
Registered: May 2004
Location: Austin, Tx
Distribution: RHEL / Slackware
Posts: 33

Original Poster
Rep: Reputation: 15
Thank you for all the assistance! I finally got it to connect! The issue was the configuration of the wpa_supplicant.conf file. For documentation sake here's how I got it to work for me:
Set up wpa_supplicant.conf to look like this:
ctrl_interface=/var/run/wpa_supplicant

network = {
ssid="myNetwork"
scan_ssid=1
proto=WPA
key_mgmt=WPA-PSK
psk=SECRETKEY
}

I then ran wpa_supplicant -B -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
Next dhcpcd wlan0

Then all was well.

In the wpa_supplicant command switch -B to -dd for verbose debugging.

Hopefully that will help someone. Again, thanks to everyone for their assistance!
 
Old 04-08-2011, 07:44 PM   #8
SlowLearner
LQ Newbie
 
Registered: Dec 2002
Location: Florida
Distribution: Slackware 13.1
Posts: 28
Blog Entries: 1

Rep: Reputation: 1
Wink Had similiar issues - documented solution

Perhaps this might help someone else one day.

Quote:
If you haven't already, install wicd, which you'll find in the extra directory of your Slackware installation disk. It is VERY easy to use and manages connections well. It has both GUI and console interfaces that allow you to configure your network settings.
You will very often find this advice on LQ forum and usually seems to work well for MOST people. I configured something WRONG the first time I ran wicd. Once wicd is installed and run once with a wrong parameter I found it very difficult to get it to edit its original parameters or to relinquish control. I found advice on this forum to remove all instances of wicd and try again.. HOWEVER since I (like many slackware users) am choosing to use slackware to learn the command line control, I took it as an opportunity to greatly improve my understanding of the wireless interface setup. Without relying on a stubborn and persistent GUI interface like wicd.

I have found that AlienBob offers hands down the best nitty-gritty slackware documentation to be found anywhere as well as ALOT of it. I wish i could $$DONATE$$ more to his efforts. Most readers of this thread probably should as well.

After several hours I did manage to properly configure my wireless setting using:

http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:network


One of my biggest stumbling blocks in the process was my critical mis-understanding of these statements from alienbob's dokuwiki:

Quote:
I think there is no good reason to want to keep using rc.wireless.conf. In fact, you can safely delete that entire file! But for those who do not want to say goodbye to it, we will keep support for it in the network configuration scripts.
Quote:
Please use /etc/rc.d/rc.inet1.conf as the single configuration file for all your network parameters (wired as well as wireless)
I read this to mean EVERYTHING required could be done from /etc/rc.d/rc.inet1.conf. I never even bothered to LOOK at rc.wireless.conf or wpa_supplicant.conf. THIS IS A MISTAKE!

Just as dpp777 was able to solve this thread after discovering:
Quote:
The issue was the configuration of the wpa_supplicant.conf file.
I discovered that the ONLY way I could get an IP address for my wireless nic was to edit the rc.wireless.conf file
I changed the
Quote:
*)
INFO="Any ESSID"
ESSID="any"
line to read

Quote:
to read ESSID = ZyXEL_### #the actual name of my dsl modem
Editing this line finally enabled me to connect.

Perhaps if I HAD deleted rc.wireless.conf I would not have to edit. I really don't know. I just know that I clearly misunderstood

Quote:
Please use /etc/rc.d/rc.inet1.conf as the single configuration file for all your network parameters (wired as well as wireless)
I hope helps prevent others from doing the same.

Last edited by SlowLearner; 04-15-2011 at 02:30 PM. Reason: grammar error
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Network manager unable to connect to unsecured wireless - WPA networks fine :S phyre-x Ubuntu 8 05-16-2011 10:11 AM
Wireless cannot connect to WPA encypted network under Fedora 9 bearraiser Linux - Wireless Networking 5 04-19-2010 09:10 AM
[SOLVED] Wireless WPA can't connect ripp3r Slackware 18 02-28-2010 01:24 PM
cannot connect to WPA network Genjix Linux - Networking 3 01-21-2010 01:57 PM
usb network adapter with ndiswrapper can't connect to wpa with wpa-supplicant AceofSpades19 Linux - Wireless Networking 8 03-30-2008 05:13 PM


All times are GMT -5. The time now is 04:01 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration