# wpa_supplicant hangs after starting

## chrisduck

Sorry to add to the wirless posts. I've searched very hard for a solution.

My problem is that when I run /etc/init.d/net.ath0, wpa_supplicant starts with a green "[ok]", but then nothing else happens and the operation "times out" without establishing a connection.

-I'm trying to connect to an unencrypted network that is broadcast from my school

-I''ve got an AR500IX, which lspci shows as an AR5211

-I've emerged madwifi-drivers and madwifi-tools

-I've configured autoloading for ath_pci, ath_hal, and wlan

-I've emerged wpa_supplicant 0.3.8 and am using baselayout 1.11.12-r4

-iwconfig shows that ath0 exists

/etc/init.d/wpa_supplicant.conf

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=root

eapol_version=1

ap_scan=2

fast_reauth=1

network={

        scan_ssid=1

        ssid="myssid"

#        ssid="Network"

        key_mgmt=NONE

#       pairwise=NONE

        priority=1

}

```

/etc/conf.d/net

```

iface_eth0="dhcp"

iface_ath0="dhcp"

modules=( "!iwconfig" "wpa_supplicant" )

wpa_supplicant_ath0="-Dmadwifi"

wpa_timeout_ath0=30

config_ath0=( "dhcp" )

```

Last edited by chrisduck on Fri Jul 15, 2005 9:19 pm; edited 1 time in total

----------

## chrisduck

bump. I've been editing my net and wpa_supplicant.conf all day. This seems like it should be so easy...

----------

## chrisduck

Bump again!!  Please someone help!

----------

## mspiegle

if you kill off/stop any wpa_supplicant processes that are currently running, then do iwconfig ath0 essid, then dhcpcd ath0 - does it work?

----------

## chrisduck

mspiegle,

thanks giving me some help.

```

# iwconfig ath0 essid

Error for wireless request "Set ESSID" (8B1A) :

       too few arguments.

```

----------

## chrisduck

god I'm such an idiot.

This time I wrote the full line as needed

iwconfig ath0 essid duckwork

dhcpcd ath0

NOW I HAVE WIRELESS!!!!  YAYAYAYAYAYAYAYAYAYAYAY

ok,...I'm just a little too happy now. THANKS!

****edit

awww man. I just rebooted my computer and now I can'tget the wireless card running again.

when I run "dhcpcd ath0" the process just hangs for a long time before returning me to the cammand prompt without result.

----------

## Codo

chrisduck:

  Stick to wpa_supplicant.  Make sure you are not using iwconfig FOR ANYTHING.

do the following:

```
1.- rc-update del net.ath0 default     <--- We'll put it back when things work.

reboot.

wpa_supplicant -Datheros -dd    <-- You know what i mean, put the right things there....
```

Once you see it associating, do

```
dhcpcd ath0
```

Once you know wpa_supplicant is able to associate, get latest baselayout..... (ACCEPT_KEYWORDS) and put the following line on /etc/conf.d/net

modules=("!iwconfig wpa_supplicant")

Let us know if that worked...

----------

## UberLord

 *Codo wrote:*   

> 
> 
> Once you know wpa_supplicant is able to associate, get latest baselayout..... (ACCEPT_KEYWORDS) and put the following line on 
> 
> 

 

I would use stable myself if he's having this issue, but hey

 *Quote:*   

> 
> 
> /etc/conf.d/net
> 
> modules=("!iwconfig wpa_supplicant")
> ...

 

That will not work .... as expected

```
modules=("!iwconfig" "wpa_supplicant")
```

Will work as expected. If your code works, it may not in the future ...

----------

## chrisduck

thanks for your replies! I can't believe that the author of the gentoo wireless wiki is personally looking at my problem!

I issued this command!

```

wpa_supplicant -c /etc/wpa_supplicant.conf -D madwifi -i ath0 -dd
```

 A looping process begins, where wpa_supplicant seems unable to connect with any APs.

```

Setting scan request: 5 sec 0 usec

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

Starting AP scan (broadcast SSID)

Wireless event: cmd=0x8b1a len=12

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

Wireless event: cmd=0x8b19 len=12

Received 997 bytes of scan results (5 BSSes)

Scan results: 5

Selecting BSS from priority group 0

0: 00:e0:98:d6:0b:e1 ssid='04B412646099' wpa_ie_len=0 rsn_ie_len=0

   skip - no WPA/RSN IE

1: 00:e0:98:f1:35:e0 ssid='05B404078509' wpa_ie_len=0 rsn_ie_len=0

   skip - no WPA/RSN IE

2: 00:e0:98:da:d2:d2 ssid='04B412739203' wpa_ie_len=0 rsn_ie_len=0

   skip - no WPA/RSN IE

3: 00:05:5d:ec:39:ee ssid='default' wpa_ie_len=0 rsn_ie_len=0

   skip - no WPA/RSN IE

4: 00:e0:98:f1:3d:2a ssid='05B404138848' wpa_ie_len=0 rsn_ie_len=0

   skip - no WPA/RSN IE

No suitable AP found.

```

 There are about 6 different APs being broadcast around here (including my school's). Maybe my wireless card's full potential is not being used for some reason? I had it working there for a while during my last post though, so it must work somehow...

----------

## Codo

 *chrisduck wrote:*   

> thanks for your replies! I can't believe that the author of the gentoo wireless wiki is personally looking at my problem!
> 
> I issued this command!
> 
> ```
> ...

 

Do NOT leave spaces on the command args to wpa_supplicant

do

```
wpa_supplicant -c/etc/wpa_supplicant.conf -Dmadwifi -iath0 -dd
```

 (That's what I do).  Look after your config file.  wpa_supplicant is OK.

And, from the post, wpa_supplicant is finding your APs, but it doesn't have a suitable config for them..

 :Embarassed:  sorry UberLord, (I was at work, doing Windoe$...)

----------

## chrisduck

I am now issuing the command that you gave me.

It is good to know that the APs are being found. The only thing wrong is my wpa_supplicant.conf?

I've been writing and re-writing that .conf file all day and I have not been able to get wpa_supplicant to latch onto an AP.

----------

## JFarmer

Using search is a great tool as I found this thread that led me to getting my wireless working . I had the same probs as Chrisduck did . Codo ! cudos to you my friend .  :Very Happy: 

----------

