January 4, 2023

DIY WiFi Repeater with an ESP8266: A Step by Step Guide


 

The ESP8266 is a low-cost, low-power microcontroller with built-in WiFi support. It was originally developed by Espressif Systems as a solution for offloading WiFi networking functions from more expensive, power-hungry microprocessors.

An ESP8266 WiFi repeater, also known as a WiFi range extender, takes an existing WiFi signal and rebroadcasts it to create a second network. This can be used to extend the range of a WiFi network, or to provide wireless connectivity to devices that are out of range of the main network.

 

To set up an ESP8266 WiFi repeater, you will need:

 

  • An ESP8266 development board, such as the NodeMCU or Wemos D1 mini or Lolin
  • A USB data cable, to power the ESP8266
  • The Arduino IDE software, which you can download for free from the Arduino website (https://www.arduino.cc/en/Main/Software)

 

1] First you need to configure the ESP8266 in the Arduino IDE, follow these steps:

  1. Download and install the Arduino IDE from the Arduino website (https://www.arduino.cc/en/Main/Software).
  2. Connect your ESP8266 development board to your computer using a USB cable.
  3. Open the Arduino IDE and go to "File" > "Preferences".
  4. In the "Additional Board Manager URLs" field, enter the following URL: http://arduino.esp8266.com/stable/package_esp8266com_index.json
  5. Click "OK" to close the Preferences window.
  6. Go to "Tools" > "Board: " > "Boards Manager...".
  7. In the Boards Manager, search for "esp8266" and click on the "Install" button for the "esp8266" entry.
  8. Wait for the installation to complete, then close the Boards Manager window.
  9. Go to "Tools" > "Board: " and select your ESP8266 board from the list. The exact board name will depend on the specific ESP8266 development board you are using.
  10. Go to "Tools" > "Port" and select the COM port for your ESP8266. The COM port should appear as "USB-SERIAL CH340 (COMxx)" or "FT232R USB UART (COMxx)".

 

2] After configuration, Copy and paste the following code into the Arduino IDE, replacing "your_ssid" and "your_password" with the SSID and password of your existing WiFi network:

 

#include 
 //Replace Your Router's SSID and password.

const char * ssid = "your_ssid";
const char * password = "your_password";

// Replace ESP Wifi SSID and Password

const char * ssid_soft_ap = "ESPRepeater";
const char * pwd_soft_ap = "Pass@12345"
int Wifi_SoftAP_Channel = 9;

// Rename ESP name to find easily on your router

const char * espHostname = "ESPRepeater";
void setup() {
  WiFi.mode(WIFI_AP_STA);
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    WiFi.hostname(espHostname);
    delay(500);
  }
  WiFi.softAP(ssid_soft_ap, pwd_soft_ap, Wifi_SoftAP_Channel);
}
void loop() {}

 

3] Click the "Upload" button to upload the code to the ESP8266.

 

4] Once the code has been uploaded, open the serial monitor in the Arduino IDE. The ESP8266 should connect to your existing WiFi network and display its IP address.

 

5] Connect a device to the ESP8266's WiFi network and verify that it is able to connect to the internet.

 

That's it! Your ESP8266 should now be functioning as a WiFi repeater, rebroadcasting the signal from your existing WiFi network and providing wireless connectivity to devices that are out of range.

Also Read -

How to create a ESP8266 Wi-Fi Deauthenticator in just $4

How to do rogue AP attack in Linux using WifiPumpkin3 

Enable monitor mode in linux without disconnecting Wi-Fi

0 comments:

Post a Comment

If you have any problem regrading this post, leave a comment !