# wpa_supplicant: 'Failed to read configuration file...'

## nonhuman

I know there's a million posts about configuring wpa_supplicant, but after reading through a bunch of them I still can't get it to work.

I'm on an IBM X31 using the ipw2100 drivers. I can connect to unsecured networks just fine.

In my /etc/conf.d/net I have the following:

```

modules=( "wpa_supplicant" )

wpa_supplicant_eth1="-Dipw"

iface_eth0="dhcp"

iface_eth1="dhcp"

```

in my /etc/wpa_supplicant.conf I have:

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

network={

  ssid="myssid"

  proto=WPA

  key_mgmt=WPA-PSK

  pairwise=CCMP TKIP

  group=CCMP TKIP WEB104 WEP40

  psk="mypassphrase"

}

```

The wireless network I'm trying to connect to is protected with WPA-PSK using and ASCII passphrase. If I start net.eth1 it just sits there until DHCP times out.

If I try to use wpa_supplicant manually I get this:

```

> wpa_supplicant -i eth1 -c /etc/wpa_supplicant.conf

Failed to read configuration file '/etc/wpa_supplicant.conf'.

```

I assume there's some stupid thing that I'm forgetting, but I just can't figure out what. Can someone help me out?

----------

## nonhuman

Ok... Now I'm home and apparently can't connect to an unsecured network anymore. This blows.

----------

## Psiuyo

Any luck on resolving the issue?

I just started trying to set up wpa_supplicant, and am too running into the same error.  I've tried running wpa_supplicant in -dd mode, but the output is the same

```

wpa_supplicant -dd -iwlan0 -c/etc/wpa_supplicant.conf -Dndiswrapper

Failed to read configuration file '/etc/wpa_supplicant.conf'.
```

I can't even use the wpa_supplicant.conf.example, no extra output aside from the filename change.  I've tried all sorts of conf files, currently at

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

eapol_version=1

ap_scan=1

fast_reauth=1

network={

      ssid="Home"

      scan_ssid=1

      psk=very_secret_very_long_string

}

```

I've tried adding various lines and removing everything, but still receive the same error msg with no debug output.  What am I missing?

----------

## nonhuman

Nope still no luck for me. I've been out of town a lot the past few weeks and so haven't had much time to spend on this.

----------

## possumjc

I am having the same issue using wpa_supplicant. If I try to run wpa_supplicant manually I get the following:

```
 Failed to read configuration file '/etc/wpa_supplicant.conf'.
```

I ran wpa_supplicant via strace and it actually shows the file /etc/wpa_supplicant.conf being opened read only. I have fiddled with permissions on the conf file and nothing changes. Adding debugging to the wpa_supplicant command line produces no futher debugging output via stderr or syslog. I am stumped.

BTW.. I use ndsiwrapper and I can connect manually to AP's just fine. I have not tried to just manually connect to the AP at work which I am trying to configure to use WPA-PSK. Is there a way to do that using iwconfig?

----------

## possumjc

Ok. I have had some success. The first thing I tried was to install an older version of wpa_supplicant. The older version told me I had some errors in the config file! The lines in question were some that were out of the wpa_supplicant.conf.example. I removed the lines and my file now looks like this:

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

eapol_version=1

ap_scan=1

fast_reauth=1

network={

        ssid="AP NAME"

        key_mgmt=WPA-PSK

        psk=really long string

        priority=4

        }

```

The psk was obtained by running wpa_passphrase. I could not get it work with just the long ASCII string. wpa_passphrase seems to convert the ASCII to hex. There are also no quotes around the psk value. I still can't get the interface to come up on startup. It seems like wpa_supplicant is not starting even though I followed the gentoo Wireless Guide.  Hope that this helps some.

Joel

----------

## macavity

quick question to you guys:

You said you are using an IBM X31 with the ipw2100 driver?

I thought you needed the madwifi driver with Atheros chipsets.

What do you get when you run 'lspci' ?

----------

## LimeFrog

Your wpa_supplicant.conf file should be located in /etc/wpa_supplicant/wpa_supplicant.conf

----------

