I am currently involved in a project that integrates the ESP32-S3 with the EC200U 4G LTE modem, communicating over UART pins. The objective is to develop a functional dongle that enables devices to connect to the same network with internet access.
While I am able to successfully activate the PPP connection and set up NAT succesfully, I am encountering an issue when devices connect to the ESP32’s Soft AP. Specifically, the PPP connection on the EC200U drops, after connecting a device to esp32s3 soft-ap via NAT.
I have successfully ping -ed the module from esp32s3 via AT command, however, devices connected to the Soft AP are unable to access the internet.
I have attached the output from the ESP-IDF (imagepdperror.png) for your reference. Below are the module informations
- Module: EC200U-CN
- Firmware Version: EC200UCNAAR03A09M08
- Simcard : VI
Could you kindly provide insight into why the PPP connection is dropping when connecting a device to the Soft AP? Despite being able to ping the EC200U through AT commands in beginning , no internet access is available through NAT connection. Any insights regarding the firmware issues or additional configurations in the module would be greatly appreciated.
In addition, I would like to inquire whether the PPP connection is managed by Quectel in this module through a seperate AT command designed for Quectel, or if I need to handle it from the ESP32-S3 side by utilizing LwIP for the connection setup.
Here is the code snippets as well as image of the error (imagepdperror.png):
void uart_init()
{
uart_config_t uart_config = {
.baud_rate = UART_BAUD_RATE,
.data_bits = UART_DATA_8_BITS,
.parity = UART_PARITY_DISABLE,
.stop_bits = UART_STOP_BITS_1,
.flow_ctrl = UART_HW_FLOWCTRL_DISABLE
};
ESP_ERROR_CHECK(uart_param_config(UART_NUM, &uart_config));
ESP_ERROR_CHECK(uart_set_pin(UART_NUM, PIN_TX1, PIN_RX1, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE));
ESP_ERROR_CHECK(uart_driver_install(UART_NUM, UART_BUF_SIZE * 2, 0, 0, NULL, 0));
}
static uint32_t ppp_output_callback(ppp_pcb *pcb, uint8_t *data, uint32_t len, void *ctx)
{
int output_data = uart_write_bytes(UART_NUM, (const char *)data, len);
uart_wait_tx_done(UART_NUM, 100 / portTICK_PERIOD_MS);
return output_data;
}
static void ppp_status_cb(ppp_pcb *pcb, int err_code, void *ctx)
{
struct netif *pppif = ppp_netif(pcb);
if (err_code == PPPERR_NONE)
{
ppp_connected = true;
ESP_LOGI("PPP", "Connected! IP: " IPSTR, IP2STR(&pppif->ip_addr.u_addr.ip4));
// Delay NAT enabling to ensure Wi-Fi is ready
vTaskDelay(pdMS_TO_TICKS(2000));
enable_nat();
}
else {
ESP_LOGE("PPP", "Disconnected, error code: %d", err_code);
}
bool start_ppp_connection()
{
ESP_LOGI("PPP", "Initializing PPP connection...");
// Create the PPP control block and attach it to netif
ppp = pppapi_pppos_create(&ppp_netif, ppp_output_callback, ppp_status_cb, NULL);
if (!ppp) {
ESP_LOGE("PPP", "Failed to create PPP");
return false;
}
pppapi_set_default(ppp); // Set PPP as the default network interface
pppapi_connect(ppp, 0); // Start PPP connection
return true; // Successfully started PPP
}
Thank you in advance for your assistance. I look forward to your response.





