WiFi – Access Point out of a Raspberry Pi (Repeater)

What do you need?
A Raspberry Pi, model B.
A boot SD card for the Raspberry Pi.
A USB WiFi device that supports “Access Point” mode.
An Ethernet cable to connect to the local network.
How does it work?

The Raspberry Pi is configured as a WiFi Hotspot, just like you would see in an internet cafe. It allows you to connect to the internet over WiFi using the Raspberry Pi as the bridge to the internet. The basic steps are

  • Enable a WiFi Access Point and broadcast on the channel of your choice
  • Assign dynamic IP addresses to any device that connects to WiFi network
  • Join the WiFi and Ethernet networks together by using Network Address TranslationWiFi - Access Point out of a Raspberry Pi (Repeater)

Step 1:

1. Install the necessary software.
sudo aptitude install hostapd hostap-utils iw bridge-utils
2.Edit the file Hostapd:
sudo nano /etc/init.d/hostapd
and add to (DAEMON_CONF=) the following line:
DAEMON_CONF=/etc/hostapd/hostapd.conf
Save nano(CTRL+O)and Exit(CTRL+X)
3.Configure Hostapd.conf
You can create an open network, or a WPA-secured network, or a WPA-secured network. A secure network is recommended to prevent unauthorized use andtampering, but you can also create an open network. To create a WPA-secured network, edit the file /etc/hostapd/hostapd.conf (create it if it doesn't exist) and add the following lines:
sudo nano /etc/hostapd/hostapd.conf
ctrl_interface=/var/run/hostapd
###############################
# Basic Config
###############################
macaddr_acl=0 auth_algs=1
# Most modern wireless drivers in the kernel need driver=nl80211
driver=nl80211
##########################
# Local configuration…
##########################
interface=wlan0
bridge=br0
hw_mode=g
ieee80211n=1
channel=1
ssid=RaspberryPI_AP
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=3
wpa_passphrase=MY_PASSPHRASE
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
Save nano(CTRL+O)and Exit(CTRL+X)WiFi - Access Point out of a Raspberry Pi (Repeater) schematic
Important:
!! Change ssid=, channel=, and wpa_passphrase= to values of your choice. SSID is the hotspot's name
!! which is broadcast to other devices, channel is what frequency the hotspot will run on,
!! wpa_passphrase is the password for the wireless network
(If you would like to create an open network, put the following text into /etc/hostapd/hostapd.conf:)
sudo nano /etc/hostapd/hostapd.conf
ctrl_interface=/var/run/hostapd
###############################
# Basic Config
###############################
macaddr_acl=0 auth_algs=1
# Most modern wireless drivers in the kernel need driver=nl80211
driver=nl80211
##########################
# Local configuration…
##########################
interface=wlan0
bridge=br0
ssid=RaspberryPI_AP
hw_mode=g
ieee80211n=1
channel=1
auth_algs=1
wmm_enabled=0

 

For more detail: WiFi – Access Point out of a Raspberry Pi (Repeater)


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top