The market is full of affordable routers that can be configured as WiFi bridges or repeaters. However, there is an even more compact and economical alternative: using an ESP32 module. The firmware developed by "dchristl" turns any ESP32 into a mini NAT router, ideal for establishing basic wireless connections in (almost) any corner of the home.
Many electronics projects require a stable Internet connection. The wireless weather clock we explored earlier is a good example, as it gets all its data from the weatherapi.com service. What those projects don't need is an ultra-high-speed connection or full access to our main network. A few megabits are more than enough, and that's how we arrive at the mini NAT router for ESP32 modules created by "dchristl" on GitHub.
Turn your ESP32 into a mini NAT router
The project is a fork of the "ESP32 NAT Router" by martin-ger, but with a more intuitive interface and additional functions. Another positive aspect is that we don't have to wrestle with code: the firmware is downloaded directly as a .bin file from the Releases section on GitHub, and to "flash" its contents onto the ESP32, we use the official ESPRESSIF tool compatible with Windows. In total, the requirements are five:
- Some ESP32 module (NodeMCU clones cost less than 11 euros)
- A quality micro USB cable to connect the ESP32 to the computer
- The driver for the CH340/341 module (not all systems need it, but it's available here)
- The firmware for the mini NAT router (in versions ESP32, ESP32-C3 and ESP32-S2)
- The ESPRESSIF flasher (available here, select the correct ESP model)
The instructions for writing the firmware to the ESP32 on Windows are very simple: connect the module to the computer, open the flasher, mark the first field and select the firmware, enter 0x0 in the address field, verify that the flasher configuration is the same as in the image, select the correct serial port for the ESP32, and press Start. In a matter of seconds, the mini router will be ready, and it should appear in the WiFi network list as "ESP32_NAT_Router".
Initially, the network will be "open" due to the lack of a password, but once we connect to it, the configuration menu's address is 192.168.4.1. The "AP Settings" field defines the router's SSID and password, "STA Settings" is used to set the network it should connect to, "WiFi Scan" searches for nearby networks (more on this below), and "Advanced" enables advanced parameters such as changing the DNS server, Keep-Alive, and replacing the MAC address.
The two most important limitations of this ESP32 mini router are network scanning and performance. Since the client cannot scan and stay connected at the same time, the module essentially reboots when we use the WiFi Scan option. And if you expect to access the full bandwidth of the wireless network... that's not going to happen. Under optimal conditions, an ESP32 can achieve about 15 megabits per second, however, in real environments it's about 3-5 Mbps. That's very little for a 4K YouTube session, but if you plan to receive notifications or browse lightly, this will work for you.
Official website and downloads: Click here