Unable to Join hostapd AP [RPI3]
theavijitsarkar opened this issue · 4 comments
Hostapd is started. I can see the AP. But when i try to join it doesnt, its stuck at obtaining ip address.
fixed by installed dnsmasq and setting an ip for wlan0
Hi snowbreeze,
I probably fighting with the same problem, I called hostapd.enable and I can see the ap too. But no client can get an ip. How did y solve it with dnsmasq etc. from node.js or on system level?
I assume the dhcp server is adjusted before?
Best regrads,
Nic
Install these
sudo apt-get install dnsmasq
sudo apt-get install hostapd
Append to /etc/dnsmasq.conf
# disables dnsmasq reading any other files like /etc/resolv.conf for nameservers
no-resolv
# Interface to bind to
interface=wlan0
# Specify starting_range,end_range,lease_time
dhcp-range=10.0.0.3,10.0.0.20,12h
# dns addresses to send to the clients
server=8.8.8.8
server=8.8.4.4
In network interfaces
allow-hotplug wlan0
auto wlan0
From node before you enable, do these via exec
sudo ifconfig wlan0 up 10.0.0.1 netmask 255.255.255.0
sudo dnsmasq
This allowed me to start the access point, see the access point, but not connect to the access point. What worked for me was adding broadcast 255.0.0.0
to the ifconfig command:
sudo ifconfig wlan0 up 10.0.0.1 netmask 255.255.255.0 broadcast 255.0.0.0