User avatar
jbeale
Posts: 3518
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

'sudo hostapd_cli all_sta' doesn't work? - SOLVED

Tue Dec 10, 2013 8:25 pm

I have seen this command listed as though it should be working, but it isn't for me. I do have hostapd running with a client connected to it.

Code: Select all

$ sudo hostapd_cli all_sta
Failed to connect to hostapd - wpa_ctrl_open: No such file or directory
$ sudo hostapd -v
hostapd v0.8.x
User space daemon for IEEE 802.11 AP management,
IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
Copyright (c) 2002-2011, Jouni Malinen <[email protected]> and contributors
$ ps aux | grep hostapd | head -1
root      1920  0.0  0.4   2000   616 ?        Ss   12:02   0:00 /usr/sbin/hostapd -B -P /var/run/hostapd.pid /etc/hostapd/hostapd.conf
$ cat /var/run/hostapd.pid
1920
$ sudo hostapd_cli -p /var/run all_sta
Selected interface 'console'
Failed to connect to hostapd - wpa_ctrl_open: Connection refused
Solved it. The command does work, as long as /etc/hostapd/hostapd.conf includes:

Code: Select all

ctrl_interface=/var/run/hostapd
ctrl_interface_group=0

Return to “Networking and servers”