Skip to content

esp_modem PPP Fails to Stay Connected or Transfer Data After Registration in CMUX Mode (BG600L, Quectel) (IDFGH-15866) #844

@michaelboeding

Description

@michaelboeding

Answers checklist.

  • I have read the documentation for esp-protocols components and the issue is not addressed there.
  • I have updated my esp-protocols branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

PPP Fails to Stay Connected or Transfer Data After Registration in CMUX Mode (BG600L, Quectel)

Setup

  • ESP-IDF Version: v5.2.1
  • esp-modem Tag: v1.4.0
  • Modem: Quectel BG600L
  • Mode: CMUX (AT+CMUX=0)
    • AT commands: DLCI 1
    • PPP data: DLCI 2

Issue Summary

  1. On boot, I often see a PPP_DISCONNECTED event immediately after trying to start the connection — even after waiting for +CREG: 0,1 or 0,5.
  2. Other times, PPP appears to connect and assigns an IP, but no data transfer works (MQTT and ping both fail indefinitely).
  3. Eventually, after many retries, registration stabilizes, but PPP does not reconnect automatically, and I never see the PPP_CONNECTED event again.

When it Works

Sometimes the system connects cleanly:

esp-netif_lwip-ppp: Connected
Modem Connect to PPP Server
IP          : 10.178.19.103
Netmask     : 255.255.255.255
Gateway     : 10.64.64.64
Name Server1: 100.127.0.53
Name Server2: 100.127.1.53

When it Fails

But on many boots, I see:

+CREG: 0,2
+QCSQ: "NOSERVICE"
esp-netif_lwip-ppp: Connection lost
BG600L: Modem Disconnect from PPP Server

Even after registering and getting a strong signal:

+CREG: 0,5
+COPS: 0,0,"AT&T",8
+QNWINFO: "eMTC","310410","LTE BAND 4",2000
+QCSQ: "eMTC",-75,-96,199,-9
MQTT Not connected to the broker
sendData() called but we are not connected to cellular

Observations

  • The PPP_DISCONNECTED event fires immediately on many boots.
  • I only start PPP after seeing successful registration (+CREG: 0,1 or 0,5).
  • The modem reports registration with an operator (+COPS) and signal strength via +QCSQ and +QNWINFO.
  • Despite this, data transfer fails or stalls silently.
  • There is no retry of PPP connection by esp-modem after disconnection.
  • This happens regardless of whether esp_modem_start_ppp() returned ESP_OK.

Questions

  1. Is the PPP_DISCONNECTED event on boot expected behavior in CMUX mode?
  2. Should I wait for a specific URC or PDP context activation (e.g., AT+CGACT) before starting PPP?
  3. Does esp-modem automatically reconnect to PPP after a disconnect in CMUX mode?
  4. What’s the recommended way to detect that PPP is truly ready for data (besides ESP_OK)?
  5. Is there a clean or recommended way to manually recover and re-initiate a PPP session after it has disconnected?
  6. What specific modem states (e.g., searching, registered, attached, PDP active) does esp-modem track internally, and is there a preferred way to hook into these transitions when managing the connection lifecycle manually?

Any guidance would be appreciated. Thanks

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions