I configured my raspberrypi as a wifi repeater using hostapd
and dnsmasq
. I did not touch my /etc/network/interfaces
, just added
interface wlan0
static ip_address=192.168.42.1/24
to /etc/dhcpcd.conf
and
interface=wlan0
dhcp-range=192.168.42.20,192.168.42.100,255.255.255.0,12h
to /etc/dnsmasq.conf
I think I configured hostapd
right (added DAEMON_CONF="/etc/hostapd/hostapd.conf"
to /etc/default/hostapd
etc.) and it works.
But after a reboot my interface (managed by hostapd) is down. When I restart hostapd, everything works fine again, so I added
sleep 1 && service hostapd restart
to my /etc/rc.local
as a workaround.
What could be the reason?
Is there a better way to fix it?
nohook wpa_supplicant
in hostapd.conf ;-)