Having spotty WiFi coverage around your home can be frustrating. Areas like the backyard, basement, or far rooms often get weak wireless signals. Purchasing an expensive, commercial WiFi range extender may seem like the only option. However, with a little bit of DIY spirit, you can build your own WiFi range extender for under $20.

This project requires some basic hardware components and tools. With a couple hours of time, you'll have a custom WiFi range extender to boost signals into those WiFi dead zones. Let's dive in to the step-by-step process.

Hardware Needed

Software Required

Tools Needed

Step 1: Set Up the Raspberry Pi Zero W

The Raspberry Pi Zero W is the heart of this DIY WiFi range extender. The Pi Zero W is a tiny, affordable single board computer with built-in WiFi capabilities.

First, install the Raspbian OS onto a microSD card. Raspbian is a free Linux distribution optimized for the Raspberry Pi hardware.

With Raspbian installed, connect the Pi Zero W to a monitor, keyboard, and mouse to complete the initial setup. Make sure to enable SSH so you can access the Pi wirelessly later.

Once the OS is up and running, it's time to install the software that will turn the Pi into a WiFi repeater.

Step 2: Install hostapd and dnsmasq

There are two essential software packages we need to install called hostapd and dnsmasq.

Hostapd allows the Raspberry Pi to operate as a WiFi access point. This enables other devices to connect to the Pi over WiFi.

Dnsmasq handles the DHCP and DNS services required for the WiFi network.

To install these packages, run the following commands:

sudo apt-get update
sudo apt-get install hostapd dnsmasq

Step 3: Configure hostapd and dnsmasq

Next, we need to configure hostapd and dnsmasq with the appropriate settings.

In the /etc/dhcpcd.conf file, add the following:

interface wlan0
static ip_address=192.168.4.1/24
nohook wpa_supplicant

This sets a static IP address for the Pi and disables wpa_supplicant which normally connects the Pi to WiFi networks.

For hostapd, edit the /etc/hostapd/hostapd.conf file to include:

interface=wlan0
hw_mode=g
channel=7
wmm_enabled=0
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_passphrase=yourpassphrase
ssid=YourSSID

Replace yourpassphrase and YourSSID with your own values.

Finally, edit /etc/dnsmasq.conf to have:

interface=wlan0
dhcp-range=192.168.4.2,192.168.4.20,255.255.255.0,24h

This configures dnsmasq with the proper IP range and interface.

Step 4: Set Up Routing

For the WiFi repeater to work, we need to enable routing on the Raspberry Pi.

In the /etc/sysctl.conf file, uncomment this line:

```

net.ipv4.ip_forward=1

```

This will enable IP forwarding.

Next, run these commands to set up masquerading:

sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sudo sh -c "iptables-save > /etc/iptables.ipv4.nat"

This configures NAT so that the Pi can act as a router between the eth0 and wlan0 interfaces.

Step 5: Connect Ethernet and Power Up

With the software configured, we need to connect the Raspberry Pi Zero W to the existing WiFi router.

Use an Ethernet cable to connect the Pi Zero to the router. This will allow the Pi to join the primary WiFi network.

Finally, plug in the USB power supply to boot up the Pi Zero.

The Raspberry Pi should now be acting as a WiFi repeater Access Point! Connect your devices to the new extended network.

Improving the Range Extender

Here are some optional steps to improve your DIY WiFi repeater:

So for less than $20 in parts, I was able to create a capable WiFi extender with the Raspberry Pi Zero W. This project is an affordable way to improve WiFi coverage in specific areas around your home.