Giter VIP home page Giter VIP logo

esp32_nat_router_plus's Introduction

ESP32-NAT Router +

This Firmware that helps you use the ESP32 as a WiFi router. You can use it to do a few things, like make your existing WiFi signal stronger, create a new WiFi network for guests or smart devices, or simplify a more complicated network. It can handle data at a speed of more than 15mbps.

Acknowledgments

This project builds upon the works of Martin-Ger's ESP32 NAT Router and Sam Denty's Wi-PWN for the UI design. However, other sources have also provided inspiration and contributed to the development of this project, including:

Features

The features of the project, which includes:

  • Providing a user-friendly UI with mobile support for easy accessibility
  • Displaying connected states and quality in the UI for transparency
  • Scanning for available APs to enhance network connectivity
  • Allowing users to disable or enable the on-board indicator LED
  • Incorporating a button menu (accessible via Boot button)
  • Custom DNS server for personalized settings
  • Incorporating a secure web interface with basic authentication method
  • Offering OTA updates for easy maintenance and functionality enhancements
  • Randomize MAC address
  • Switch Between Dark and Light mode. (through settings)
  • Auto reload pages when connected to Router
  • MAC Filter for added security
  • and many more...........

First Boot

Upon the first boot of the ESP32 NAT Router, a WiFi network with an open AP and an ssid of "ESP32_NAT_Router +" will be available. Users can configure the device using either a simple web interface or the serial console.

Web Config Interface

The ESP32 NAT Router has a web interface that allows you to configure all its parameters. To access this interface, connect your PC or smartphone to the WiFi SSID "ESP32_NAT_Router +". Once you're connected, open your web browser and enter

"http://192.168.4.1''ย  into the address bar of your browser. Once you have entered this, you will be prompted for a username and password. The default username is "admin" and the default password is "123456789". Please note that it is recommended to change these to a more secure username and password once you have logged in:

To configure the uplink WiFi network, follow these steps:

  1. Go to "Settings" in the web interface of the ESP32 NAT Router
  2. Enter the appropriate values for the "STA Settings" section. If it is an open network, leave the password field blank
  3. Change the "AP Settings" and other customizations as necessary
  4. Click on the "Save" button to save the configuration
  5. Press the "Reboot" button located at the bottom right corner of the page (Nessory)
  6. Wait for the device to reboot

Connect to the newly configured WiFi network with the updated settings. By following these steps, you can reconfigure the ESP32 NAT Router to connect to a new uplink WiFi network with customized settings based on your preferences.

Note: The 5th step is necessary to update certain settings on the device and apply them. Skipping this step may result in the settings not being properly applied, which can lead to issues with the device's functionality. Therefore, it is recommended to always complete the 5th step when making any changes to the device's settings in order to ensure that the device is functioning as expected and that any desired changes have been properly applied.

Flashing the prebuild binaries

  • Download latest release
    • Download esp32nat_Router+_vX.X.X.zip for fresh install (multi bin)
    • Download esp32nat_Router+_full_vX.X.X_0x0.zip for single bin (merged, 0x0)
  • Install esptool

First install/ Reset (Terminal/CMD)

Please note that if your device was previously used for other projects, or if you want to reset all settings from a previous version, executing the following steps will result in complete data loss.

Note: replace X.X.X with respective Version.(eg. ...._v1.0.0.bin)

Unpack archive first and then execute:

Single bin method (merged, 0x0):

esptool.py write_flash 0x0 esp32nat_Router+_full_vX.X.X_0x0.bin 

Multi bin method:

esptool.py --chip esp32 \
--before default_reset --after hard_reset write_flash \
-z --flash_mode dio --flash_freq 40m --flash_size detect \
0x1000 bootloader.bin \
0x8000 partitions.bin \
0x10000 esp32nat_Router+_vX.X.X.bin

Update from older version

If this project was already installed. No data loss from previous version.

esptool.py write_flash 0x10000 esp32nat_Router+_vX.X.X.bin 

If any problem occurs, erase flash manually before flashing:

esptool.py erase_flash

OTA method :

To perform an OTA update on the ESP32-NATS Router+, follow these steps:

  1. Go to the "Info" page in the web interface of the router
  2. Click on the "Update" button
  3. Select the desired bin file for the update

Please note that the OTA method only supports updating with a single bin file, such as "esp32nat_Router+_vX.X.X.bin". Updating with a full bin (merged to single bin 0x0) is not supported.

Alternative way/ Graphical (Windows only)

As an alternative you might use Espressif's Flash Download Tools. Check the marked parameters and files like below (ckeck the COM-Port for your environment). Check the addresses like below:

Single bin

or

multiple bin's

Building the Binaries

To build the binaries, please refer to the following guide: "How to setup environment and build project" located in the "docs" folder. This guide outlines the necessary steps to set up the environment and build the binaries.

Advanced topics and configuration

For more advanced configuration and topics, refer to the "Advanced topics" guide located in the "docs" folder. This guide covers topics such as configuring wireless protocols, setting up custom DNS servers working with OTA and other settings.

Misc

If you experience any issues or have any suggestions for new features, please feel free to ask or raise an issue. Please note that as this project is a spare time project, the creator may not be always available to answer queries promptly. However, if the creator is free, they will respond as soon as possible. Thank you for your understanding and patience.

If you are happy with the project and would like to support the creator, there are several ways to do so. One way is to contribute to the codebase or documentation. Alternatively, you can support the creator through by spreading the word about the project to others who may find it useful.

License

The software is released under the MIT License , which can be found in the file named "LICENSE". Additionally, any third-party source files included in the software will have their own license header.

