I built an image with wpa_supplicant
and hostapd
but configuration files missing (hostapd.conf
& wpa_supplicant.conf)
.
Also the script hostapd.sh
didn't generate any file
They're typically created in /var/run/
no
root@OpenWrt:/# find . -name *hostapd* -print
./lib/netifd/hostapd.sh
./usr/lib/opkg/info/hostapd-common.control
./usr/lib/opkg/info/hostapd-common.list
./usr/lib/opkg/info/hostapd-common.prerm
./usr/lib/opkg/info/hostapd.control
./usr/lib/opkg/info/hostapd.list
./usr/lib/opkg/info/hostapd.prerm
./usr/sbin/hostapd
root@OpenWrt:/#
yes (/var
is a symlink to /tmp
)
root@jj:~# find / -name *hostapd* -print
/lib/netifd/hostapd.sh
/overlay/upper/usr/lib/opkg/info/hostapd-common.control
/overlay/upper/usr/lib/opkg/info/hostapd-common.postinst
/overlay/upper/usr/lib/opkg/info/hostapd-common.prerm
/overlay/upper/usr/lib/opkg/info/hostapd-common.list
/overlay/upper/usr/sbin/hostapd
/overlay/upper/lib/netifd/hostapd.sh
/tmp/run/hostapd-phy1.conf
/tmp/run/hostapd
/tmp/run/hostapd-phy0.conf
/usr/lib/opkg/info/hostapd-common.control
/usr/lib/opkg/info/hostapd-common.postinst
/usr/lib/opkg/info/hostapd-common.prerm
/usr/lib/opkg/info/hostapd-common.list
/usr/sbin/hostapd
root@jj:~#
Maybe you left out other critical bits in your build, such as the appropriate kmod or iw
.
it looks like it appears just when i configure an access point or connecting to an ap
The UCI system generates them dynamically by parsing the /etc/config/wireless file when wifi is started up. This is done by the script /lib/netifd/hostapd.sh. After the .conf files are written to RAM disk, wpad is started pointing to those files.
If you don't have any STA interfaces configured there won't be a wpa-supplicant conf file or an instance of wpa-supplicant. Same for APs and hostapd.