Raspberry pi wifi repeater

3. Configuring the Raspberry Pi as a WiFi repeaterпѓЃ

These Raspberry Pi topics are outdated. Be sure to check more current sources. I’m keeping this information here for reference and hope to update it during 2022.

Here’s a quick-and-dirty test to get wifi-ethernet bridging working at the command line.

I completed this process on a RPi 3B running raspbian lite stretch. I am able to connect to the RPi AP using my MacBook Air and access the Internet with no issues. The same basic procedure may work with a 2nd interface in wifi station (client) mode, but I’ll have to do more testing.

I added an Edimax adapter that I used previously as an AP as wlan1 for this test. YMMV using other wifi adapters. The adapter to be used as your AP must support that function. Edit to substitute your own interface names as needed.

Additional work will be required to get everything to work on boot.

This procedure will disconnect any existing network connection on the Raspberry Pi, so you need to be on the Raspberry Pi console after step 2.

Install hostapd and brutils with:

Temporarily clear existing IP address on eth0 with:

Create the br0 bridge interface with:

Add the wlan1 and eth0 interfaces (or whatever your actual interface names are) to the bridge br0 with:

Bring up the br0 interface with:

Unplug and re-plug the Ethernet cable to get a new address for br0 from your dhcp server. Or:

Bring up hostapd with the properly configured hostapd.conf (see below) with:

Here’s my hostapd.conf :

Again, expect far better performance using a device intended for such use. The GLi routers with external antennas work very well, as do others. A wifi repeater with little range is painful to use.

The Raspberry Pi Forums and Blog are an invaluable aid for figuring out some of these steps on recent versions of raspbian.

Last edited on Aug 29, 2021. Last build on Aug 02, 2022.

3.1. Contact and feedbackпѓЃ

You can find me on Reddit where I lurk in many of the raspberry pi-related subreddits. You can email me directly at projects @ ttlexceeded . com

Источник

hklement/raspberry-pi-wi-fi-repeater

Use Git or checkout with SVN using the web URL.

Work fast with our official CLI. Learn more.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

Raspberry Pi Wi-Fi Repeater

Set up a Raspberry Pi to serve as a Wi-Fi repeater.

  1. Install Raspbian by adjusting and executing install-raspbian.sh
  2. Adjust iftab to match your Wi-Fi adapters’ MAC addresses
  3. Enter your existing Wi-Fi’s SSID and password in interfaces
  4. Set up the new access point’s SSID and password by adjusting hostapd.conf
  5. Copy all files to your Raspberry Pi and execute sudo install-packages.sh

About

Set up a Raspberry Pi to serve as a Wi-Fi repeater

Resources

Stars

Watchers

Forks

Releases

Packages 0

Languages

© 2022 GitHub, Inc.

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Источник

Raspberry pi wifi repeater

Raspberry pi as Wi-Fi repeater

This is a simple guide to set Raspberry pi as Wi-Fi repeater, I know there are many guides out there, including the official, but none of them worked 100% without modifications.

Based on: Linux raspberrypi 5.10.63-v7+ (Raspbian 10 buster)

In order to achieve our goal we will need to set up two separate interfaces, You will need additional Wi-Fi usb device or use the ethernet connection.

Let’s assume your home lan address is 10.0.0.0/24, We will extend this network using another lan at address 10.0.1.0/24.

This guide assumes the OS is a clean installation and running, with the Wi-Fi\ethernet interface to the router «10.0.0.0/24» is set up.

Automatic Installation via Ansible:

Execute from project root directory
(note for the , below, or the ip/dns will be considered a hosts inventory filename) the configured device ip from above example is 10.0.0.18

  • if updating country variable make sure country is a valid Alpha-2 code ISO 3166-1 country code
  • Custom access point CIDR can be provided by passing these variables: (view defaults)

options 1 OR 3 install example:

