Setting Up a Raspberry Pi Wi-Fi Extender

by SuitableBat9 in Circuits > Raspberry Pi

183 Views, 3 Favorites, 0 Comments

Setting Up a Raspberry Pi Wi-Fi Extender

WiFiExtender-mini-watermark.png

A Raspberry Pi Wi-Fi Extender is a cheap and power efficient way of increasing the total range of your Wi-Fi Network.

A Wi-Fi extender differs a fair bit from a Wi-Fi access point. The main difference being that instead of getting its network connection from Ethernet, it instead gets its network connection from a Wi-Fi adapter.

For this reason, to complete this tutorial you will require two Wi-Fi adapters, one of these must be access point capable.

You will face a fair bit of degradation in the speed of your network connection when connecting to the Wi-Fi repeater. The main reason for this is that you must wait for the traffic to go over your initial Wi-Fi connection then be repeated from your Raspberry Pi for devices to connect to.

Please note that this tutorial expects you to have Network Manager installed on your Raspberry Pi. Raspberry Pi OS Bookworm and newer already use this new network manager. This tool makes extending your Wi-Fi a straightforward process.

Supplies

If you’re utilizing a Raspberry Pi without built-in Wi-Fi, two Wi-Fi dongles are necessary to follow this tutorial. For newer models with integrated Wi-Fi, a single dongle that supports AP Mode is still required. Most modern USB Wi-Fi adapters will support this mode, but we can check that this functionality is available as we progress through the tutorial.


Wi-Fi ( Amazon | SunFounder )

Preparing Your Raspberry Pi

Your first step is to ensure that your Raspberry Pi is running an updated operating system.

To update the package list cache and upgrade any out-of-date packages, use the following two commands.

sudo apt update
sudo apt upgrade

Once you have updated your Raspberry Pi, you should now connect it to the Wi-Fi network you want to extend if you haven’t done so already.

Getting the Wi-Fi Adapter Name

Because Network Manager is a core part of the Raspberry Pi operating system, setting up a Wi-Fi extender is relatively simple.

Our first step is to list the device names, so we know which device to set up to extend our Wi-Fi.

iwconfig

Below, you can see that we have two wireless LAN connections. The first is “wlan0“, which is already connected to our local network.

The second is the Wi-Fi adapter we are after, which is called “wlan1“. This device is currently not doing anything and is what we will use on our Raspberry Pi to extend the Wi-Fi network.

wlan0 IEEE 802.11 ESSID:"HOME_LINK"
Mode:Managed Frequency:2.412 GHz Access Point: 7A:45:58:1D:C3:39
Bit Rate=24 Mb/s Tx-Power=31 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:on
Link Quality=53/70 Signal level=-57 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:4 Invalid misc:0 Missed beacon:0


wlan1 IEEE 802.11 ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=36 dBm
Retry short long limit:2 RTS thr:off Fragment thr:off
Power Management:off

Before we rush too far ahead, let us ensure that the Wi-Fi adapter we are using can actually be set up as an access point.

We can check this by using the nmcli tool to check the “WIFI-PROPERTIES.AP” field.

Ensure that you replace “<DEVICE>” with the name of your Wi-Fi device. For example, we would replace it with “wlan1“.

nmcli -f WIFI-PROPERTIES.AP device show <DEVICE>

If your adapter supports being put in access point mode, you should see the following message, and you can continue with this tutorial.

WIFI-PROPERTIES.AP: yes

Enabling the Wi-Fi Extender on Your Raspberry Pi

Thanks to Network Manager, getting our Raspberry Pi to extend a Wi-Fi network is surprisingly simple. In fact, it can be done with a single command.

The manager will handle all the more complicated parts behind the scenes and automatically share any active internet connection.

Using the command below, you can put your Wi-Fi adapter into hotspot mode. You will need to insert some of your own data for this to work:

  1. <DEVICE>: Replace this with the name for your Wi-Fi adapter. In our case we would use “wlan1“.
  2. <SSID>: This is the SSID that your extended Wi-Fi will be broadcasted on.
  3. <PASSWORD>: The final placeholder is where you will set the password you want to use to access your extended Wi-Fi network.
sudo nmcli d wifi hotspot ifname <DEVICE> ssid <SSID> password <PASSWORD>

By running the following command, You can verify that your Wi-Fi is now being extended from your Raspberry Pi.

nmcli con show

If everything is working correctly, you should see a connection labeled “Hotspot” with the device being your Wi-Fi Adapter.

Hotspot 5decc82c-ee08-4785-a078-9ff98e780f6d wifi wlan1
HOME_LINK 0a083523-ce08-4620-9db9-883dd5db2efe wifi wlan0
lo caf89daa-aa9a-4f9e-9a82-fbc489a296d9 loopback lo
HOME_LINK 1 b3bf7b36-33b5-416a-9244-776ebcba1b1f wifi --

Troubleshooting Your Raspberry Pi Wi-Fi Extender

If you can’t connect to your Raspberry Pi’s extended Wi-Fi for some reason, you may have to try turning off the protected management frames feature.

This can cause issues when your Wi-Fi adapter doesn’t properly support the feature. Luckily, disabling it is as simple as using the following command.

sudo nmcli con modify Hotspot wifi-sec.pmf disable