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 10USD) 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.
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.
For 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
View my project on Hackaday HackadayView my project on Instructables InstructablesView my project on Hackster Hackster
For flashing the image onto the SD card I have used BalenaEtcher
.iso
file from the Raspberry Pi website.iso
file, select the SD card and click the flash button and wait for the process to finish.ssh
with no extension.wpa_supplicant.conf
in the same boot
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
systemd-networkd
From 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.
To minimize the need for additional packages,networkd
is used since it is already built into the init
system, therefore, no need for dhcpcd
.
dhcpd
root
sudo systemctl mask networking.service dhcpcd.service
sudo mv /etc/network/interfaces /etc/network/interfaces~
sed -i '1i resolvconf=NO' /etc/resolvconf.conf
systemd-networkd
sudo systemctl enable systemd-networkd.service systemd-resolved.service
sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
sudo nano /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
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.
sudo chmod 600 /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
wpa_supplicant
servicesudo systemctl disable wpa_supplicant.service
sudo systemctl enable wpa_supplicant@wlan0.service
sudo nano /etc/wpa_supplicant/wpa_supplicant-wlan1.conf
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.
sudo chmod 600 /etc/wpa_supplicant/wpa_supplicant-wlan1.conf
wpa_supplicant
servicesudo systemctl disable wpa_supplicant.service
sudo systemctl enable wpa_supplicant@wlan1.service
sudo nano /etc/systemd/network/08-wlan0.network
[Match]
Name=wlan0
[Network]
Address=192.168.7.1/24
IPMasquerade=yes
IPForward=yes
DHCPServer=yes
[DHCPServer]
DNS=1.1.1.1
sudo nano /etc/systemd/network/12-wlan1.network
[Match]
Name=wlan1
[Network]
DHCP=yes
sudo reboot