How to Install an ESP32 NAT Router Config on an M5NanoC6
A friend told me about a firmware called esp32_nat_router_extended, and it turns out you can turn an ESP32 into a cheap, low-power 2.4 GHz travel router pretty easily. Here’s how I got it running on my M5NanoC6 (ESP32-C6) from macOS.
1. Create a Python virtual environment
python3 -m venv esp32-nat
cd esp32-nat
source bin/activateUsing a venv keeps macOS’s system Python clean and avoids PEP 668 pip restrictions.
2. Install esptool inside the venv
pip install pyserial esptoolThis gives you the flashing tool without touching system packages.
3. Download the ESP32-C6 firmware
The original esp32_nat_router repo does not provide ESP32-C6 binaries, but the extended project does:
👉 Releases:
https://github.com/dchristl/esp32_nat_router_extended/releasesFor the M5NanoC6, download the latest full build:
esp32c6nat_extended_full_v7.2.0.zipUnzip it and place the .bin file into:
~/esp32-nat/bin/esp32c6nat_extended_full_v7.2.0.binWhat the filenames mean
- …full… — contains bootloader + partitions + firmware.Use this for the first flash.
- …update… — incremental firmware-only packages for devices already running the extended version (OTA/web UI). Not suitable for a clean flash.
4. Put the M5NanoC6 into USB flash mode
- Hold the BOOT button (GPIO9)
- Plug the device into your Mac over USB-C
- Release the button once connected
Check the serial port:
ls /dev/cu.*You should see something like:
/dev/cu.usbmodem2101That’s your device.
5. Flash the firmware (ESP32-C6 uses a single combined image)
From inside your working directory:
esptool --chip esp32c6 \
-p /dev/cu.usbmodem2101 \
--before default-reset --after hard-reset write-flash \
-z --flash-size detect \
0x0 bin/esp32c6nat_extended_full_v7.2.0.binIf you see “Hash of data verified,” the flash succeeded.
6. Connect & configure the router
After rebooting, the M5NanoC6 broadcasts a Wi-Fi network:
ESP32_NAT_Router
Connect to it and open:
http://192.168.4.1Configure:
- STA (upstream) Wi-Fi SSID + password
- SoftAP (your private network) SSID + password
Save & reboot.
Even though the ESP32-C6 supports Wi-Fi 6, the NAT router firmware only operates a 2.4 GHz AP.
Summary
This takes about five minutes and turns a $6 ESP32 board into something genuinely useful: a pocket-sized NAT router with a private SSID, surprisingly useable 2.4 GHZ range, and low power draw. I wouldn’t rely on it as a full replacement for a more capable, multi-band travel router, but it definitely has its place. Especially, when all you need is to extend Wi-Fi to a low-bandwidth device.