# [SOLVED] wpa_gui: Could not get status from wpa_supplicant

## dead_parrot

Hi,

I have a problem with access rights to wpa_supplicant (I guess). Wpa_gui run by a user gives message: Could not get status from wpa_supplicant and run by root works fine. 

my /etc/wpa_supplicant/wpa_supplicant.conf

```

ctrl_interface=DIR=/var/run/wpa_supplicant

ctrl_interface_group=wheel

update_config=1

```

The user is a member of the wheel group.

I have no idea what is wrong.Last edited by dead_parrot on Sun Dec 25, 2016 7:24 am; edited 1 time in total

----------

## khayyam

dead_parrot ... please try with:

```
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel

update_config=1
```

If that behaves similarly then post the output of

```
$ ls -ld /run/wpa_supplicant

$ wpa_cli status
```

best ... khay

----------

## dead_parrot

Hi khayyam,

Thanks for your reply. Unfortunately, this does not change anything.

The output for ls -ld /run/wpa_supplicant is:

```

drwxr-x--- 2 root root 60 12-18 10:13 /run/wpa_supplicant

```

and for wpa_cli status:

```

Failed to connect to non-global ctrl_ifname: (nil)  error: Permission denied

```

Best regards,

dp

----------

## khayyam

 *dead_parrot wrote:*   

> 
> 
> ```
> drwxr-x--- 2 root root 60 12-18 10:13 /run/wpa_supplicant
> ```
> ...

 

dead_parrot ... ok, that shows us that group isn't set to wheel. How are you starting wpa_supplicant?

```
# egrep -v '^(#|$)' /etc/conf.d/wpa_supplicant

# ps auxwww | grep [w]pa
```

best ... khay

----------

## dead_parrot

 *khayyam wrote:*   

>  How are you starting wpa_supplicant?
> 
> 

 

I understand that via dhcpcd.

egrep -v '^(#|$)' /etc/conf.d/wpa_supplicant  gives:

```

wpa_supplicant_args=""

```

and ps auxwww | grep [w]pa gives:

```

root      3187  0.0  0.0  29860  3240 ?        Ss   16:52   0:00 wpa_supplicant -B -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlp6s0

```

----------

## khayyam

 *dead_parrot wrote:*   

>  *khayyam wrote:*   How are you starting wpa_supplicant? 
> 
> I understand that via dhcpcd.

 

dead_parrot ... so you have '10-wpa_supplicant' in /lib/dhcpcd/dhcpcd-hooks? Try the following:

```
wpa_supplicant_args="-Dnl80211 -iwlp6s0 -qq"
```

```
# /etc/init.d/dhcpcd stop

# rm /lib/dhcpcd/dhcpcd-hooks/10-wpa_supplicant

# /etc/init.d/wpa_supplicant start

# /etc/init.d/dhcpcd start

# ls -l /run/wpa_supplicant
```

 *dead_parrot wrote:*   

> 
> 
> ```
> root      3187  0.0  0.0  29860  3240 ?        Ss   16:52   0:00 wpa_supplicant -B -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlp6s0
> ```
> ...

 

You should be seeing 'wpa_cli' running '/etc/wpa_supplicant/wpa_cli.sh' ... I assume dhcpcd doesn't start this (as 'net.*' would). That doesn't explain the fact that /run/wpa_supplicant is group 'wheel', it should be as this is defined in wpa_supplicant.conf ... that doesn't make sense to me, are you sure that there isn't a typo in the filename, or path? 

best ... khay

----------

## charles17

 *khayyam wrote:*   

> 
> 
> ```
> # /etc/init.d/dhcpcd stop
> 
> ...

 

@khay,

For running wpa_supplicant with dhcpcd one would need either the old 10-wpa_supplicant hook (and do not run wpa_supplicant as a service) or use CONFIG_MATCH_IFACE=yes.

----------

## khayyam

 *charles17 wrote:*   

> @khay, [f]or running wpa_supplicant with dhcpcd one would need either the old 10-wpa_supplicant hook (and do not run wpa_supplicant as a service) or use CONFIG_MATCH_IFACE=yes.

 

charles17 ... yes, but the above is simply a test to try and get some idea of why /run/wpa_supplicant (and socket) isn't 'root:wheel'. It should be, whether dhcpcd, or net.*, starts it, or if wpa_supplicant is run in isolation ... but from all accounts that isn't happening.

best ... khay

----------

## dead_parrot

 *khayyam wrote:*   

> 
> 
> dead_parrot ... so you have '10-wpa_supplicant' in /lib/dhcpcd/dhcpcd-hooks?
> 
> 

 

Correct.

I removed it, did what you wrote, and received;

```

