Raspberry Pi 3 - Configuring it as wireless access point -AP Mode: Difference between revisions
m (Add a todo and use the pkg template.) |
|||
(7 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
{{TOC right}} | |||
{{Todo|Was the raspberrypi-libs package renamed... or is it even still required?}} | |||
=Install the necessary firmware= | |||
apk add {{pkg|linux-firmware-brcm|arch=a*}} {{pkg|raspberrypi-libs|arch=a*|branch=v3.17}} | |||
=Install hostapd and dnsmasq= | =Install hostapd and dnsmasq= | ||
apk add hostapd | apk add {{pkg|hostapd|arch=a*}} {{pkg|dnsmasq|arch=a*}} | ||
=Configure /etc/hostapd/hostapd.conf= | |||
rsn_pairwise=CCMP | interface=wlan0 | ||
driver=nl80211 | |||
wpa_pairwise=CCMP | ssid=Pi3-AP | ||
hw_mode=g | |||
channel=1 | |||
macaddr_acl=0 | |||
auth_algs=1 | |||
wpa=2 | |||
wpa_key_mgmt=WPA-PSK | |||
wpa_passphrase=raspberry | |||
rsn_pairwise=CCMP | |||
wpa_pairwise=CCMP | |||
=Configure your /etc/dnsmasq.conf= | =Configure your /etc/dnsmasq.conf= | ||
interface=wlan0 | |||
interface=wlan0 | dhcp-range=10.0.0.2,10.0.0.5,255.255.255.0,12h | ||
dhcp-range=10.0.0.2,10.0.0.5,255.255.255.0,12h | |||
=Configure Static ips for wlan0 in the file /etc/network/interfaces= | =Configure Static ips for wlan0 in the file /etc/network/interfaces= | ||
auto wlan0 | auto wlan0 | ||
iface wlan0 inet static | |||
iface wlan0 inet static | address 10.0.0.1 | ||
netmask 255.255.255.0 | |||
address 10.0.0.1 | |||
netmask 255.255.255.0 | |||
=Start the services= | =Start the services= | ||
service hostapd start | service dnsmasq start | ||
service hostapd start | |||
=Enable the Services permanently on every bootup= | =Enable the Services permanently on every bootup= | ||
rc-update add dnsmasq | rc-update add dnsmasq | ||
rc-update add hostapd | |||
rc-update add hostapd | |||
(to del) | (to del) | ||
rc-update del dnsmasq | rc-update del dnsmasq | ||
rc-update del hostapd | |||
rc-update del hostapd | |||
(or) | (or) | ||
rc-update add dnsmasq boot | rc-update add dnsmasq boot | ||
rc-update add hostapd boot | |||
rc-update add hostapd boot | |||
(to del) | (to del) | ||
rc-update del dnsmasq boot | rc-update del dnsmasq boot | ||
rc-update del hostapd boot | |||
rc-update del hostapd boot | |||
=Commit all changes to files= | =Commit all changes to files= | ||
Make sure you run the below | Make sure you run the command shown below to commit all changes, otherwise they will be lost on reboot. | ||
lbu ci | lbu ci | ||
=References= | =References= | ||
https://gist.github.com/atlury/fe0ea8b91a981c103df7 | https://gist.github.com/atlury/fe0ea8b91a981c103df7 | ||
https://frillip.com/using-your-raspberry-pi-3-as-a-wifi-access-point-with-hostapd/ | https://frillip.com/using-your-raspberry-pi-3-as-a-wifi-access-point-with-hostapd/{{dead link}} | ||
Thanks | Thanks | ||
oneinsect@gmail.com | oneinsect@gmail.com | ||
[[Category:Networking]] | |||
[[Category:Embedded Systems]] | |||
[[category: Raspberry]] |
Latest revision as of 14:30, 10 January 2024
Todo: Was the raspberrypi-libs package renamed... or is it even still required?
Install the necessary firmware
apk add linux-firmware-brcm raspberrypi-libs
Install hostapd and dnsmasq
apk add hostapd dnsmasq
Configure /etc/hostapd/hostapd.conf
interface=wlan0 driver=nl80211 ssid=Pi3-AP hw_mode=g channel=1 macaddr_acl=0 auth_algs=1 wpa=2 wpa_key_mgmt=WPA-PSK wpa_passphrase=raspberry rsn_pairwise=CCMP wpa_pairwise=CCMP
Configure your /etc/dnsmasq.conf
interface=wlan0 dhcp-range=10.0.0.2,10.0.0.5,255.255.255.0,12h
Configure Static ips for wlan0 in the file /etc/network/interfaces
auto wlan0 iface wlan0 inet static address 10.0.0.1 netmask 255.255.255.0
Start the services
service dnsmasq start service hostapd start
Enable the Services permanently on every bootup
rc-update add dnsmasq rc-update add hostapd
(to del)
rc-update del dnsmasq rc-update del hostapd
(or)
rc-update add dnsmasq boot rc-update add hostapd boot
(to del)
rc-update del dnsmasq boot rc-update del hostapd boot
Commit all changes to files
Make sure you run the command shown below to commit all changes, otherwise they will be lost on reboot.
lbu ci
References
https://gist.github.com/atlury/fe0ea8b91a981c103df7
https://frillip.com/using-your-raspberry-pi-3-as-a-wifi-access-point-with-hostapd/[Dead Link]
Thanks oneinsect@gmail.com