Raspberry Pi 3 - Configuring it as wireless access point -AP Mode: Difference between revisions

From Alpine Linux
(Created page with "=Copy the necessary firmware files= Create a directory named /firmware/bcrm on the root directory of your boot media as it will be automatically copied to /lib/firmware/bcrm...")
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
=Copy the necessary firmware files=
{{TOC right}}


Create a directory named /firmware/bcrm on the root directory of your boot media as it will be automatically copied to /lib/firmware/bcrm in the next boot.
=Install the necessary firmware=


Please make sure to include the following files namely brcmfmac43430-sdio.bin and brcmfmac43430-sdio.txt in /firmware/bcrm/ folder of your boot media
apk add linux-firmware-brcm
apk add raspberrypi-libs


Download from https://github.com/RPi-Distro/firmware-nonfree/tree/master/brcm80211/brcm


=Install hostapd and dnsmasq=
=Install hostapd and dnsmasq=


apk add hostapd
apk add hostapd
apk add dnsmasq


apk add dnsmasq
=Configure /etc/hostapd/hostapd.conf=


=Configure hostpad conf file =
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


In /etc/hostapd/hostapd.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


driver=nl80211
=Configure Static ips for wlan0 in the file /etc/network/interfaces=


ssid=Pi3-AP
auto wlan0
iface wlan0 inet static
  address 10.0.0.1
  netmask 255.255.255.0


hw_mode=g
=Start the services=
 
channel=1
 
macaddr_acl=0
 
auth_algs=1
 
wpa=2
 
wpa_key_mgmt=WPA-PSK
 
wpa_passphrase=raspberry
 
rsn_pairwise=CCMP


wpa_pairwise=CCMP
service dnsmasq start
service hostapd start


=Configure your /etc/dnsmasq.conf=
=Enable the Services permanently on every bootup=


rc-update add dnsmasq   
rc-update add hostapd


interface=wlan0
(to del)


dhcp-range=10.0.0.2,10.0.0.5,255.255.255.0,12h
rc-update del dnsmasq   
rc-update del hostapd


=Make sure you have static ips for wlan0 in /etc/network/interfaces=
(or)


auto wlan0
rc-update add dnsmasq boot   
rc-update add hostapd boot   


iface wlan0 inet static
(to del)


address 10.0.0.1
rc-update del dnsmasq boot   
rc-update del hostapd boot


netmask 255.255.255.0
=Commit all changes to files=


=Start the services=
Make sure you run the below command to commit all changes otherwise they will be lost on reboot
service dnsmasq start


service hostapd start
lbu ci


=References=
=References=
Line 70: Line 77:
Thanks
Thanks
oneinsect@gmail.com
oneinsect@gmail.com
[[Category:Networking]]
[[Category:Embedded Systems]]
[[category: Raspberry]]

Revision as of 10:09, 25 October 2019

Install the necessary firmware

apk add linux-firmware-brcm
apk add raspberrypi-libs


Install hostapd and dnsmasq

apk add hostapd
apk add 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 below command 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/

Thanks oneinsect@gmail.com