LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   How do I set an ASCII key with iwconfig (http://www.linuxquestions.org/questions/slackware-14/how-do-i-set-an-ascii-key-with-iwconfig-4175447859/)

Yaakov Ben-Avraham 01-30-2013 10:31 AM

How do I set an ASCII key with iwconfig
 
In Slackware 14.0, according to

# man iwconfig

the following is supposed to set ascii key "blablabla"

# iwconfig wlan0 key s:blablabla

I get the following message instead

SET failed on device wlan0 : Invalid argument.

Am I doing something wrong, or is this a bug?

ChrisAbela 02-01-2013 02:18 AM

According to http://superuser.com/questions/42460...lays-in-ubuntu

You need to satisfy one of these conditions:

ascii string that's exactly 5 characters in length
ascii string that's exactly 13 characters in length

You may have tried this for academic reasons, but otherwise, wicd or network-manager are highly recommended.

H_TeXMeX_H 02-01-2013 04:40 AM

I also recommend quotes around the password:

Code:

iwconfig wlan0 key "s:blabl"

Yaakov Ben-Avraham 02-02-2013 09:53 PM

Partly Solved
 
If I set the password to exactly 13 characters in length, then

# iwconfig wlan0 key restricted "s:blablabla "

is accepted (note trailing blanks to make 13 character phrase)

however,

I am unable to connect to the network, and

# ifconfig wlan0

does NOT show an INET address line with an IP address
(although an INET6 line is shown)

How should I proceed from here?

willysr 02-02-2013 09:56 PM

you need to ask for IP Address using dhcpcd wlan0 or dhclient wlan0

Yaakov Ben-Avraham 02-03-2013 02:40 PM

It workd with Key Off
 
I got an IP address if I did the following

# ifconfig wlan0 up
# iwconfig wlan0 essid "open"
# iwconfig wlan0 key off
# dhclient wlan0
# ifconfig wlan0

I got no IP address if I did the following

# ifconfig wlan0 up
# iwconfig wlan0 essid "ciphered"
# iwconfig wlan0 key restricted "s:passphrase "
# dhclient wlan0
# ifconfig wlan0

Can you tell me what is wrong?

volkerdi 02-03-2013 03:32 PM

If you embed blanks in the passphrase by using them within quotes, they will be considered part of the passphrase and will no longer match a passphrase that doesn't have the blanks. I'd suggest looking at the information in your router to find the equivalent hex key and using that to connect instead.

Yaakov Ben-Avraham 02-03-2013 03:44 PM

How does Windows translate the passphrase into a hex key?
The passphrase I enter in my Router works with Windows.
The Router "manual" (on CD) doesn't give encoding.

p.s. I am using a LinkSys EA2700 Router. I have found that
some Routers, such as the "D-Link" DIR-601, refuse to
work with Linux, even when hard-wired...

volkerdi 02-03-2013 04:40 PM

Try this conversion form (no, it won't send your private key across the network):

http://jorisvr.nl/wpapsk.html

This will give you the hex key that you can connect with instead.

Also, I'm using a non-compliant length passphrase here with NetworkManager. The limitation you're running into is with iwconfig -- if you use a tool like wicd or NetworkManager you should be able to connect using your existing passphrase.

rabirk 02-04-2013 06:57 PM

Quote:

You may have tried this for academic reasons, but otherwise, wicd or network-manager are highly recommended.
I'm assuming this person tried using iwconfig and fussing about with the wpa_supplicant.conf file after reading AlienBOB's Wiki page on "Configuring your network in Slackware." I was intending to finish reading it, but let me know if it's out of date and I needn't bother. I can connect to my LAN wirelessly only when running KDE. For some reason my system doesn't connect when I boot into the CLI. I'm guessing I messed up one of the files referenced in the Wiki.


All times are GMT -5. The time now is 07:17 AM.