# [SOLVED] Can't connect to Wi-Fi using wpa_supplicant

## errror

I run /etc/init.d/net.wlan0 start and open wpa_cli.

I run scan and after a while it says CTRL-EVENT-NETWORK-NOT-FOUND. While scanning I can see my Wi-Fi LED light up.

My network controller is an Intel Corporation PRO/Wireless 5100 AGN and I'm using the iwlwifi driver.

I should point out connecting to ethernet works fine, but this is a laptop.

Thanks in advance for the help.Last edited by errror on Mon Jul 04, 2016 10:30 pm; edited 1 time in total

----------

## chithanh

What have you configured in /etc/conf.d/net for wlan0?

What is the output of "iw dev wlan0 scan"?

Is wifi blocked by rfkill?

----------

## errror

 *chithanh wrote:*   

> What have you configured in /etc/conf.d/net for wlan0?
> 
> What is the output of "iw dev wlan0 scan"?
> 
> Is wifi blocked by rfkill?

 

I didn't have iw but I installed it now, ran "iw dev wlan0 scan", and got this: http://pastebin.com/gwZLHDyv

My /etc/conf.d/net looks like this: http://pastebin.com/ATG0MTUU

dunno how to check rfkill

----------

## nictki

 *error wrote:*   

> dunno how to check rfkill

 

```
rfkill list
```

----------

## nictki

@errror

Are you running wpa_cli as a root?

----------

## chithanh

You will see the rfkill controls in subdirectories of /sys/class/rfkill/ (state needs to contain 1) or you can emerge rfkill for convenience as nictki suggested.

Your /etc/conf.d/net looks ok, maybe try the following:

```
# wpa_passphrase "yourssid" >> /etc/wpa_supplicant/wpa_supplicant.conf
```

Then enter your WPA-PSK (will be shown on terminal) and restart net.wlan0

If that works, your connection between wpa_cli and wpa_supplicant is somehow broken, maybe a dbus issue.

----------

## errror

 *nictki wrote:*   

> @errror
> 
> Are you running wpa_cli as a root?

 

Yep, I've been running it as root.

 *chithanh wrote:*   

> You will see the rfkill controls in subdirectories of /sys/class/rfkill/ (state needs to contain 1) or you can emerge rfkill for convenience as nictki suggested.
> 
> Your /etc/conf.d/net looks ok, maybe try the following:
> 
> ```
> ...

 

It worked like that, thanks m8!

----------

## chithanh

Sorry for bumping this old topic, but people seem to be directed here from various places on the Internet. Especially more recently when they report problems connecting to certain Wifi networks.

The most recent cause of connection problems affecting wpa_supplicant is that USE="tkip" now defaults to disabled. This is because WPA1/TKIP has been considered insecure for a while. Please switch the networks to WPA2/CCMP or better. If that is not an option and you still wish to connect to such insecure networks, you can enable the tkip USE flag for wpa_supplicant.

See this topic for more explanation.

----------

