How to Build a Low-Cost DIY WiFi Extender With a Raspberry Pi
Introduction
Extending your WiFi network range can be costly if you purchase a commercial WiFi extender, with prices typically starting around $50. However, with a Raspberry Pi and a few other inexpensive components, you can build your own DIY WiFi extender for under $30.
In this guide, I'll walk through the entire process of constructing a Raspberry Pi based WiFi extender step-by-step. By the end, you'll have a fully functional extender that bolsters your WiFi coverage without breaking the bank.
What You'll Need
To complete this project, you'll need the following components:
-
Raspberry Pi - The brains of the operation. Any Pi model will work, but I recommend the Raspberry Pi 3 B+ or 4 B.
-
MicroSD card - To store the operating system and software. Get one with at least 8GB of storage.
-
USB WiFi adapter - For connecting to your existing WiFi. Make sure it supports monitor mode and AP mode. The Alfa AWUS036ACH is a good choice.
-
Ethernet cable - To connect the Pi to your router. Cat 5e or Cat 6 is ideal.
-
Micro USB power supply - To power the Pi. A 5V/2.5A supply provides ample power.
-
Case - To protect the Pi. Many options available for just a few dollars.
That covers the core components. Optionally, you may also want:
-
Heatsinks - To keep the Pi cool under load.
-
MicroSD card reader - For writing the OS image if your computer doesn't have a slot.
Writing the Operating System Image
With the gear acquired, it's time to prep the Raspberry Pi.
The first step is flashing Raspbian OS to the MicroSD card. Raspbian is a Debian-based Linux distro optimized for the Pi. Here's how to get it onto the card:
-
Download the Raspbian Buster Lite image from www.raspberrypi.org/downloads. Get the ZIP file, not the direct disk image.
-
Extract the .img file from the ZIP archive.
-
Open Etcher and select the extracted .img file.
-
Insert your MicroSD card into your computer and select it as the target drive in Etcher.
-
Flash the image to the card by clicking Flash. This may take 5-10 minutes.
Once complete, safely eject the card from your PC.
Configuring Your Raspberry Pi
With Raspbian installed, the SD card can now be inserted into the Pi.
If you want to connect remotely, you'll need to enable SSH. This can be done by placing an empty file named ssh
onto the root of the card.
Now for the initial setup:
-
Insert the MicroSD card into your Raspberry Pi.
-
If using WiFi, configure the SSID and password by editing
wpa_supplicant.conf
on the SD card. -
Connect an Ethernet cable from your router to the Pi.
-
Power on the Pi with your Micro USB supply. Give it 60 seconds to boot.
-
SSH into the Pi using its default username (
pi
) and password (raspberry
) or connect a display. -
Run
sudo raspi-config
to launch the configuration wizard. Here you can change settings like the password.
After rebooting, your base OS setup is complete!
Installing Software & Drivers
Now we need to get the required software installed:
-
Run
sudo apt update && sudo apt full-upgrade
to fetch packages and upgrade installed packages. -
For the WiFi adapter to work, install its drivers with
sudo apt install <driverpackage>
. -
Install pip for Python:
sudo apt install python3-pip
. -
Install create_ap to handle access point creation:
sudo pip3 install create_ap
. -
Install dnsmasq for DHCP and DNS services:
sudo apt install dnsmasq
. -
Restart the Pi to load the drivers:
sudo shutdown -r now
.
That covers the essential dependencies. We're now ready to configure the extender!
Creating the Extender
Here are the steps to transform your Pi into a WiFi extender:
-
Plug your WiFi adapter into one of the Pi's USB ports.
-
Edit
/etc/dhcpcd.conf
and uncommentdenyinterfaces wlan0
to prevent IP conflicts. -
Copy your main router's WiFi settings from
wpa_supplicant.conf
. We'll clone these for the extender's AP. -
Launch the extender with:
sudo create_ap wlan0 eth0 <SSID> <PASSWORD> --no-virt --daemon
Replace <SSID>
and <PASSWORD>
with your desired credentials.
The --no-virt
flag prevents virtual interfaces from conflicting. --daemon
runs the process in the background.
You should now see your Pi broadcasting a new WiFi network! Connect devices to give it a try.
Maximizing Performance
To optimize your extender's performance and reliability, consider these tips:
-
Position the Pi in a central area between your main router and weak coverage zones. Elevation helps.
-
Use a USB extension cable to move the Pi closer to the antenna if needed.
-
Set your Pi's WiFi channel to be different than your router's to reduce interference.
-
Add a powered USB hub if powering multiple peripherals from the Pi.
-
Attach heatsinks to the major chips if temperatures are high.
With the right placement and configuration, your DIY Raspberry Pi WiFi extender should deliver excellent range expansion!
Summary
Building a WiFi extender with a Raspberry Pi is a straightforward DIY project that costs far less than a commercial solution. With just a few inexpensive components, freely available software, and minimal command line configuration, you can outfit your Pi to act as a wireless repeater.
Position it between your main router and weak coverage areas to blanket your home or office with a stable, expanded WiFi network. Enjoy the perks of solid wireless coverage without spending big bucks!