Case study
ESP32 4G hotspot
ESP-IDF firmware for a LilyGo A7670 board that brings up a cellular data session and shares it as a Wi-Fi access point for nearby devices.
4G modem → PPP → ESP32 softAP → phones and nodes
- Record
- Public repository
- Stack
- ESP-IDF, A7670, PPP, Wi-Fi
- Hardware
- LilyGo TTGO-A7670
- Links
- GitHub
The problem
A cluster of sensors, or a laptop on a site with no broadband, still needs a normal Wi-Fi network. The uplink is the modem. The ESP32’s job is to get a data session and then behave like an access point.
What I built
An ESP-IDF example aimed at the LilyGo TTGO-A7670, written against IDF 5.0.1 in the repository notes. The firmware powers the modem, starts PPP, waits for an IP address, and then brings up a Wi-Fi softAP. The repository’s own note says the SSID is hidden.
The log in the README shows the order that matters: modem off, modem on, signal quality, PPP connected, then wifi_init_softap. Nearby devices join that AP and use the cellular link.
Decisions
PPP is the packet path from the modem into the ESP32 network stack. The softAP is only started once that link has an address, so the hotspot is not advertising a network that goes nowhere.
This repository is a hotspot example for that module, with menuconfig for the gateway product and modem. I am not publishing the sample SSID or password from the log.
Where it fits
The same modem family shows up in the SMS-to-Azure relay and in the HiveMQ Protobuf project. This one is the “share the 4G link” build.