Back to Browse

Access Point on your Raspberry Pi Zero-W

2.3K views
Nov 7, 2024
37:50

This is a step by step video installing Hostapd onto you Raspberry Pi Zero-W. The video takes you through each command and config file. You are able to see each command entry real time. Note: The Left brackets(Less than key) are replaced by * and Right bracket (greater than) are replaced by ** INSTALL AP SOFTWARE sudo apt install dnsmasq hostapd Deactivate the AP programs as the configuration files are not in place. sudo systemctl stop dnsmasq sudo systemctl stop hostapd SETUP STATIC IP sudo nano /etc/dhcpcd.conf interface wlan0 static ip_address=192.168.10.1/24 nohook wpa_supplicant sudo service dhcpcd restart sudo service dhcpcd status Configuring the DHCP server (DNSMASQ) un-comment these lines to establish AP IP address (Change XXX) #interface=wlan0 #dhcp-range=192.168.XXX.2,192.168.XXX.20,255.255.255.0,24h sudo nano /etc/dnsmasq.conf sudo systemctl start dnsmasq sudo systemctl status dnsmasq Configuring the access point host software (hostapd) sudo nano /etc/hostapd/hostapd.conf interface=wlan0 driver=nl80211 ssid=PiZero hw_mode=g channel=7 wmm_enabled=0 macaddr_acl=0 auth_algs=1 ignore_broadcast_ssid=0 wpa=2 wpa_passphrase=12345678 wpa_key_mgmt=WPA-PSK wpa_pairwise=TKIP rsn_pairwise=CCMP (When Hostapd service starts up this entry tells DAEMON where the hostapd.conf is located.) sudo nano /etc/default/hostapd DAEMON_CONF="/etc/hostapd/hostapd.conf" (If the service failed then the DAEMON could not find the hostapd.conf or there is an error in the text that causes it to error and exit. Copy and paste the config text above (make sure you only copy the text only. After you make any changes run all the commands in the HOSTAPD START UP section ) HOSTAPD START UP sudo systemctl disable hostapd sudo systemctl enable hostapd sudo systemctl unmask hostapd sudo systemctl start hostapd sudo systemctl status hostapd sudo systemctl status dnsmasq IP ROUTING sudo nano /etc/sysctl.conf (and uncomment this line:) net.ipv4.ip_forward=1 sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE sudo sh -c "iptables-save ** /etc/iptables.ipv4.nat" sudo nano /etc/rc.local and add this just above “exit 0” to install these rules on boot. iptables-restore * /etc/iptables.ipv4.nat sudo reboot

Download

0 formats

No download links available.

Access Point on your Raspberry Pi Zero-W | NatokHD