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 03-20-2006, 07:22 PM   #1
GrayGhost
LQ Newbie
 
Registered: Jul 2003
Location: State of confusion (Wisconsin)
Distribution: Slackware 10.2 and Current
Posts: 29

Rep: Reputation: 15
wpa_supplicant


I finally got my wireless network working. Compaq R4012US laptop using ndiswrapper and my windows driver. Everything works fine if I don't use any encryption on my AP. I would really like to get wpa set up but so far no joy. I've installed the wpa_supplicant-0.4.7 package from AlienBob and setup my /etc/wpa_supplicant.conf as follows

# See /usr/doc/wpa_supplicant-0.4.8/wpa_supplicant.conf.sample
# for many more options that you can use in this file.

# 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={
scan_ssid=0
ssid="rncWlan"
proto=WPA
key_mgmt=WPA-PSK
pairwise=TKIP
group=TKIP
psk=mysecretpsk
}

# Plaintext connection (no WPA, no IEEE 802.1X),
# nice for hotel/airport types of WiFi network.
# You'll need a recent version of wireless-tools for this!
network={
ssid="any"
key_mgmt=NONE
priority=2
}

I have my AP set to broadcast my SSID.Any ideas on what I need to do to get wpa working? any help is greatly appreciated.
Thanks in advance,
GrayGhost
 
Old 03-21-2006, 02:28 AM   #2
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
Assuming that you're running Slackware 10.2?
You will have to add some lines to /etc/rc.d/rc.inet1.conf for WPA; now, if the section there for your wireless card would look like this:

Code:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]=""
you would have to add two WPA related lines like this:
Code:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]=""
WLAN_WPA[0]="wpa_supplicant"
WLAN_WPADRIVER[0]="ndiswrapper"
Same, in case you have setup a fixed IP address of course.

Eric
 
Old 03-21-2006, 07:14 AM   #3
GrayGhost
LQ Newbie
 
Registered: Jul 2003
Location: State of confusion (Wisconsin)
Distribution: Slackware 10.2 and Current
Posts: 29

Original Poster
Rep: Reputation: 15
Thanks for the reply Eric,
Sorry I forgot to post that I am running Slack 10.2 on this machine. I had changed /etc/rc.d/rcinet1.conf like this.....

## Example config information for wlan0. Uncomment the lines you need and fill
## in your info. (You may not need all of these for your wireless network)
IFNAME[4]="wlan0"
#IPADDR[4]=""
#NETMASK[4]=""
USE_DHCP[4]="yes"
#DHCP_HOSTNAME[4]=""
#DHCP_KEEPRESOLV[4]="yes"
#DHCP_KEEPNTP[4]=""
#DHCP_KEEPGW[4]=""
#DHCP_IPADDR[4]=""
WLAN_ESSID[4]=rncWlan
#WLAN_MODE[4]=Managed
##WLAN_RATE[4]="54M auto"
WLAN_CHANNEL[4]="auto"
##WLAN_KEY[4]=""
WLAN_IWPRIV[4]="AuthMode=WPAPSK EncrypType=TKIP
WPAPSK="MYSECRETKEY"
TxRate=0"
WLAN_WPA[4]="wpa_supplicant"
WLAN_WPADRIVER[4]="ndiswrapper"

Wireless works great w/o encryption but I don't really want to run my AP open w/o security and I see others have got wpa working with Slack. Should this .conf work?

Thanks,
Rick
 
Old 03-21-2006, 07:29 AM   #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
Quote:
Originally Posted by GrayGhost
Thanks for the reply Eric,
Sorry I forgot to post that I am running Slack 10.2 on this machine. I had changed /etc/rc.d/rcinet1.conf like this.....

## Example config information for wlan0. Uncomment the lines you need and fill
## in your info. (You may not need all of these for your wireless network)
IFNAME[4]="wlan0"
#IPADDR[4]=""
#NETMASK[4]=""
USE_DHCP[4]="yes"
#DHCP_HOSTNAME[4]=""
#DHCP_KEEPRESOLV[4]="yes"
#DHCP_KEEPNTP[4]=""
#DHCP_KEEPGW[4]=""
#DHCP_IPADDR[4]=""
WLAN_ESSID[4]=rncWlan
#WLAN_MODE[4]=Managed
##WLAN_RATE[4]="54M auto"
WLAN_CHANNEL[4]="auto"
##WLAN_KEY[4]=""
WLAN_IWPRIV[4]="AuthMode=WPAPSK EncrypType=TKIP
WPAPSK="MYSECRETKEY"
TxRate=0"
WLAN_WPA[4]="wpa_supplicant"
WLAN_WPADRIVER[4]="ndiswrapper"

