Skip to content

Instantly share code, notes, and snippets.

@svet-b
Created December 20, 2019 00:10
Show Gist options
  • Save svet-b/7acf6c1d9efc02be804bcc718933518f to your computer and use it in GitHub Desktop.
Save svet-b/7acf6c1d9efc02be804bcc718933518f to your computer and use it in GitHub Desktop.
sudo apt install npm
sudo npm install -g npm@latest
sudo npm install bower -g

git clone https://github.com/sabhiram/raspberry-wifi-conf.git
cd raspberry-wifi-conf
npm update
bower install
sudo npm run-script provision
# To test:
sudo npm start

sudo cp assets/init.d/raspberry-wifi-conf /etc/init.d/raspberry-wifi-conf 
sudo chmod +x /etc/init.d/raspberry-wifi-conf  
sudo update-rc.d raspberry-wifi-conf defaults

Other option:

sudo apt-get install -y dnsmasq hostapd python3-flask python3-requests git
git clone https://github.com/schollz/raspberry-pi-turnkey.git
sudo systemctl stop dnsmasq && sudo systemctl stop hostapd

echo 'interface wlan0
static ip_address=192.168.4.1/24' | sudo tee --append /etc/dhcpcd.conf

sudo mv /etc/dnsmasq.conf /etc/dnsmasq.conf.orig
sudo systemctl daemon-reload
sudo systemctl restart dhcpcd

echo 'interface=wlan0
dhcp-range=192.168.4.2,192.168.4.20,255.255.255.0,24h' | sudo tee --append /etc/dnsmasq.conf

echo 'interface=wlan0
driver=nl80211
ssid=ammp-edge-config
hw_mode=g
wmm_enabled=0
auth_algs=1
channel=6' | sudo tee --append /etc/hostapd/hostapd.conf

echo 'DAEMON_CONF="/etc/hostapd/hostapd.conf"' | sudo tee --append /etc/default/hostapd

#sudo systemctl unmask hostapd
sudo systemctl enable hostapd

sudo systemctl start hostapd && sudo systemctl start dnsmasq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment