Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

wpa_cli cannot connect to wpa_supplicant.

4,839 views
Skip to first unread message

unruh

unread,
May 8, 2013, 3:39:18 PM5/8/13
to

When I run wpa_cli status or wpa_cli -i wlan0 status, I get an error
which says
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory

wpa supplicant is running

root 1142 0.0 0.0 6064 3176 ? S May07 0:01 /usr/sbin/wpa_supplicant -c /etc/wpa_supplicant.conf -u -P /var/run/wpa_supplicant.pid -f /var/log/wpa_supplicant.log -t


No /var/run/wpa_supplicant.pid however exists. I created one with the
correct pid of wpa_supplicant in it ( 1142) but that did not help.

Any suggestions?

(Note that the documentation on wpa_supplicant and wpa_cli is pretty
poor. as an example wpa_cli man page does not contain many of the
commands that wpa_cli actually understands)


Jerry Peters

unread,
May 8, 2013, 4:13:20 PM5/8/13
to
unruh <un...@invalid.ca> wrote:
>
> When I run wpa_cli status or wpa_cli -i wlan0 status, I get an error
> which says
> Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
wpa-cli is trying to open the control socket so it can pass commands
to wpa-supplicant.

Look in the wpa-supplicant config file to see where the control socket
is being created. -c /etc/wpa_supplicant.conf names the config file.
You're looking for ctrl_interface=

Jerry

unruh

unread,
May 8, 2013, 5:07:47 PM5/8/13
to
ctrl_interface=/var/run/wpa_supplicant

but no such file or directory does exist, so wpa_supplicant is apparently not creating
it. If I create the directory and make it rwx all,
wpa_cli status
Failed to connect to wpa_supplicant - wpa_ctrl_open: Success
wpa_cli -i wlan0 status
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory



So, it neither creates the pid file nor the ctrl_interface.


>
> Jerry
>

Jerry Peters

unread,
May 9, 2013, 4:48:53 PM5/9/13
to
I just used the default when I used cli to control the supplicant --
it worked. See if there's an option to turn off the socket interface.
The other possiblity is that you have to create the directory
/var/run/wpa_supplicant before starting wpa-supplicant. I've got
/var/run/wpa_supplicant/wlan0 as the socket, nothing else in the
directory. IIRC you also need to specify the interface name (&
probably the directory) to cli.

Jerry
0 new messages