Wireless works great w/o encryption but I don't really want to run my AP open w/o security and I see others have got wpa working with Slack. Should this .conf work?

Thanks,
Rick
This should be enough:
Code:
IFNAME[4]="wlan0"
IPADDR[4]=""
NETMASK[4]=""
USE_DHCP[4]="yes"
WLAN_ESSID[4]=rncWlan
WLAN_CHANNEL[4]="auto"
WLAN_WPA[4]="wpa_supplicant"
WLAN_WPADRIVER[4]="ndiswrapper"
Eric
 
Old 03-21-2006, 07:46 PM   #5
GrayGhost
LQ Newbie
 
Registered: Jul 2003
Location: State of confusion (Wisconsin)
Distribution: Slackware 10.2 and Current
Posts: 29

Original Poster
Rep: Reputation: 15
I changed /etc/rc.d/rc.inet1.conf to :
IFNAME[4]="wlan0"
IPADDR[4]=""
NETMASK[4]=""
USE_DHCP[4]="yes"
WLAN_ESSID[4]=rncWlan
WLAN_CHANNEL[4]="auto"
WLAN_WPA[4]="wpa_supplicant"
WLAN_WPADRIVER[4]="ndiswrapper"

but it still didn't work.So i tried calling wpa_supplicant from the cli like this
root@cosmo:~# wpa_supplicant -Dndiswrapper -iwlan0 -c/etc/wpa_supplicant.conf

and this is the error i got:
Line 21: Invalid PSK 'OHpsdnugkyPNvOGWmoMSGqjd3vP3sHppPn1FfPDmhiUeuSAQWzWMqUH3ANc9k99'.
Line 21: failed to parse psk 'OHpsdnugkyPNvOGWmoMSGqjd3vP3sHppPn1FfPDmhiUeuSAQWzWMqUH3ANc9k99'.
Line 22: WPA-PSK accepted for key management, but no PSK configured.
Line 22: failed to parse network block.
Failed to read configuration file '/etc/wpa_supplicant.conf'.

That is the same PSK that is on the Access point.
I then tried calling /etc/rc.d/rc.inet1 from the cli and this is the message i received:
root@cosmo:~# /etc/rc.d/rc.inet1
dhcpcd: MAC address = 00:0f:b0:6e:6f:49
/etc/rc.d/rc.inet1: wlan0 is 'Broadcom'
Error for wireless request "Set Frequency" (8B04) :
SET failed on device wlan0 ; Invalid argument.
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
dhcpcd: MAC address = 00:90:4b:a5:a8:92

the first MAC dhcpc shows is for eth0 (00:0f:b0:6e:6f:49) the last one is wlan0 (00:90:4b:a5:a8:92).

Any other ideas?

Thanks,
Rick
 
Old 03-22-2006, 08:15 AM   #6
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
Quote:
Originally Posted by GrayGhost
I changed /etc/rc.d/rc.inet1.conf to :

root@cosmo:~# wpa_supplicant -Dndiswrapper -iwlan0 -c/etc/wpa_supplicant.conf

and this is the error i got:
Line 21: Invalid PSK 'OHpsdnugkyPNvOGWmoMSGqjd3vP3sHppPn1FfPDmhiUeuSAQWzWMqUH3ANc9k99'.
Line 21: failed to parse psk 'OHpsdnugkyPNvOGWmoMSGqjd3vP3sHppPn1FfPDmhiUeuSAQWzWMqUH3ANc9k99'.
Line 22: WPA-PSK accepted for key management, but no PSK configured.
Line 22: failed to parse network block.
Failed to read configuration file '/etc/wpa_supplicant.conf'.

That is the same PSK that is on the Access point.
That is a PSK of 63 characters, one less than it should be. Maybe you copied/pasted an incomplete key?

Eric
 
Old 03-22-2006, 07:25 PM   #7
GrayGhost
LQ Newbie
 
Registered: Jul 2003
Location: State of confusion (Wisconsin)
Distribution: Slackware 10.2 and Current
Posts: 29

Original Poster
Rep: Reputation: 15
YaaHooo it works !!!!!!!!!!

No I didn't copy and paste an incomplete key. I didn't realize it had to be 64 characters. On the Windows side it worked with only 63 characters but after I set my key in /etc/wpa_supplicant.conf to 64 characters it picked up my access point w/o trouble.
Thanks so much for the ndiswrapper and wpa_supplicant packages and Thanks for all the help Eric. I really appreciate it.


