I have configured a control interface for hostapd on embedded Linux like this in the configuration file:
ctrl_interface=/var/run/hostapd
I can see that a file is created in the file system:
ls -la /var/run/hostapd/wifi_ap0
srwxrwx--- 1 root root 0 Jul 17 20:40 /var/run/hostapd/wifi_ap0
However when I try to open a connection to this interface via wpa_ctrl_open("/var/run/hostapd/wifi_ap0")
it returns NULL
and strerror(errno)
returns No such file or directory
.
Clearly the file exists, so I don't understand what is wrong here. Any hints?