Close
0%
0%

Truly WiFi Extender

A WiFi repeater built around Raspberry Pi under 10 US$ and fully customizable

Public Chat
Similar projects worth following
A WiFi repeater built around Raspberry Pi under 10 US$

Introduction

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.

Hardware

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.

Software

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

webui.zip

Files for enabling WebUI

x-zip-compressed - 68.20 kB - 07/03/2020 at 15:17

Download

  • 1 × Raspberry Pi Zero W The Raspberry Pi is a popular Single Board Computer (SBC) in that it is a full computer packed into a single board.
  • 1 × USB WiFi Adapter

  • Added backend server to the UI

    Tejas Lotlikar07/02/2020 at 17:38 0 comments

    This webUI is specifically designed to dynamically connect to a WiFi AP using the browser.

    Usage

    1. Connect to Access point created by the Raspberry Pi.
    2. Open up a browser and navigate to http://raspberrypi.local:5000
    3. Fill up the SSID and the psk
    4. Click the connect button. Wait for some time(2-3 minutes). Pi will restart itself and now it is good to go!

    Dependencies

    How to use

    • Navigate to the webui directory using cd webui
    • Run the command sudo python app.py

    You can set the server to auto-start on boot using systemd

  • Autostart server on boot

    Tejas Lotlikar07/01/2020 at 19:09 0 comments

    So, for simplicity of naive users, i will be running a web server(flask, to be precise) in which we need to input the SSID and psk of to AP to which we want to connect. Server still in development. systemd service is ready

    • Create a file called server.service using cd sudo nano /lib/systemd/system/server.service
    • Add the following contents to the file
    • [Unit] 
      Description=WiFi conf server 
      After=multi-user.target
      
      [Service] 
      Type=idle 
      ExecStart=/usr/bin/python3 /home/pi/webui/app.py
       
      [Install] 
      WantedBy=multi-user.target
      
    • Enable the service using sudo systemctl enable server
    • Start the service using sudo systemctl start server

  • Improved the UI for responsiveness

    Tejas Lotlikar07/01/2020 at 05:11 0 comments

    Used responsive framework to desgn the captive portal

  • Designed the web-ui for the wifi repeater

    Tejas Lotlikar06/30/2020 at 18:20 0 comments

    I noticed that it will not be feasible to change the wifi-supplicant file every time when you want to connect to a new wireless AP, so i am developing a method to connect right through the browser.  Started out late with this idea. Just finished the UI

View all 4 project logs

  • 1
    Prerequisites

    Prerequisites

    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 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.

    • Power on the Raspberry pi. To find its IP, you can use a tool like Angry IP Scanner and scan the subnet,
    • 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.
    • Finally, update the package list and upgrade the packages and reboot Pi.
    sudo apt update -y
    sudo apt upgrade -y
    sudo reboot
  • 2
    Setting up 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.

    • Prevent the use of dhcpd 
    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
  • 3
    Configuring wpa-supplicant

    wlan0 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  CtrlXY and 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

View all 5 instructions

Enjoy this project?

Share

Discussions

Abdullah wrote 07/03/2020 at 10:23 point

This is impressive, Absolutely love this kind of projects!

Keep going :)  

Abdul

  Are you sure? yes | no

Tejas Lotlikar wrote 07/05/2020 at 12:24 point

Thank you Abdullah.

  Are you sure? yes | no

Kosma wrote 06/30/2020 at 19:57 point

not trull, no power no truly

  Are you sure? yes | no

yanyan sukhoi wrote 07/01/2020 at 13:11 point

haha

  Are you sure? yes | no

Sameera shaikh wrote 06/30/2020 at 16:25 point

Nice idea You could have 3d printed a case. Does it work only on Raspberry pi zero?

  Are you sure? yes | no

Tejas Lotlikar wrote 07/05/2020 at 12:25 point

Nice suggestion. I do not know much about designing those 3D printed cases. Hope to learn soon

  Are you sure? yes | no

adam smith wrote 06/29/2020 at 08:16 point

This is a good alternative to chinese wifi repeater. Avoid chinese stuff.

  Are you sure? yes | no

bisedi3020 wrote 06/29/2020 at 08:04 point

Awesome project. This is the best use of a pi zero. You surely deserve an award!

  Are you sure? yes | no

Tejas Lotlikar wrote 06/30/2020 at 12:50 point

Thank you!

  Are you sure? yes | no

aamccurdy wrote 05/29/2020 at 18:36 point

I've got it running on an RPi 3B+. Tested with 3 connected devices. Ran Prime video, Netlix and Speedtest on Chrome. I bought a commercial range extender last year and find the Truly extender to be much easier to set up. I'm looking forward to testing in our camper with the park wifi. Thanks for putting this together!

  Are you sure? yes | no

Tejas Lotlikar wrote 06/03/2020 at 19:24 point

That's nice, thanks for the kind words!

  Are you sure? yes | no

Starhawk wrote 05/10/2020 at 17:08 point

Could this work with one end being eg a 4g modem?

The short version of why I'm asking, is that I know someone who can't afford cable TV and so they livestream from various online sites for several hours a day (hey, you do what works) but the only even half-decent Internet they've historically been able to get is through a mobile provider, and their equipment is *extraordinarily* old. I'm trying to help them move to a new ISP -- the local cable company recently got way better -- but they're extremely not-technical and have a hard time with this stuff, and of course what they have works (sort of) right now, so they're dragging their feet.

Details on the PM/chat side, if you're interested... ;) just poke me.

  Are you sure? yes | no

Starhawk wrote 06/04/2020 at 01:26 point

*poke* *prod* *poke*

You know, while I often talk to myself (so sue me, it helps me cope with living alone) in this context it's really not all that useful...

...especially since I'm trying to talk to someone else and either I've not been heard or I'm being ignored :-/

  Are you sure? yes | no

Tejas Lotlikar wrote 06/05/2020 at 10:07 point

As long as the 4G modem has WiFi connectivity, sure this project will work

  Are you sure? yes | no

Tejas Lotlikar wrote 04/30/2020 at 18:10 point

@Dan Maloney   Yes. I had tried installing openmediavault on pi zero some time back. But i got some php5 error while installing. So i had to download the .deb file and install it manually. 

here is the link for the package http://omv-extras.org/debian/pool/main/p/php5-pam/php5-pam_1.0.3-2_armhf.deb and installl it using sudo dpkg -i php5-pam_1.0.3-2_armhf.deb

  Are you sure? yes | no

Dan Maloney wrote 04/30/2020 at 15:49 point

Good idea. Do you think the Pi could serve other duties in addition to being a repeater? Like maybe serving as a NAS or something like that?

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates