Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux. |
Notices |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-03-2010, 10:01 AM
|
#1
|
Member
Registered: May 2004
Location: Austin, Tx
Distribution: RHEL / Slackware
Posts: 33
Rep:
|
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!!
|
|
|
05-03-2010, 12:31 PM
|
#2
|
Senior Member
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853
Rep:
|
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.
|
|
|
05-03-2010, 01:23 PM
|
#3
|
Member
Registered: May 2004
Location: Austin, Tx
Distribution: RHEL / Slackware
Posts: 33
Original Poster
Rep:
|
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!!
|
|
|
05-03-2010, 02:27 PM
|
#4
|
LQ Veteran
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
|
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.
|
|
|
05-03-2010, 04:16 PM
|
#5
|
Member
Registered: May 2004
Location: Austin, Tx
Distribution: RHEL / Slackware
Posts: 33
Original Poster
Rep:
|
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!!
|
|
|
05-03-2010, 05:46 PM
|
#6
|
Senior Member
Registered: Jul 2009
Distribution: OpenSuse 11.1, Fedora 14, Ubuntu 12.04/12.10, FreeBSD 9.0
Posts: 1,571
Rep:
|
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.
|
|
|
05-05-2010, 04:14 PM
|
#7
|
Member
Registered: May 2004
Location: Austin, Tx
Distribution: RHEL / Slackware
Posts: 33
Original Poster
Rep:
|
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!
|
|
|
04-08-2011, 07:44 PM
|
#8
|
Member
Registered: Dec 2002
Location: Florida
Distribution: Slackware 14.2
Posts: 57
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 07:35 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|