# wpa_supplicant fail to connect

## MerrinX

Hey, I have a fresh install of gentoo, but fail to get my wireless up and running.

I do not have internet on my laptop, with gentoo installed so typing this from my desktop, so bear with me.

My /etc/conf.d/wpa_supplicant

```
wpa_supplicant_args="-B -M -c/etc/wpa_supplicant/wpa_supplicant.conf"
```

my /etc/wpa_supplicant/wpa_supplicant.conf

```

ctrl_interface=DIR=/var/run/wpa_supplicant

ctrl_interface_group=wheel

update_config=1

network={

              ssid="secret ssid"

              psk="secret psk"

              scan_ssid=1

              proto=RSN

              key_mgmt=WPA-PSK

              pairwise=TKIP

              priority=5

              id_str="gentoo"

}

```

my /etc/conf.d/net

```

dns_domain_lo="homenetwork"

modules="wpa_supplicant"

config_wlp2s0="dhcp"

```

when starting the wlp2s0 it initialize the wpa and everythign seem fine, inn the end it says net.wlp2s0 started, but is inactive.

wpa_cli status

```

selected interface 'p2p-dev-wlp2s0'

wpa-state=DISCONNECTED

```

when doing a dhcpcd -k

```
dhcpcd not running
```

Please any help i can get is much appreciated.

----------

## papas

did you start your net.wlp2s0 service? after that just run wpa_gui

my conf

```

modules_wlp5s0="wpa_supplicant"

config_wlp5s0="dhcp"

routes_wlp5s0="default via 192.168.2.1"

dns_servers_wlp5s0="192.168.2.1 8.8.8.8"

```

----------

## MerrinX

I did, my wlp2s0 starts at boot. But nothing happens, when I try restarting it, it says it is running and wpa_supplicant is starting but wlp2s0 is inactive.  After that is check my wpa_cli status, and is says its disconnected.

----------

## papas

I am taking the same message from my wlp5s0 (inactive) every time i am starting the service, but in my case the output of wpa_cli status is scanning.

----------

## NeddySeagoon

MerrinX,

Welcome to Gentoo.

We need the output of dmesg from your gentoo install.

Boot your Gentoo normally

Run 

```
dmesg > /dmesg.txt
```

 to save it to a file.

Put that file onto a pastebin site.

There are two methods. 

a) boot your install media and mount your gentoo at /mnt/gentoo. Do not chroot.

The file we need will be /mnt/gentoo/dmesg.txt

b) put the file onto a USB stick and pastebin it from elsewhere.

The inactive message does not always mean that the interface is not working. It can take several seconds to become ready.

Does 

```
ifconfig
```

show that the interface has an IP address?

What is it?

If you have an IPaddress what does the 

```
route
```

 command output?

What is the content of /etc/resolv.config ?

Don't copy type. Save things to files and post the file content.

dmesg is too big for a post. Use a pastebin.

----------

## MerrinX

Hey, thank you for the reply, I'm currently out driving, will comply later.

----------

## MerrinX

What is the content of /etc/resolv.config ?

```

# Generated by dhcpcd

# /etc/resolv.conf.head can replace this line

# /etc/resolv.conf.tail can replace this line

```

Route

```

Kernel IProuting table

Destination     Gateway     Gateway     Flags Metric Ref     Use Iface

```

ifconfig does not show a IP adress, it looks like a mac adress.

My dhcpcd i think is not running.

Regarding the dmesg, i have no way of getting it out there, however there are no errors, and all firmware is loaded.

Any help would be much appreciated

----------

## MerrinX

And last, my wpa_cli show connected to p2p-dev-wlp2s0 and not wlp2s0

Do not know what the different is?

----------

## MerrinX

Sorry for the spam here, but i got it working.

However, it was the wpa_cli that had the wrong interface, also my wpa_supplicant.conf was wrong.

Had to delete everything about network and then do the connection through the cli interface.

----------