With option one/three you bridge eth0 wlan0 and probably connected to raspberry pi via LAN Ethernet cable (to ip 10.0.0.18 ), so only the configured access point name/pass should be provided (if not provided default ap_ssid_name and ap_ssid_pass will be set to nalkinscloud )

option 2 install example:

With option two/four you bridge wlan0 wlan1 and probably want to ssh to raspberry via the Wi-Fi interface ( 10.0.0.8 ), in this case you should manually set up wpa_supplicant as described below.
If you connected via ethernet cable (to lets say 10.0.0.37 ) update relevant ip host.
the ssid_name and ssid_pass should contain your home Wi-Fi access.

  • default password for pi user is: raspberry

When doing ip a you should have 4\3 interfaces, loopback, eth0 for lan cable connection, wlan0 is the onboard Wi-Fi and wlan1 is the usb Wi-Fi interface if connected.

wlan1 or eth0 will connect to your home LAN at 10.0.0.0/24
wlan0 will create a new network using 10.0.1.0/24, or it will extend your current 10.0.0.0/24 network if you choose to. then a bridge (br0) will bridge the interfaces.

for option 2 only set up (not needed when using eth0 connection to router), provide your home SSID and password sudo vi /etc/wpa_supplicant/wpa_supplicant.conf

Once raspberry was able to connect to the router (with internet access), do

Configure Access Point (hostapd)

type sudo vi /etc/hostapd/hostapd.conf And append

Execute sudo vi /etc/default/hostapd and replace line #DAEMON_CONF with

Ensure wireless operation (comply regulations)

Start the service

Configure DHCP (dhcpcd)

Configure sudo vi /etc/dhcpcd.conf

  • if setting extended network (option 3)
  • if setting routed network (option 1/2)

Restart the service sudo service dhcpcd restart

Add Extended Network

  • If setting an extended network (options 3/4):

Execute sudo vi /etc/network/interfaces.d/raspberry_interfaces and add

All set! clients not should be able to connect to the Wi-Fi network chosen at [AP_SSID] and get an IP address from extended router.

Add Routing — Repeater — only for routed network (options 1/2)

Set up the DHCP server (dnsmasq)

And append to above file

start the service

type sudo vi /etc/sysctl.conf and uncommon line:

Edit sudo vi /etc/rc.local and append above «exit 0» line

  • only if setting wlan1 append to /etc/network/interfaces.d/raspberry_interfaces file:

Then sudo reboot

© 2022 GitHub, Inc.

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Источник

ArieLevs/Raspberry-WiFi-Repeater

Use Git or checkout with SVN using the web URL.

Work fast with our official CLI. Learn more.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

Raspberry pi as Wi-Fi repeater

This is a simple guide to set Raspberry pi as Wi-Fi repeater, I know there are many guides out there, including the official, but none of them worked 100% without modifications.

Based on: Linux raspberrypi 5.10.63-v7+ (Raspbian 10 buster)

In order to achieve our goal we will need to set up two separate interfaces, You will need additional Wi-Fi usb device or use the ethernet connection.

Let’s assume your home lan address is 10.0.0.0/24, We will extend this network using another lan at address 10.0.1.0/24.

This guide assumes the OS is a clean installation and running, with the Wi-Fi\ethernet interface to the router «10.0.0.0/24» is set up.

Automatic Installation via Ansible:

Execute from project root directory
(note for the , below, or the ip/dns will be considered a hosts inventory filename) the configured device ip from above example is 10.0.0.18

  • if updating country variable make sure country is a valid Alpha-2 code ISO 3166-1 country code
  • Custom access point CIDR can be provided by passing these variables: (view defaults)

options 1 OR 3 install example:

With option one/three you bridge eth0 wlan0 and probably connected to raspberry pi via LAN Ethernet cable (to ip 10.0.0.18 ), so only the configured access point name/pass should be provided (if not provided default ap_ssid_name and ap_ssid_pass will be set to nalkinscloud )

option 2 install example:

