2

Context:

I have a raspberry pi working properly with its version of Raspian (actually I have all the Raspberry Pi version, all).

The problem to solve:

The wifi where I work does not reach every place in the office. The idea is to use a Raspberry as a bridge for extending the wifi range (please note that I am not even sure that the right word to use is bridge. If not, please correct me).

Questions:

  1. is it possible to solve the problem with the solution I am proposing?
  2. Should I use two different wifi antennas? (of course, I have more than one if necessary)
  3. is there a standard procedure (or a ready-to-use OS) for that purpose? any advice or suggestions on how to do that?
  4. additionally, can I connect this raspberry to a switch in order to provide internet access to other systems connected via eth?
Leos313
  • 125
  • 1
  • 6
  • 1
    This may be possible if you add an extra wifi adapter or can connect the pi via ethernet, but it's silly: You can buy a ready-made, no fuss, built for the purpose wireless access point for less than half the price of most Raspberry Pi models (and it will come with its own power supply, and does not require a SD card or more than 5 minutes to configure). – goldilocks Dec 06 '19 at 18:14
  • I have many raspberry pi. It can save the life when you cannot go to bay anything. The most important thing: learning something new (and useful). These are a few reasons that run in my mind right now :) moreover: a fully configurable system, all open source :) – Leos313 Dec 06 '19 at 18:51

3 Answers3

4

Try this tutorial: Start with a clean install of the latest release of Raspbian (currently Buster). Raspbian Buster Lite is recommended.

Update Raspbian, including the kernel and firmware, followed by a reboot:

sudo apt-get update
sudo apt-get dist-upgrade
sudo reboot

Set the WiFi country in raspi-config’s Localisation Options: sudo raspi-config

If you have an older Raspberry Pi without an onboard WiFi chipset, the Edimax Wireless 802.11b/g/n nano USB adapter is an excellent option – it’s small, cheap and has good driver support. With the prerequisites done, you can proceed with either the Quick installer or Manual installation steps below.

Quick installer

Install RaspAP from your RaspberryPi’s shell prompt:

curl -sL https://install.raspap.com | bash

The installer will complete the steps in the manual installation (below) for you.

After the reboot at the end of the installation the wireless network will be configured as an access point as follows:

IP address: 10.3.141.1
Username: admin
Password: secret
DHCP range: 10.3.141.50 to 10.3.141.255
SSID: raspi-webgui
Password: ChangeMe

Note: As the name suggests, the Quick Installer is a great way to quickly setup a new AP. However, it does not automagically detect the unique configuration of your RPi. Best results are obtained by connecting an RPi to ethernet (eth0) or as a WiFi client, also known as managed mode, with wlan0. For the latter, refer to this FAQ. Please read this before reporting an issue.

Simultaneous AP and Wifi client

RaspAP lets you easily create an AP with a Wifi client configuration. With your RPi configured in managed mode, enable the AP from the Advanced tab of Configure hotspot by sliding the Wifi client AP mode toggle. Save settings and start the hotspot. The managed mode AP is functional without restart.

Note: For a Raspberry Pi operating in managed mode without an eth0 connection, this configuration must be enabled before a reboot.

https://raspap.com/

LegendusMaximus
  • 263
  • 3
  • 17
3

You have many questions and as you see there are many answers. Btw. you cannot bridge a WiFi client connection. It is not supported by the on board WiFi chip. For further information about this issue you can look at Raspberry Pi WiFi to Ethernet Bridge for a server?.

If you like to look at handmade solutions for Raspberry Pi you can look for

If you use an additional WiFi dongle that supports WDS with 4addr then it may also be possible to real bridge (OSI layer 2) the client uplink with the access point but the dongle must be compatible to this with your office router. With the other solutions you have to use routing, that means you have different subnets. Clients connected to the Access Point use a different ip address range than that from your office network.

Ingo
  • 42,107
  • 20
  • 85
  • 197
  • All the answers are good answers and I voted up. With your answer, it was possible to have a wider view on what is going on, what is possible to do (or not) and why. In the links also many key words to use in the right context! – Leos313 Dec 16 '19 at 20:28
2

Try following this tutorial.

I have something like this in my house to extend the WiFi coverage. I don't recall if I followed this exact tutorial, but these are the basic steps that I followed. I will paste the major steps from the tutorial here:

Step 1: Install and update Raspbian
Step 2: Install hostapd and dnsmasq
Step 3: Configure a static IP for the wlan0 interface
Step 4: Configure the DHCP server (dnsmasq)
Step 5: Configure the access point host software (hostapd)
Step 6: Set up traffic forwarding
Step 7: Add a new iptables rule
Step 8: Enable internet connection
Step 9: Reboot

Follow the tutorial and post questions here if you encounter any problems. This can be a good learning experience. One advantage to using a Pi as an access point is that you can install utilities like iftop to monitor what is using your WiFi bandwidth. You can also perform packet captures using tcpdump.

HeatfanJohn
  • 3,125
  • 3
  • 24
  • 36