LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   wpa_supplicant (http://www.linuxquestions.org/questions/slackware-14/wpa_supplicant-426749/)

GrayGhost 03-20-2006 08:22 PM

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

Alien Bob 03-21-2006 03:28 AM

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

GrayGhost 03-21-2006 08:14 AM

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

Alien Bob 03-21-2006 08:29 AM

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

GrayGhost 03-21-2006 08:46 PM

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

Alien Bob 03-22-2006 09:15 AM

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

GrayGhost 03-22-2006 08:25 PM

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

chrisortiz 03-22-2006 11:14 PM

actually it shouldn't matter how many characters are in the key. mine only uses about 12 characters. I'm also using tkip

dulait 09-10-2006 05:19 AM

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?

Alien Bob 09-10-2006 06:19 AM

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

vdemuth 01-08-2007 03:23 PM

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 key:off
Power Management:off
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 Management:off
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?


All times are GMT -5. The time now is 05:10 AM.