|
| 1 | +# ESP32-NAT Router + |
| 2 | + |
| 3 | +## Acknowledgments |
| 4 | + |
| 5 | +This project builds upon the works of *Martin-Ger's* [ESP32 NAT Router](https://github.com/martin-ger/esp32_nat_router) and *Sam Denty's* [Wi-PWN](https://github.com/samdenty/Wi-PWN) for the UI design. However, other sources have also provided inspiration and contributed to the development of this project, including: |
| 6 | + |
| 7 | +- [@Kevin Wolfe](https://gitlab.com/kevinwolfe) (who provided OTA and other useful resources) |
| 8 | +- [@nopnop2002](https://github.com/nopnop2002) (Cjson Doc and Examples) |
| 9 | +- [@dchristl](https://github.com/dchristl) (whose work and ideas) |
| 10 | + |
| 11 | +## Features |
| 12 | + |
| 13 | +The features of the project, which includes: |
| 14 | + |
| 15 | +- Providing a user-friendly UI with mobile support for easy accessibility |
| 16 | +- Displaying connected states and quality in the UI for transparency |
| 17 | +- Scanning for available APs to enhance network connectivity |
| 18 | +- Allowing users to disable or enable the on-board indicator LED |
| 19 | +- Incorporating a button menu (accessible via Boot or EN button) |
| 20 | +- Custom DNS server for personalized settings |
| 21 | +- Incorporating a secure web interface with basic authentication method |
| 22 | +- Offering OTA updates for easy maintenance and functionality enhancements |
| 23 | +- Randomize MAC address |
| 24 | +- Switch Between Dark and Light mode. (through settings) |
| 25 | +- Auto reload pages when connected to Router |
| 26 | +- and many more........... |
| 27 | + |
| 28 | +## First Boot |
| 29 | + |
| 30 | +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. |
| 31 | + |
| 32 | +## Web Config Interface |
| 33 | + |
| 34 | +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 |
| 35 | + |
| 36 | +"[http://192.168.4.1](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: |
| 37 | + |
| 38 | +<!--  --> |
| 39 | + |
| 40 | +To configure the uplink WiFi network, follow these steps: |
| 41 | + |
| 42 | +1. Go to "Settings" in the web interface of the ESP32 NAT Router |
| 43 | +2. Enter the appropriate values for the "STA Settings" section. If it is an open network, leave the password field blank |
| 44 | +3. Change the "AP Settings" and other customizations as necessary |
| 45 | +4. Click on the "Save" button to save the configuration |
| 46 | +5. Press the "Reboot" button located at the bottom right corner of the page (Nessory) |
| 47 | +6. Wait for the device to reboot |
| 48 | + |
| 49 | +Connect to the newly configured WiFi network with the updated settings. |
| 50 | +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. |
| 51 | + |
| 52 | +**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. |
| 53 | + |
| 54 | +<!--  |
| 55 | +
|
| 56 | + |
| 57 | + --> |
| 58 | + |
| 59 | +## Flashing the prebuild binaries |
| 60 | + |
| 61 | +- Download [latest release](https://github.com/gjroots/esp32_nats_router_plus/releases/latest) |
| 62 | + * Download esp32nat_Router+_vX.X.X.zip for fresh install |
| 63 | + * Download esp32nat_Router+_full_vX.X.X_0x0.zip for update |
| 64 | +- Install [esptool](https://github.com/espressif/esptool) |
| 65 | + |
| 66 | +### First install/ Reset (Terminal/CMD) |
| 67 | + |
| 68 | +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. |
| 69 | + |
| 70 | +Note: replace X.X.X with respective Version.(eg. ...._v1.0.0.bin) |
| 71 | + |
| 72 | +Unpack archive first and then execute: |
| 73 | + |
| 74 | +Single bin method (merged, 0x0): |
| 75 | + |
| 76 | +``` |
| 77 | +esptool.py write_flash 0x0 esp32nat_Router+_full_vX.X.X_0x0.bin |
| 78 | +``` |
| 79 | + |
| 80 | +Multi bin method: |
| 81 | + |
| 82 | +``` |
| 83 | +esptool.py --chip esp32 \ |
| 84 | +--before default_reset --after hard_reset write_flash \ |
| 85 | +-z --flash_mode dio --flash_freq 40m --flash_size detect \ |
| 86 | +0x1000 bootloader.bin \ |
| 87 | +0x8000 partitions.bin \ |
| 88 | +0x10000 esp32nat_Router+_vX.X.X.bin |
| 89 | +``` |
| 90 | + |
| 91 | +### Update from older version |
| 92 | + |
| 93 | +If this project was already installed. No data loss from previous version. |
| 94 | + |
| 95 | +``` |
| 96 | +esptool.py write_flash 0x10000 esp32nat_Router+_vX.X.X.bin |
| 97 | +``` |
| 98 | + |
| 99 | +If any problem occurs, erase flash manually before flashing: |
| 100 | + |
| 101 | +``` |
| 102 | +esptool.py erase_flash |
| 103 | +``` |
| 104 | + |
| 105 | +### OTA method : |
| 106 | + |
| 107 | +To perform an OTA update on the ESP32-NATS Router+, follow these steps: |
| 108 | + |
| 109 | +1. Go to the "Info" page in the web interface of the router |
| 110 | +2. Click on the "Update" button |
| 111 | +3. Select the desired bin file for the update |
| 112 | + |
| 113 | +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. |
| 114 | + |
| 115 | +### Alternative way/ Graphical (Windows only) |
| 116 | + |
| 117 | +As an alternative you might use [Espressif's Flash Download Tools](https://www.espressif.com/en/support/download/other-tools). |
| 118 | +Check the marked parameters and files like below (ckeck the COM-Port for your environment). |
| 119 | +Check the addresses like below: |
| 120 | + |
| 121 | + |
| 122 | + |
| 123 | + |
| 124 | +### or |
| 125 | + |
| 126 | + |
| 127 | + |
| 128 | +## Building the Binaries |
| 129 | + |
| 130 | +To build the binaries, please refer to the following guide: "[How to setup environment and build project](docs/Build_setup.md)" located in the "docs" folder. This guide outlines the necessary steps to set up the environment and build the binaries. |
| 131 | + |
| 132 | +## Advanced topics and configuration |
| 133 | + |
| 134 | +For more advanced configuration and topics, refer to the "[Advanced topics](docs/Advanced_topics.md)" 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. |
| 135 | + |
| 136 | +## Misc |
| 137 | + |
| 138 | +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. |
| 139 | + |
| 140 | +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. |
| 141 | + |
| 142 | +## License |
| 143 | + |
| 144 | +The software is released under the MIT License, which can be found in the file named "[LICENSE](LICENSE)". Additionally, any third-party source files included in the software will have their own license header. |
| 145 | + |
| 146 | +## Screenshots |
| 147 | + |
| 148 | +[<img src="docs/images/scan.png" alt="scan.png" width="700"/>](docs/images/scan.png) |
| 149 | + |
| 150 | +[<img src="docs/images/settings.png" alt="settings.png" width="700" height= "600"/>](docs/images/settings.png) |
| 151 | + |
| 152 | +[<img src="docs/images/info.png" alt="info.png" width="700"/>](docs/images/info.png) |
0 commit comments