Rick

Last edited by GrayGhost; 03-22-2006 at 10:00 PM.
 
Old 03-22-2006, 10:14 PM   #8
chrisortiz
Member
 
Registered: Nov 2005
Distribution: Slackware, and of course the super delux uber knoppix universal live recovery cd
Posts: 429

Rep: Reputation: 30
actually it shouldn't matter how many characters are in the key. mine only uses about 12 characters. I'm also using tkip
 
Old 09-10-2006, 04:19 AM   #9
dulait
LQ Newbie
 
Registered: Apr 2005
Location: Zurich, Switzerland
Distribution: Slackware
Posts: 5

Rep: Reputation: 0
Quote:
root@cosmo:~# wpa_supplicant -Dndiswrapper -iwlan0 -c/etc/wpa_supplicant.conf

and this is the error i got:
Line 21: Invalid PSK 'OHpsdnugkyPNvOGWmoMSGqjd3vP3sHppPn1FfPDmhiUeuSAQWzWMqUH3ANc9k99'.
Line 21: failed to parse psk 'OHpsdnugkyPNvOGWmoMSGqjd3vP3sHppPn1FfPDmhiUeuSAQWzWMqUH3ANc9k99'.
Line 22: WPA-PSK accepted for key management, but no PSK configured.
Line 22: failed to parse network block.
Failed to read configuration file '/etc/wpa_supplicant.conf'.

That is the same PSK that is on the Access point.
Same problem here. If the PSK in the wpa_supplicant.conf has less then 64 characters the error message above occurs, with exactly 64 it is ok. But I can't use 64 characters because my Access-Point accepts only 8 - 63 characters as PSK.

How can I solve this?
 
Old 09-10-2006, 05:19 AM   #10
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
Quote:
But I can't use 64 characters because my Access-Point accepts only 8 - 63 characters as PSK
If that is true, perhaps the Access Point wants the key entered as a passphrase i.e. a string of ASCII characters from which the 64 HEX character key is calculated.

To get from a passphrase to a key, you should use the wpa_passphrase command. Wpa_passphrase outputs a "network" block that you can use in /wtc/wpa_supplicant.conf directly, like so:
Code:
# wpa_passphrase MY_ESSID donttellanyone
network={
        ssid="MY_ESSID"
        #psk="donttellanyone"
        psk=3fb4d5fbc4a74339fc10731aa9413393c87fe5350013ba17229468736fe3da92
}
Then configure the Accesspoint with the passphrase.

Eric
 
Old 01-08-2007, 02:23 PM   #11
vdemuth
Member
 
Registered: Oct 2003
Location: West Midlands, UK
Distribution: Slackware 14 (Server),OpenSuse 13.2 (Laptop & Desktop),, OpenSuse 13.2 on the wifes lappy
Posts: 781

Rep: Reputation: 98
Have done the same as here, but before going to WPA, i am trying with my current WEP network.
WPA_SUPPLICANT works well with an open network, but when using WEP, iwconfig always shows this:-

wlan0 IEEE 802.11g ESSID:"adanddad" Nickname:"captainpugwash"
Mode:Managed Frequency:2.452 GHz Access Point: 00:11:50:A2:25:83
Bit Rate=48 Mb/s Tx-Power:14 dBm
RTS thr=2347 B Fragment thr=2346 B
Encryption keyff
Power Managementff
Link Quality:70/100 Signal level:-51 dBm Noise level:-96 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

and with WPA_SUPPLICANT disabled, it shows this:-

wlan0 IEEE 802.11g ESSID:"adanddad" Nickname:"captainpugwash"
Mode:Managed Frequency:2.452 GHz Access Point: 00:11:50:A2:25:83
Bit Rate=48 Mb/s Tx-Power:14 dBm
RTS thr=2347 B Fragment thr=2346 B
Encryption key:My WEP key Security mode:restricted
Power Managementff
Link Quality:68/100 Signal level:-52 dBm Noise level:-96 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

Any one any ideas?
 
  


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
wpa_supplicant addisonzinser Slackware 0 02-04-2006 12:12 AM
wpa_supplicant hosler Slackware 7 01-25-2006 04:48 PM
need help with wpa_supplicant slinky2004 Linux - Software 7 12-30-2005 07:07 PM
wpa_supplicant (AGAIN) gbergeson Linux - Laptop and Netbook 10 08-03-2005 08:28 AM
WPA_Supplicant Fraudulent Linux - Wireless Networking 0 10-04-2004 07:07 AM

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

All times are GMT -5. The time now is 06:43 AM.

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