Screenshots

scan.png

settings.png

info.png

esp32_nat_router_plus's People

Contributors

gjroots avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

esp32_nat_router_plus's Issues

Incorrect IP reported on the INFO page

Describe the bug
IP reported on the info page is not correct and is the same of the "gateway".

To Reproduce
Steps to reproduce the behavior:

  1. Open ESP32 NAT Router + web interface from browser.
  2. Click on INFO
  3. You can see that the IP reported in the "IP / gateway" row is not correct (and corresponds to the gateway).

Expected behavior
See the correct IP the "IP / gateway" in the INFO Page, I think the IP assigned to the ESP32 from the connected Internet AP Router.

Screenshots
As you can see, IP and "gateway" is the same.
image

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser chrome
  • Version 115.0.5790.171

Smartphone (please complete the following information):

  • Device: OPPO X3 Lite
  • OS: ColorOS 12
  • Browser stock browser, chrome

Additional context
From Android or Ipad or Desktop, no changes, bug still exist (I think is a ESP32 Router "backend" problem)

Can't change username/password in web UI

Have flashed this to a generic Devkit-C. Using Firefox on Linuxmint to configure. I get the same behaviour with Fennec on a smartphone.

When I try to change the admin username and/or password, then hit "SAVE", the screen flashes and the green tick comes up, but the fields are back to admin,123456789.

I seem able to set a static IP and other things just fine. Only the username and password are b0rked.

Feature Request: MAC Address Filtering

Is your feature request related to a problem? Please describe.
Your project looks awesome and incredibly interesting. One of the things I would like to use it for, is to connect older devices that don't support modern encryption (e.g. WPA2) to the internet, such as a Nintendo DS. However, currently, to make this work, you would have to create a completely open network, which is not ideal.

Describe the solution you'd like
Though of course not a true replacement for WPA2, it would be great if we could use MAC address filtering to regulate which devices may or may not connect to the network. This would allow the network to have some security, rather than none.

Describe alternatives you've considered
The only other alternative I could think of is only powering the ESP32 when it is actively in use. Still, when it's in use, anybody could still join the network, which is not ideal.

Additional context
https://en.wikipedia.org/wiki/MAC_filtering

Custom MAC adress

When I try to use a custom MAC Adress for the ESP (I guess it should be possible to do that) I can't acess the input box because something always adds a pointer-event:none to the box and I can not find where this comes from.
If it was planned that you can change the MAC to a custom value this could be a bug if it was not a planned feature see this issue as a feature request.

Show STA SSID on info page.

As per the title. The info page shows "Connected" and the signal strength with a pretty icon, but does not show the name of the access point.

Automesh - wifi range extender

Hi,
I would like to use esp32 as simple wifi range extender meaning no NAT and using the original SSID.
Would you consider adding automesh like in the esp8266 version from Martin-Ger.
Thanks

Limit Data Usage on ESP32 Network

Problem:

My router can't handle data limits well, and setting them for each device is a pain!

Idea:

Let users set data limits (e.g., 2GB per week) for devices on the ESP32 network. Once a device hits its limit, we can either:

  • Pause its internet access completely.
  • Slow it down to a crawl (configurable).

Limits would reset weekly/monthly (user defined).

Benefits:

  • Easier to manage data for each device, especially with new ones!
  • Less reliance on the router's limited controls.

ESP32C3 Version

Is your feature request related to a problem? Please describe.
I tried to change the version to ESP32C3 but couldn't manage to get anything but errors

Describe the solution you'd like
Could you please upload a compiled version for the ESP32C3?

Reset With a Pin/Button

Is there an option to reset with a Pin/Button, to avoid setting errors such as the reset button mostly on "routers or repeaters/extenders", please provide a solution, thank you in advance sir.

STA password with certain characters needs URL encoding in web i/f.

Thanks for the 1.1.3 release. Nice work!
On updating, I connected mine to another STA and noticed this...

STA password must have URL encoding if spaces or some other characters involved. Spaces must be replaced with %20, percent sign "%" with %25 etc. I have not tested which characters are problematic other than those cited here.

For example, connecting esp32_nat_router_plus to a STA, the password "This is a 100% good password." must be URL encoded thus "This%20is%20a%20100%25%20good%20password." for entry into the web interface.

Expected behaviour
In the above example, it should be possible to enter the password into the web interface without URL encoding.

Not a biggie once you know, and as long as you have reference available.

If not trivial to fix, maybe clues and a table of character->URL-encoded should be added in the web interface for 1.1.4

Building Firmware Failed

PltformIO : PLATFORM: Espressif 32 (6.x.x) failed to build firmware

this project currently supporting up to espidf 4.x.x, and with the release of espidf 5.x.x, some breaking changes have occurred.

To resolve this issue, you can change the Espressif 32 version in the platformio > platforms > embedded to version 5.x.x

or

[env:esp32dev]
platform = [email protected]
framework = espidf
board = esp32dev

In further update's solved this issue.

Static DHCP and possible web interface for port-forwards

Port forwarding cannot currently be configured via the web interface. Even with port-forwarding, unless using static IP allocated at the client, it's hard to pin down the addresses to forward ports of, and unclear what the DHCP range is to ensure safe allocation of static IPs which leads me to a potentially more important feature request:-

I would like to be able to allocate static IPs for at least a few of the DHCP clients. Having a web interface for such a feature would be nice too, but not essential. With static IPs, it would be easy to reserve addresses for manual configuration, or ensure specific DHCP clients are "findable" for port forward or other purposes.

Last one for today.. I promise :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.