You are not logged in.

#1 2008-03-22 05:35:34

Nathan P
Member
Registered: 2008-01-30
Posts: 93

WPA not working!

I've got my 4965 card working perfectly for open networks, but it refuses to connect with anything using WPA or WPA2.  I've tried Wicd, Wifi Radar (Didn't have WPA support, doh!) and Wireless Assistant.  I use alot of different networks so I don't want to just program one into the wpa_supplicant conf file or what have you.  Any help would be greatly appreciated!  Network connection freezes as soon as it tries to get an IP.

Thanks,
Nathan:(

Offline

#2 2008-03-22 06:36:04

jbromley
Member
From: Pasadena, CA
Registered: 2007-02-04
Posts: 268

Re: WPA not working!

Though you don't intend to use wpa_supplicant stand-alone in the long-term I recommend setting it up to test with wpa_supplicant/dhcpcd just to make sure that works before moving on to other tools. I've had the situation where wpa_supplicant+dhcpcd works fine, but other wireless software didn't due to bugs. I'll start you off. Here's a sample wpa_supplicant.conf for basic home WPA usage:

ctrl_interface=/var/run/wpa_supplicant
eapol_version=1
ap_scan=1
fast_reauth=1

network={
        ssid="YOUR_SSID"
        proto=WPA
        key_mgmt=WPA-PSK
        pairwise=TKIP
        group=TKIP
        #psk="YOUR_PASSPHRASE"
        psk=YOUR_HEX_WPA_PSK
        priority=9
}

Adjust YOUR_SSID as appropriate. Use either the WPA passphrase directly or generate the PSK with wpa_passphrase and comment/uncomment the appropriate lines. Here's a script to connect to your access point:

#!/bin/bash
killall wpa_supplicant dhcpcd
wpa_supplicant -B -c/etc/wpa_supplicant.conf -ieth1 -Dwext 
if [ $? != 0 ]; then
    echo "Error running wpa_supplicant!"
    exit 1
fi
dhcpcd eth1

Replace eth1 with your network interface. If this works, then at least you know your hardware is working and you can investigate what problem your software is having. If this doesn't work, then no software will work - you are having (probably configuration) troubles with your wireless card or possible your access point and possible hardware config troubles with your wireless.

So you know, it's fairly easy to set up netcfg2 and wpa_supplicant to be able to connect to multiple networks. A little scripting can even get you something to make the wpa_supplicant templates, fill them, and append them to your wpa_supplicant config. Anyway, make sure that your setup is working with the basics first.

Good luck,
j

Last edited by jbromley (2008-03-22 06:36:58)

Offline

#3 2008-03-23 09:30:37

jason_f
Member
Registered: 2006-08-18
Posts: 78

Re: WPA not working!

I'm having the same problem with wpa and netcfg2 here. Everything was working fine before upgrading to netcfg. For some reason wpa_supplicant is not being spawned.  I've created multiple configuration files, edited directly from templates in the examples folder.  I even installed 'archassistant' and couldn't connect through that either.

After I invoke netcfg2, I see the wireless interface come up, access point is put in and associated, mac address shows up, then it dies.  wpa supplicant is never spawned.

Everything works no problem if I run wpa_supplicant manually.

any ideas?

Offline

#4 2008-03-23 09:34:10

INCSlayer
Member
From: Sweden
Registered: 2007-09-06
Posts: 296
Website

Re: WPA not working!

have you tried networkmanager it ties (i think) with wpa_supplicant and lets you select things it has several frontends for different desktops and i use it succefully with wpa2 on my 4965 card


dovie andi se tovya sagain

Offline

#5 2008-03-23 10:09:28

jason_f
Member
Registered: 2006-08-18
Posts: 78

Re: WPA not working!

Strange. I edited the script that brings up wpa and added some dumps to check if the routine was being called. It wasnt.  I decided to reboot, and for some reason, now it is.  Working great now...
Have you rebooted since installing netcfg?

Offline

#6 2008-03-24 21:58:15

Nathan P
Member
Registered: 2008-01-30
Posts: 93

Re: WPA not working!

Alright, what would I have to modify in that script to use WPA2-PSK?  This uses AES instead of TKIP.

Offline

#7 2008-03-24 22:16:11

Nathan P
Member
Registered: 2008-01-30
Posts: 93

Re: WPA not working!

tried setting it up as I thought it should be, got this

wpa_supplicant -B -c/etc/wpa_supplicant.conf -ieth1 -Dwext
Line 472: Invalid PSK '*************'.
Line 472: failed to parse psk '************'.
Line 478: unknown network field 'network'.
Line 491: failed to parse network block.
Line 575: unknown EAP method 'SIM'
You may need to add support for this EAP method during wpa_supplicant
build time configuration.
See README for more information.
Line 575: failed to parse eap 'SIM'.
Line 578: failed to parse network block.
Line 585: unknown EAP method 'PSK'
You may need to add support for this EAP method during wpa_supplicant
build time configuration.
See README for more information.
Line 585: failed to parse eap 'PSK'.
Line 589: failed to parse network block.
Line 621: unknown EAP method 'FAST'
You may need to add support for this EAP method during wpa_supplicant
build time configuration.
See README for more information.
Line 621: failed to parse eap 'FAST'.
Line 627: failed to parse network block.
Line 632: unknown EAP method 'FAST'
You may need to add support for this EAP method during wpa_supplicant
build time configuration.
See README for more information.
Line 632: failed to parse eap 'FAST'.
Line 638: failed to parse network block.
Failed to read or parse configuration '/etc/wpa_supplicant.conf'.
[root@Gabriel nathan]# if [ $? != 0 ]; then
>     echo "Error running wpa_supplicant!"
bash: !": event not found
>     exit 1
> fi
exit

Offline

#8 2008-03-24 22:48:29

Nathan P
Member
Registered: 2008-01-30
Posts: 93

Re: WPA not working!

So my wireless is working but I don't know how.  the output of that script is this:

[root@Gabriel nathan]# wpa_supplicant -B -c/etc/wpa_supplicant.conf -iwlan0 -Dwext
ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 4 value 0x0 - ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 5 value 0x1 - [root@Gabriel nathan]# if [ $? != 0 ]; then
>     echo "Error running wpa_supplicant!"
bash: !": event not found
>     exit 1
> fi
[root@Gabriel nathan]# dhcpcd wlan0

my config in wpa_supplicant.conf looks like this

ctrl_interface=/var/run/wpa_supplicant
eapol_version=1
ap_scan=1
fast_reauth=1

network={
        ssid="MYSSID"
              proto=WPA2
              scan_ssid=1
              key_mgmt=WPA-PSK
              pairwise=CCMP
              group=CCMP
              psk="MYSUPERSECRETPASSWORD"
              #psk=YOUR_HEX_WPA_PSK
              priority=9
}

Offline

#9 2008-03-24 22:49:14

Nathan P
Member
Registered: 2008-01-30
Posts: 93

Re: WPA not working!

It says there's an error running wpa_supplicant but I'm online...  I'm not quite understanding what's going on here but it's a step!

Offline

#10 2008-03-24 22:51:27

Nathan P
Member
Registered: 2008-01-30
Posts: 93

Re: WPA not working!

Oh yeah, I changed the script to this

#!/bin/bash
killall wpa_supplicant dhcpcd
wpa_supplicant -B -c/etc/wpa_supplicant.conf -iwlan0 -Dwext 
if [ $? != 0 ]; then
    echo "Error running wpa_supplicant!"
    exit 1
fi
dhcpcd wlan0

Offline

#11 2008-03-24 23:56:35

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: WPA not working!

For what it's worth guys, I set the encryption option to wpa-config instead of wpa, this tells netcfg2 to just call wpa_supplicant and let it do its job. I was a bit surprised honestly to see the option to put a PSK into the netcfg2 config files... Utterly redundant imho, although of course I do appreciate the efforts of the netcfg2 author smile.

[stijn@lysithea isos]$ cat /etc/network.d/intel 
CONNECTION="wireless"
INTERFACE="intel"
HOSTNAME="lysithea"

# AP authentication
SCAN="yes"
SECURITY="wpa-config"
WPA_CONF="/etc/wpa_supplicant.conf"
WPA_OPTS="-Dwext -B"
ESSID="BorrominiNet"

# IP address
IP="dhcp"
DHCP_TIMEOUT=10
Nathan P wrote:

I use alot of different networks so I don't want to just program one into the wpa_supplicant conf file or what have you.

I don't know why people think wpa_supplicant can only one network at the time, because it can handle multiple just fine smile. It will go down the list until it finds an AP to connect with.

I have like 3 or 4 networks in wpa_supplicant.conf and it does the job. No fancy GUI stuff needed tongue. Just start up your box (or restart your network) and it will pick up the AP if it has been configured for it.

Last edited by B (2008-03-25 00:09:01)


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#12 2008-03-25 00:54:06

Nathan P
Member
Registered: 2008-01-30
Posts: 93

Re: WPA not working!

what if the network isn't present when you start the computer?  And don't you still have to program in a bunch of different profiles????  Right now the only one in my .conf file is the one listed.  (I got rid of everything else to eliminate the possibility of errors)

Last edited by Nathan P (2008-03-25 00:55:19)

Offline

#13 2008-03-25 01:59:37

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: WPA not working!

Nice network if it isn't up when you start your box. Quite pointless imho. Be it wired or wireless, a network that is down cannot be connected to. Why fire up your box if you need the network before the network is running?

If you refer to the /etc/networkd.d profiles, I only have one (for my wlan card, since I only use my wlan most of the time and the wired interface is pretty easy to bring up with DHCP anyway). Wpa_supplicant handles all the different APs.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#14 2008-03-25 02:24:06

Nathan P
Member
Registered: 2008-01-30
Posts: 93

Re: WPA not working!

Uhhh.  It's a laptop.  It moves with me wink  I move in and out of networks.  Sometimes it's gonna be a quick move and I don't want to completely power down the laptop when I move.

Offline

#15 2008-03-26 03:44:06

Nathan P
Member
Registered: 2008-01-30
Posts: 93

Re: WPA not working!

Any suggestions Jrombley?:)

Thanks!
Nathan

Offline

#16 2008-03-26 04:06:43

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: WPA not working!

Look at the documentation. netcfg2 can do what you want.

Offline

#17 2008-03-26 04:25:06

jbromley
Member
From: Pasadena, CA
Registered: 2007-02-04
Posts: 268

Re: WPA not working!

Nathan P wrote:

Any suggestions Jrombley?:)