* Starting WPA Supplicant Daemon ...

Failed to initialize control interface 'DIR=/var/run/wpa_supplicant'.

You may have another wpa_supplicant process already running or the file was

left by an unclean termination of wpa_supplicant in which case you will need

to manually remove this file before starting wpa_supplicant again.

nl80211: Failed to open /proc/sys/net/ipv4/conf/wlp6s0/drop_unicast_in_l2_multicast: No such file or directory

nl80211: Failed to set IPv4 unicast in multicast filter

nl80211: Failed to open /proc/sys/net/ipv4/conf/wlp6s0/drop_unicast_in_l2_multicast: No such file or directory

nl80211: Failed to set IPv4 unicast in multicast filter

 * start-stop-daemon: failed to start `/usr/sbin/wpa_supplicant'

 * Failed to start WPA Supplicant Daemon                                          [ !! ]

 * ERROR: wpa_supplicant failed to start

```

killing wpa_supplicnat process and starting it again i got from ls -l /run/wpa_supplicant/

```

srwxrwx--- 1 root root 0 12-19 21:55 wlp6s0

```

and

```

root      4317  0.0  0.0  29860  3608 ?        Ss   21:55   0:00 /usr/sbin/wpa_supplicant -Dnl80211 -iwlp6s0 -qq -B -c/etc/wpa_supplicant/wpa_supplicant.conf

```

----------

## khayyam

 *dead_parrot wrote:*   

> 
> 
> ```
> * Starting WPA Supplicant Daemon ...
> 
> ...

 

dead_parrot ... "killing" will not "manually remove this file" ...

```
# /etc/init.d/dhcpcd stop

# /etc/init.d/wpa_supplicant stop

# rm -f /lib/dhcpcd/dhcpcd-hooks/10-wpa_supplicant

# rm -fr /run/wpa_supplicant

# /etc/init.d/wpa_supplicant start

# /etc/init.d/dhcpcd start

# ls -ld /run/wpa_supplicant
```

best ... khay

----------

## dead_parrot

 *khayyam wrote:*   

> 
> 
> dead_parrot ... "killing" will not "manually remove this file" ...
> 
> 

 

 :Embarassed: 

the effect:

```

rwxr-x--- 2 root root 60 12-20 19:53 /run/wpa_supplicant

```

----------

## khayyam

 *dead_parrot wrote:*   

> 
> 
> ```
> rwxr-x--- 2 root root 60 12-20 19:53 /run/wpa_supplicant
> ```
> ...

 

dead_parrot ... no change, so what is /run?

```
# mount | egrep '(root|run)'
```

We should probably get more details of the contents of wpa_supplicant.conf:

```
# cat -vET /etc/wpa_supplicant/wpa_supplicant.conf
```

... and details about the wpa_supplicant package:

```
# emerge -pvq wpa_supplicant
```

Also, stop wpa_supplicant, change wpa_supplicant_args to the following, start wpa_supplicant, and pastebin the log.

```
wpa_supplicant_args="-Dnl80211 -dd -f /var/log/wpa_supplicant.log"
```

best ... khay

----------

## dead_parrot

Dear khayyam,

Thank you very much for your help and patience. You were right from the very beginning. The solution was to have /etc/wpa_supplicant/wpa_supplicant.conf as following

```

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel

update_config=1

```

instead of

```

ctrl_interface=DIR=/var/run/wpa_supplicant

ctrl_interface_group=wheel

update_config=1 

```

I did a mistake trying this solution putting GROUP=wheel in a separate line. Sorry and thanks again for your help.

----------

