Truly WiFi Extender is a WiFi repeater based on Raspberry Pi Zero W. It makes a nice alternative to a commercial WiFi repeater combining low-cost (under 10 USD) and highly customizable software. It can also run some ad-blocking solutions such as pi-hole as well. This project is one of a kind because most of the projects on GitHub demonstrate how to create a wireless AP to share Internet access obtained using Ethernet.
If you want to check how to set up a web UI to take SSID and Password from the user, check this page https://github.com/mrtejas99/wifi-extender/tree/master/webui
If you want to check how to set up WiFi extender by simply running a script(THE EASY WAY), check this page https://github.com/mrtejas99/wifi-extender/tree/master/bash_script
View my project on Hackaday
View my project on Instructables
View my project on GitHub
- Introduction https://youtu.be/tyZ15xqk08U
- Part 1: Lear now to create SD card for Raspberry pi https://youtu.be/X_9TC716-sc
- Part 2: The implementation https://youtu.be/C-TJQ4UkSpk
- Part 3: Installing the webUI ,its dependencies and demonstration https://youtu.be/yaaoag_H_WI
This will run on any version of Raspberry Pi. But make sure to have two wifi adapters. Nowadays, Raspberry Pi comes with onboard WiFi. In case you have an older version, you might have to use two USB WiFi adapters. I will be using a single USB WiFi adapter since I am using Raspberry Pi Zero W.
SoftwareFor this project, I will be using Raspbian Stretch Lite. You can download it on the official Raspberry Pi website. You can use the newer version of Raspbian as well.
The main packages on which this project is wpa_supplicant
. Since Raspbian is Linux based and uses wpa_supplicant
to manage WiFi cards, we can easily set up this computer as a WiFi access point. You even don’t need hostapd - just wpa_supplicant
and systemd-networkd
For flashing the image onto the SD card I have used BalenaEtcher
- Download the raspbian lite
.iso
file from the Raspberry Pi website - Once downloaded, open BalenaEtcher, select the
.iso
file, select the SD card and click the flash button and wait for the process to finish. - Then, open the boot partition and inside it, create a blank text file named
ssh
with no extension. - Finally, create another text file called
wpa_supplicant.conf
in the sameboot
partition and paste the following content.
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=IN
network={
ssid="mywifissid"
psk="mywifipassword"
key_mgmt=WPA-PSK
}
Replace the mywifissid with the name of the WiFi and mywifipassword with the wifi password.
5. Power on the Raspberry pi. To find its IP, you can use a tool like Angry IP Scanner and scan the subnet,6. Once you find the IP, SSH to your Pi using a tool like PuTTY or just ssh pi@raspberrypi.local
, enter the password raspberry
and you are good to go.5. Finally, update the package list and upgrade the packages and reboot Pi.
sudo apt update -y
sudo apt upgrade -y
sudo reboot
Setting up systemd-networkdFrom ArchWiki
systemd-networkd is a system daemon that manages network configurations. It detects and configures network devices as they appear; it can also create virtual network devices.
systemd-networkd is a system daemon that manages network configurations. It detects and configures network devices as they appear; it can also create virtual network devices.
To minimize the need for additional packages,networkd
is used since it is already built into the init
system, therefore, no need for dhcpcd
.
- Prevent the use of
dhcpd
Note: It is required to run asroot
sudo systemctl mask networking.service dhcpcd.service
sudo mv /etc/network/interfaces /etc/network/interfaces~
sed -i '1i resolvconf=NO' /etc/resolvconf.conf
- Use the inbuilt
systemd-networkd
sudo systemctl enable systemd-networkd.service systemd-resolved.service
sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
Configuring wpa-supplicantwlan0 as AP- Create a new file using the command.
sudo nano /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
- Add the following content and save the file by pressing CtrlX, Yand Enter
country=IN
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="TestAP-plus"
mode=2
key_mgmt=WPA-PSK
psk="12345678"
frequency=2412
}
Replace the TestAP-plus and 12345678 with your desired values.
This configuration file is to be used for the onboard wifi Adapter wlan0
which will be used to create a wireless access point.
- Give the user read, write permissions to the file
sudo chmod 600 /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
- Restart
wpa_supplicant
service
sudo systemctl disable wpa_supplicant.service
sudo systemctl enable wpa_supplicant@wlan0.service
wlan1 as client- Create a new file using the command.
sudo nano /etc/wpa_supplicant/wpa_supplicant-wlan1.conf
- Add the following content and save the file by pressing CtrlX, Yand Enter
country=IN
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="Asus RT-AC5300"
psk="12345678"
}
Replace the Asus RT-AC5300 and 12345678 with your Router SSID and password.
This configuration file is to be used for the USB WiFi Adapter wlan01
which will be used to connect to a Wireless Router.
- Give the user read, write permissions to the file
sudo chmod 600 /etc/wpa_supplicant/wpa_supplicant-wlan1.conf
- Restart
wpa_supplicant
service
sudo systemctl disable wpa_supplicant.service
sudo systemctl enable wpa_supplicant@wlan1.service
Configuring Interfaces- Create a new file using the command.
sudo nano /etc/systemd/network/08-wlan0.network
- Add the following content and save the file by pressing CtrlX, Yand Enter
[Match]
Name=wlan0
[Network]
Address=192.168.7.1/24
IPMasquerade=yes
IPForward=yes
DHCPServer=yes
[DHCPServer]
DNS=1.1.1.1
- Create a new file using the command.
sudo nano /etc/systemd/network/12-wlan1.network
- Add the following content and save the file by pressing CtrlX, Yand Enter
[Match]
Name=wlan1
[Network]
DHCP=yes
- Reboot the Raspberry Pi using
sudo reboot
Comments