With option two/four you bridge wlan0 wlan1 and probably want to ssh to raspberry via the Wi-Fi interface ( 10.0.0.8 ), in this case you should manually set up wpa_supplicant as described below.
If you connected via ethernet cable (to lets say 10.0.0.37 ) update relevant ip host.
the ssid_name and ssid_pass should contain your home Wi-Fi access.

  • default password for pi user is: raspberry

When doing ip a you should have 4\3 interfaces, loopback, eth0 for lan cable connection, wlan0 is the onboard Wi-Fi and wlan1 is the usb Wi-Fi interface if connected.

wlan1 or eth0 will connect to your home LAN at 10.0.0.0/24
wlan0 will create a new network using 10.0.1.0/24, or it will extend your current 10.0.0.0/24 network if you choose to. then a bridge (br0) will bridge the interfaces.

for option 2 only set up (not needed when using eth0 connection to router), provide your home SSID and password sudo vi /etc/wpa_supplicant/wpa_supplicant.conf

Once raspberry was able to connect to the router (with internet access), do

Configure Access Point (hostapd)

type sudo vi /etc/hostapd/hostapd.conf And append

Execute sudo vi /etc/default/hostapd and replace line #DAEMON_CONF with

Ensure wireless operation (comply regulations)

Start the service

Configure DHCP (dhcpcd)

Configure sudo vi /etc/dhcpcd.conf

  • if setting extended network (option 3)
  • if setting routed network (option 1/2)

Restart the service sudo service dhcpcd restart

Add Extended Network

  • If setting an extended network (options 3/4):

Execute sudo vi /etc/network/interfaces.d/raspberry_interfaces and add

All set! clients not should be able to connect to the Wi-Fi network chosen at [AP_SSID] and get an IP address from extended router.

Add Routing — Repeater — only for routed network (options 1/2)

Set up the DHCP server (dnsmasq)

And append to above file

start the service

type sudo vi /etc/sysctl.conf and uncommon line:

Edit sudo vi /etc/rc.local and append above «exit 0» line

  • only if setting wlan1 append to /etc/network/interfaces.d/raspberry_interfaces file:

Then sudo reboot

About

Guide to set raspberry pi as wifi access point — bridge

Источник

mrtejas99/wifi-extender

Use Git or checkout with SVN using the web URL.

Work fast with our official CLI. Learn more.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

Truly WiFi Extender

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 Hackaday
View my project on Instructables Instructables
View my project on Hackster Hackster

  • Introduction https://youtu.be/tyZ15xqk08U
  • Part 1: Lear now to create SD card for Raspberry pi https://youtu.be/X_9TC716-sc
  • Part 2: The implementation https://youtu.be/C-TJQ4UkSpk
  • Part 3: Installing the webUI ,its dependencies and demonstration https://youtu.be/yaaoag_H_WI
  • If you want to check how to set up a web UI to take SSID and Password from the user, check this webUI
  • If you want to check how to set up WiFi extender by simply running a script(THE EASY WAY), check this page Script

For flashing the image onto the SD card I have used BalenaEtcher

  1. Download the raspbian lite .iso file from the Raspberry Pi website
  2. Once downloaded, open BalenaEtcher, select the .iso file, select the SD card and click the flash button and wait for the process to finish.
  3. Then, open the boot partition and inside it, create a blank text file named ssh with no extension.
  4. Finally, create another text file called wpa_supplicant.conf in the same boot partition and paste the following content.

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.

Setting up systemd-networkd

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 .

  1. Prevent the use of dhcpd
    Note: It is required to run as root
  1. Use the inbuilt systemd-networkd
  1. Create a new file using the command.
  1. Add the following content and save the file by pressing Ctrl X , Y and Enter

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.

  1. Give the user read, write permissions to the file
  1. Restart wpa_supplicant service

wlan1 as client

  1. Create a new file using the command.
  1. Add the following content and save the file by pressing Ctrl X , Y and Enter

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.

  1. Give the user read, write permissions to the file

Источник

Adblock
detector