With respect to being able to change networks I don't really have too many suggestions. I have a configuration in mind, but I have not had a chance to test it. Namely, I plan to use the configuration described in the Automatic Detection section of the Network Profiles wiki page with SCAN="YES" in each profile. In each profile with WPA security I will have a stanza in wpa_supplicant.conf so I can point the netcfg profiles to wpa_supplicant.conf. The wpa_supplicant.conf file is as shown previously in this thread, but with one stanza per desired network. The netcfg profile looks like:

CONNECTION="wireless"
INTERFACE=eth1
SCAN="yes"
ESSID="Obatala"
SECURITY="wpa-config"
WPA_CONF="/etc/wpa_supplicant.conf"
IP="dhcp"
TIMEOUT=20

This way, if the network is available on boot, it will be connected to. If not, you can then do

sudo netcfg-menu

in a terminal and choose the network you want.

I recognize this requires you to make a netcfg profile and a wpa_supplicant stanza for each network you want, but all this boils down to is copying an existing profile and changing the ESSID, and then copying and pasting a wpa_supplicant stanza and modifying the ESSID and passphrase/PSK. I know it's not a pretty GUI thing, but it can be done fast once your used to it. Also, since you only do each network config once, it shouldn't be long before you've got all of your networks covered. I don't know about you, but my wifi usage patterns mean that I would have 4 or 5 profiles set up to handle all my networking needs. Perhaps if you're constantly carrying your laptop to new places where you've never connected to the network before using this schema might be tiresome.

If you were ambitious you could just write a script that generates the netcfg profile and wpa_supplicant stanza from the ESSID and passphrase and then use this script for all your new-network-connection needs. If you were really ambitious you could knock out a GUI netcfg configurator with python or ruby or something. (I've been kicking around this last idea, what do you think about it?)

EDIT: Oops, I just realized ArchAssistant has a GUI front end to netcfg. Never mind that last bit about doing a GUI configurator then.

Regards,
j

Last edited by jbromley (2008-03-26 04:31:00)

Offline

#18 2008-03-26 05:12:34

Nathan P
Member
Registered: 2008-01-30
Posts: 93

Re: WPA not working!

Thanks!  I know nothing about Python or GTK or QT or Ruby so writing a frontend wouldn't be my specialty.  I'd love to learn but alas, I have college classes to take lol.  Thanks for your advice and I'll check out that ArchAssistant thing too.  Putting them into WPA_Supplicant isn't a big deal for me.  Do you have to change the netcfg2 essid every time too or is that just a generic one that changes when it reads the WPA_Supplicant info?

Offline

#19 2008-03-26 06:20:56

jbromley
Member
From: Pasadena, CA
Registered: 2007-02-04
Posts: 268

Re: WPA not working!

Nathan P wrote:

Do you have to change the netcfg2 essid every time too or is that just a generic one that changes when it reads the WPA_Supplicant info?

I think that it would be a good idea. If I recall correctly from the last time I looked at the netcfg code, wpa_supplicant only needs the ESSID from the profile only when used with certain wifi cards (ipw3945), but the netcfg scripts themselves do make use of ESSID in other places. The last time I tried SECURITY="wpa-config" without an ESSID in the netcfg profile, it didn't work - I got "network unavailable" or something like that, so it seems you need the SSID in both places.

Regards,
j

Offline

#20 2008-03-26 07:13:43

Nathan P
Member
Registered: 2008-01-30
Posts: 93

Re: WPA not working!

So do you make a netcfg setup for every network along with a wpa_supplicant config for every network then?

Offline

#21 2008-03-26 17:43:55

jbromley
Member
From: Pasadena, CA
Registered: 2007-02-04
Posts: 268

Re: WPA not working!

Nathan P wrote:

So do you make a netcfg setup for every network along with a wpa_supplicant config for every network then?

Yes, I believe this to be the case. It is what I have done and in my limited tests it works. Note that you can have all of your wpa_supplicant stanzas in the same wpa_supplicant.conf file. You do not need to have a different wpa_supplicant.conf file for each network.

Regards,
j

Offline

#22 2008-03-27 02:34:38

Nathan P
Member
Registered: 2008-01-30
Posts: 93

Re: WPA not working!

I've got netcfg2 sucessfully connecting to my home network! I was wondering if there was a way to make it automatically connect to open networks?  It seems to me that it'd be really easy to make it automatically put the ESSID etc in for an open network with dhcp.

Offline

#23 2008-03-27 10:07:59

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: WPA not working!

Did you look at the sample configuration files?


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#24 2008-03-27 19:08:06

Nathan P
Member
Registered: 2008-01-30
Posts: 93

Re: WPA not working!

yes, there were only ones for wep and WPA for wireless from what I could tell.

Offline

#25 2008-03-28 04:21:28

jbromley
Member
From: Pasadena, CA
Registered: 2007-02-04
Posts: 268

Re: WPA not working!

There isn't an explicit example, but if you use SECURITY=none and remove the WEP/WPA-related info from one of the examples you get what you need. Here is a sample I use to connect to an open network:

CONNECTION="wireless"
INTERFACE=eth1
IP=dhcp
DHCP_TIMEOUT=10
DHCP_OPTIONS=""
ESSID="dd-wrt"
SECURITY="none"
SCAN="YES"
TIMEOUT=15

I'm glad to hear that you have made progress.

Regards,
j

Offline

Board footer

Powered by FluxBB