# Wpa_supplicant hangs after connecting

## austinramsay

Okay so im trying to use wpa_supplcant with my atheros 9285 (ath9k) and i dont understand whats going on. If i do "wpa_supplicant -iwlp8s0 -Dnl80211 -c/etc/wpa_supplicant/wpa_supplicant.conf" it will connect saying connection to: 1c:af:f7:d5:f5:09 completed. But then it just hangs there. I do ^C to get out and it says disconnected reason=3 locally_generated=1.

I know its connecting successfully because i set wlp8s0 to 192.168.0.101 and i can ping it on another laptop on the wifi. Why is it hanging like this if its connecting successfully?

My wpa_supplicant.conf:

ctrl_interface=/var/run/wpa_supplicant

network={

 ssid="dlink"

 key_MGMT=NONE

}

Any ideas? And also how do i set wpa_supplicant to run at startup?

----------

## mrbassie

RE: starting the service at boot, do you have 

```
#wpa_supplicant

modules_iwlp8s0="wpa_supplicant"

wpa_supplicant_iwlp8s0="-Dnl80211"
```

in /etc/conf.d/net?

This is in the wrong forum btw.

----------

## austinramsay

Yeah i have that. I found the problem i just needed to add -B to run it in the background. But how do i make it run at boot?

----------

## mrbassie

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=8

Read "Code Listing 2.8"

----------

## austinramsay

Im getting an error at boot but i cant view it with dmesg and i cant read it because it dissappears too fast. But after bootingi can do /etc/init.d/wpa_supplicant start and dhcpcd wlp8s0 and my connection is good. Net.wlp8s0 is added to rc. And my /etc/conf.d/net contains config_wlp8s0="dhcp"

----------

## mrbassie

 *austinramsay wrote:*   

> Im getting an error at boot but i cant view it with dmesg and i cant read it because it dissappears too fast. But after bootingi can do /etc/init.d/wpa_supplicant start and dhcpcd wlp8s0 and my connection is good. Net.wlp8s0 is added to rc. And my /etc/conf.d/net contains config_wlp8s0="dhcp"

 

edit /etc/rc.conf so that it says rc_logger="YES"

reboot, then:[/quote]

cat /var/log/rc.log

to view your error.

Again, this thread is in the wrong forum. ask a moderator to move it to "networking and security" or "installing gentoo" and you may get responses from someone more intuitive and knowledgeable than myself.

----------

## austinramsay

Its saying:

Successfully initialized wpa_supplicant

Wlp8s0: unsupported driver nl82011

Found out i misspelled nl82011 instead of nl80211

----------

## mrbassie

 *austinramsay wrote:*   

> 
> 
> Found out i misspelled nl82011 instead of nl80211

 

So does it work now?

----------

