-
Notifications
You must be signed in to change notification settings - Fork 3
RaspberryPi wifi AP mode setup
Michael Pounders edited this page May 19, 2020
·
3 revisions
I am working from this setup guide
Run:
pi@RCHourGlass:~ $ ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.255- Make sure your LAN IP does not start with 192.168.4 If it does you will have to change the IP address that start with 192.168.4 to 192.168.1 in the static wlan section and the /etc/dnsmasq.conf file.
- Your LAN IP address could also start with 10. or 172.16. no need to change anything below
sudo apt update
sudo apt full-upgradesudo apt install hostapdsudo systemctl unmask hostapd
sudo systemctl enable hostapdsudo apt install dnsmasqsudo nano /etc/dhcpcd.confGo to the end of the file and add the following then save it:
interface wlan0
static ip_address=192.168.4.1/24
nohook wpa_supplicantsudo mv /etc/dnsmasq.conf /etc/dnsmasq.conf.orig
sudo nano /etc/dnsmasq.confAdd the following to the file and save it:
interface=wlan0 # Listening interface
dhcp-range=192.168.4.2,192.168.4.20,255.255.255.0,24h
# Pool of IP addresses served via DHCP
domain=wlan # Local wireless DNS domain
address=/gw.wlan/192.168.4.1
# Alias for this routersudo nano /etc/hostapd/hostapd.confAdd the following to the file and save it:
country_code=US
interface=wlan0
ssid=RCHourGlass
hw_mode=g
channel=6
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=raspberry
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
Notes:
- Please use the right country_code for your area. Country Codes
- RCHourGlass should show up in your phone as a connectable AP when done.
- The password will be raspberry unless you change it.
sudo systemctl reboot