MQTT 4G Module with ESP32 User Manual
In this article, I will guide you to connect ESP to a 4G module using the PPPoS protocol
With the use of the PPPoS protocol, the SIM module will act as a network driver just like Wi-Fi and Ethernet.
1. Connect
| ESP32 | Module SIM |
| 5V | Vin |
| GND | GND |
| GPIO 17 (MCU-TX) | RX |
| GPIO 16 (MCU-RX) | TX |
| GPIO 15 (MCU-RX) | PEN (Power Enable) |
2. Sample code
ESP32 ESP-IDF:
- Using the ESP-IDF library
- Tested on SIM series A7670C, A7600C1, SIM7600CE, Quectel EC600S-CN
- Supports MQTT(S) connection
- Supports saving configurations to memory
- https://github.com/TDLOGY/esp32_pppos
ESP32 Arduino:
- Using the arduino library
- Tested on SIM series A7670C, A7600C1, SIM7600CE, Quectel EC600S-CN
- Supports MQTT(S) connection
- SSL connection support
- https://github.com/TDLOGY/esp32_pppos_arrduino
3. Test
I use ESP-IDF to test the connection to the mqtt server test.mosquitto.org:1883
Directions for use:
