Problem with ESP32S3 and Quectel EG915U-EU usb connection

Hi,
In my project, I am using an ESP32-S3 and a Quectel EG-915U-EU modem connected to the ESP32-S3 via D+ and D-. To work with the modem, I am using the iot_usbh_modem component. The problem is that the connection with the modem periodically drops.
The modem is powered from a separate power supply, and the ESP32-S3 is also powered separately. There don’t seem to be any power issues. Has anyone encountered this problem and can suggest a solution?
(23082624) DISPLAY: WiFi update: enabled=1, connected=0, rssi=-100, ssid=‘’, internet_up=0
I (23082624) DISPLAY: WiFi display: ON (waiting for connection)
I (23082634) DISPLAY: WiFi EVENT: connected=0, rssi=-100, ssid=‘’
I (23085014) DISPLAY: WiFi update: enabled=1, connected=0, rssi=-100, ssid=‘’, internet_up=0
I (23085014) WIFI: WiFi disconnected. Retrying…
I (23085014) DISPLAY: WiFi display: ON (waiting for connection)
I (23085024) DISPLAY: WIFI INTERNET: DOWN (red)
I (23085034) DISPLAY: WiFi update: enabled=1, connected=0, rssi=-100, ssid=‘’, internet_up=0
I (23085034) DISPLAY: WiFi display: ON (waiting for connection)
I (23085044) DISPLAY: WiFi EVENT: connected=0, rssi=-100, ssid=‘’
W (23086044) MAIN: ===================================================================================

I (23086064) MAIN: GSM rssi=21, ber=99
I (23086064) MAIN: ******** IP address of google.com: 142.251.36.78
I (23086074) MAIN: Ping addr 8.8.8.8 Restart..
I (23086204) MAIN: 64 bytes from 8.8.8.8 icmp_seq=1 ttl=114 time=128 ms

E (23086234) USBH_CDC: RX xfer failed, status 1
E (23086234) USBH_CDC: RX xfer failed, status 1
E (23086234) USB HOST: EP command error: ESP_ERR_INVALID_STATE
E (23086234) USB HOST: EP command error: ESP_ERR_INVALID_STATE
E (23086244) USB HOST: EP command error: ESP_ERR_INVALID_STATE
E (23086254) USB HOST: EP command error: ESP_ERR_INVALID_STATE
E (23086264) USB HOST: EP command error: ESP_ERR_INVALID_STATE
E (23086264) USB HOST: EP command error: ESP_ERR_INVALID_STATE
E (23086274) USB HOST: EP command error: ESP_ERR_INVALID_STATE
E (23086274) USB HOST: EP command error: ESP_ERR_INVALID_STATE
I (23086294) modem_board: Modem state STAGE_DTE_LOSS, Start
W (23086294) esp-modem: Waiting exit the PPP mode gracefully
I (23086294) modem_board: Modem state STAGE_DTE_LOSS, Success!
E (23086304) USBH_CDC: usbh_cdc_write_bytes(1005): Device is not connected
E (23086304) esp-tls-mbedtls: read error :-0x004C
E (23086314) transport_base: esp_tls_conn_read error, errno=Software caused connection abort
E (23086324) mqtt_client: esp_mqtt_handle_transport_read_error: transport_read() error: errno=113
E (23086334) MQTT_APP: MQTT error: 1
E (23086334) mqtt_client: mqtt_process_receive: mqtt_message_receive() returned -2
I (23086344) MQTT_APP: MQTT_EVENT_DISCONNECTED
I (23087424) WIFI: WiFi disconnected. Retrying…
I (23087424) DISPLAY: WiFi update: enabled=1, connected=0, rssi=-100, ssid=‘’, internet_up=0
I (23087424) DISPLAY: WiFi display: ON (waiting for connection)
I (23087434) DISPLAY: WIFI INTERNET: DOWN (red)
I (23087454) DISPLAY: WiFi update: enabled=1, connected=0, rssi=-100, ssid=‘’, internet_up=0
I (23087454) DISPLAY: WiFi display: ON (waiting for connection)
I (23087464) DISPLAY: WiFi EVENT: connected=0, rssi=-100, ssid=‘’
E (23087554) ENUM: LANGID 0x409 not found
Found IN endpoint: 138
Found OUT endpoint: 7
Found NOTIF endpoint: 137
I (23087554) USBH_CDC: Opened cdc device: 14
Found IN endpoint: 132
Found OUT endpoint: 2
Found NOTIF endpoint: 131
*** Device descriptor ***
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0x0
bDeviceSubClass 0x0
bDeviceProtocol 0x0
bMaxPacketSize0 64
idVendor 0x2c7c
idProduct 0x901
bcdDevice 3.10
iManufacturer 1
iProduct 2
iSerialNumber 3
bNumConfigurations 1
*** Configuration descriptor ***
bLength 9
bDescriptorType 2
wTotalLength 263
bNumInterfaces 9
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
bMaxPower 400mA
*** Interface Association Descriptor ***
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 2
bFunctionClass 0x2
bFunctionSubClass 0x6
bFunctionProtocol 0x0
iFunction 4
*** Interface descriptor ***
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 0x2
bInterfaceSubClass 0x6
bInterfaceProtocol 0x0
iInterface 6
*** Endpoint descriptor ***
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 0x3 INT
wMaxPacketSize 16
bInterval 32
*** Interface descriptor ***
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 0xa
bInterfaceSubClass 0x0
bInterfaceProtocol 0x0
iInterface 0
*** Interface descriptor ***
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 2
bInterfaceClass 0xa
bInterfaceSubClass 0x0
bInterfaceProtocol 0x0
iInterface 5
*** Endpoint descriptor ***
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 0x2 BULK
wMaxPacketSize 64
bInterval 0
*** Endpoint descriptor ***
bLength 7
bDescriptorType 5
bEndpointAddress 0x1 EP 1 OUT
bmAttributes 0x2 BULK
wMaxPacketSize 64
bInterval 0
*** Interface descriptor ***
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 0xff
bInterfaceSubClass 0x0
bInterfaceProtocol 0x0
iInterface 8
*** Endpoint descriptor ***
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 0x2 BULK
wMaxPacketSize 64
bInterval 0
*** Endpoint descriptor ***
bLength 7
bDescriptorType 5
bEndpointAddress 0x2 EP 2 OUT
bmAttributes 0x2 BULK
wMaxPacketSize 64
bInterval 0
*** Endpoint descriptor ***
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 0x3 INT
wMaxPacketSize 64
bInterval 32
*** Interface descriptor ***
bLength 9
bDescriptorType 4
bInterfaceNumber 3
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 0xff
bInterfaceSubClass 0x0
bInterfaceProtocol 0x0
iInterface 8
*** Endpoint descriptor ***
bLength 7
bDescriptorType 5
bEndpointAddress 0x85 EP 5 IN
bmAttributes 0x2 BULK
wMaxPacketSize 64
bInterval 0
*** Endpoint descriptor ***
bLength 7
bDescriptorType 5
bEndpointAddress 0x3 EP 3 OUT
bmAttributes 0x2 BULK
wMaxPacketSize 64
bInterval 0
*** Interface descriptor ***
bLength 9
bDescriptorType 4
bInterfaceNumber 4
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 0xff
bInterfaceSubClass 0x0
bInterfaceProtocol 0x0
iInterface 8
*** Endpoint descriptor ***
bLength 7
bDescriptorType 5
bEndpointAddress 0x86 EP 6 IN
bmAttributes 0x2 BULK
wMaxPacketSize 64
bInterval 0
*** Endpoint descriptor ***
bLength 7
bDescriptorType 5
bEndpointAddress 0x4 EP 4 OUT
bmAttributes 0x2 BULK
wMaxPacketSize 64
bInterval 0
*** Interface descriptor ***
bLength 9
bDescriptorType 4
bInterfaceNumber 5
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 0xff
bInterfaceSubClass 0x0
bInterfaceProtocol 0x0
iInterface 8
*** Endpoint descriptor ***
bLength 7
bDescriptorType 5
bEndpointAddress 0x87 EP 7 IN
bmAttributes 0x2 BULK
wMaxPacketSize 64
bInterval 0
*** Endpoint descriptor ***
bLength 7
bDescriptorType 5
bEndpointAddress 0x5 EP 5 OUT
bmAttributes 0x2 BULK
wMaxPacketSize 64
bInterval 0
*** Interface descriptor ***
bLength 9
bDescriptorType 4
bInterfaceNumber 6
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 0xff
bInterfaceSubClass 0x0
bInterfaceProtocol 0x0
iInterface 8
*** Endpoint descriptor ***
bLength 7
bDescriptorType 5
bEndpointAddress 0x88 EP 8 IN
bmAttributes 0x2 BULK
wMaxPacketSize 64
bInterval 0
*** Endpoint descriptor ***
bLength 7
bDescriptorType 5
bEndpointAddress 0x6 EP 6 OUT
bmAttributes 0x2 BULK
wMaxPacketSize 64
bInterval 0
*** Interface descriptor ***
bLength 9
bDescriptorType 4
bInterfaceNumber 7
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 0xff
bInterfaceSubClass 0x0
bInterfaceProtocol 0x0
iInterface 8
*** Endpoint descriptor ***
bLength 7
bDescriptorType 5
bEndpointAddress 0x8a EP 10 IN
bmAttributes 0x2 BULK
wMaxPacketSize 64
bInterval 0
*** Endpoint descriptor ***
bLength 7
bDescriptorType 5
bEndpointAddress 0x7 EP 7 OUT
bmAttributes 0x2 BULK
wMaxPacketSize 64
bInterval 0
*** Endpoint descriptor ***
bLength 7
bDescriptorType 5
bEndpointAddress 0x89 EP 9 IN
bmAttributes 0x3 INT
wMaxPacketSize 64
bInterval 32
*** Interface descriptor ***
bLength 9
bDescriptorType 4
bInterfaceNumber 8
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 0xff
bInterfaceSubClass 0x0
bInterfaceProtocol 0x0
iInterface 8
*** Endpoint descriptor ***
bLength 7
bDescriptorType 5
bEndpointAddress 0x8b EP 11 IN
bmAttributes 0x2 BULK
wMaxPacketSize 64
bInterval 0
*** Endpoint descriptor ***
bLength 7
bDescriptorType 5
bEndpointAddress 0x8 EP 8 OUT
bmAttributes 0x2 BULK
wMaxPacketSize 64
bInterval 0
I (23088064) modem_board: DTE reconnect, reconnecting …

I (23088064) USBH_CDC: Opened cdc device: 14
I (23088074) USBH_CDC: New device connected, address: 14
I (23088074) MAIN: Task dump
I (23088084) MAIN: Load Stack left Name PRI
I (23088094) MAIN: nan 636 modem_daemon 6
I (23088094) MAIN: nan 9516 display_task 5
I (23088104) MAIN: nan 320 main 1
I (23088104) MAIN: nan 696 IDLE0 0
I (23088114) MAIN: nan 688 IDLE1 0
I (23088114) MAIN: nan 1992 tiT 18
I (23088124) MAIN: nan 408 mqtt_inet_evt 5
I (23088124) MAIN: nan 4124 system_events 5
I (23088134) MAIN: nan 1780 ping 2
I (23088134) MAIN: nan 888 mqtt_task 5
I (23088144) MAIN: nan 996 usb_data_recv 6
I (23088144) MAIN: nan 536 ipc0 24
I (23088154) MAIN: nan 1904 usb_lib 5
I (23088154) MAIN: nan 2968 esp_timer 22
I (23088164) MAIN: nan 1252 wifi 23
I (23088164) MAIN: nan 368 sys_evt 20
I (23088174) MAIN: nan 1620 usbh_cdc 5
I (23088174) MAIN: nan 1320 Tmr Svc 1
I (23088184) MAIN: nan 528 ipc1 24
I (23088184) MAIN: Free heap=8498092 Free mini=8257536 bigst=8445756, internal=127064 bigst=77824
I (23089074) modem_board: reconnect after 2s…
I (23089824) WIFI: WiFi disconnected. Retrying…
I (23089834) DISPLAY: WiFi update: enabled=1, connected=0, rssi=-100, ssid=‘’, internet_up=0
I (23089834) DISPLAY: WiFi display: ON (waiting for connection)
I (23089834) DISPLAY: WIFI INTERNET: DOWN (red)
I (23089854) DISPLAY: WiFi update: enabled=1, connected=0, rssi=-100, ssid=‘’, internet_up=0
I (23089854) DISPLAY: WiFi display: ON (waiting for connection)
I (23089864) DISPLAY: WiFi EVENT: connected=0, rssi=-100, ssid=‘’
I (23090074) modem_board: reconnect after 1s…
I (23090074) modem_board: Modem state STAGE_SYNC, Start
I (23090214) modem_board: Network Auto reconnecting …
I (23090214) modem_board: Modem state STAGE_SYNC, Success!
I (23090314) modem_board: Modem state STAGE_SET_URC, Start
I (23090414) modem_board: URC port set to “usbmodem” successfully
I (23090414) modem_board: Modem state STAGE_SET_URC, Success!
I (23090514) modem_board: Modem state STAGE_SET_APN_DEFAULT, Start
W (23090614) esp_modem_dce: esp_modem_dce_generic_command(31): Command:AT+CGDCONT=1,“IP”,“”
…failed
W (23090614) modem_board: Failed to send APN clear command
W (23090614) modem_board: Modem state STAGE_SET_APN_DEFAULT, Failed, retry1, after 3000ms…
I (23092234) WIFI: WiFi disconnected. Retrying…
I (23092244) DISPLAY: WiFi update: enabled=1, connected=0, rssi=-100, ssid=‘’, internet_up=0
I (23092244) DISPLAY: WiFi display: ON (waiting for connection)
I (23092244) DISPLAY: WIFI INTERNET: DOWN (red)
I (23092264) DISPLAY: WiFi update: enabled=1, connected=0, rssi=-100, ssid=‘’, internet_up=0
I (23092264) DISPLAY: WiFi display: ON (waiting for connection)
I (23092274) DISPLAY: WiFi EVENT: connected=0, rssi=-100, ssid=‘’
I (23092334) esp-netif_lwip-ppp: ppp: User interrupt
I (23092334) esp-modem-netif: PPP state changed event 5: (NETIF_PPP_ERRORUSER)
I (23093624) modem_board: Modem state STAGE_SET_APN_DEFAULT, Start
I (23093704) modem_board: APN cleared successfully
I (23093704) modem_board: Modem state STAGE_SET_APN_DEFAULT, Success!
I (23093804) modem_board: Modem state STAGE_CHECK_SIM, Start
I (23093904) modem_board: SIM Card Ready
I (23093904) modem_board: Modem state STAGE_CHECK_SIM, Success!
I (23094004) modem_board: Modem state STAGE_CHECK_SIGNAL, Start
I (23094644) DISPLAY: WiFi update: enabled=1, connected=0, rssi=-100, ssid=‘’, internet_up=0
I (23094644) WIFI: WiFi disconnected. Retrying…
I (23094644) DISPLAY: WiFi display: ON (waiting for connection)
I (23094654) DISPLAY: WIFI INTERNET: DOWN (red)
I (23094664) DISPLAY: WiFi update: enabled=1, connected=0, rssi=-100, ssid=‘’, internet_up=0
I (23094664) DISPLAY: WiFi display: ON (waiting for connection)
I (23094674) DISPLAY: WiFi EVENT: connected=0, rssi=-100, ssid=‘’
I (23096104) modem_board: Signal quality: rssi=21, ber=99
I (23096104) modem_board: Modem state STAGE_CHECK_SIGNAL, Success!
I (23096204) modem_board: Modem state STAGE_CHECK_REGIST, Start

Dear DiXmon,

Thank you for sharing the detailed logs.

Based on the information provided and a review against the internal document, the issue does not appear to be related to RF signal quality or power stability. The modem is registered on the network, and data transmission is observed before the disconnection occurs.

From the logs, the failure starts at the USB CDC layer (RX xfer failed, ESP_ERR_INVALID_STATE), followed by a full USB re-enumeration of the modem. This indicates that the USB interface is being reset, rather than the modem losing network registration.

Please note the following points based on EG915U design and documented behavior:

  1. AT command usage during PPP

When PPP is active, the modem enters data mode. According to the EG915U AT Commands Manual, AT commands must not be issued while PPP is running on the same USB CDC data interface. Sending commands such as AT+CGDCONT during an active PPP session may interrupt the data mode and cause the USB CDC interface to reset, which matches the behavior observed in the logs.

  1. Modem sleep mode

By default, the EG915U supports power-saving mechanisms. To avoid unintended transitions into low-power states that may affect USB stability, we recommend disabling sleep mode during initialization using the documented command:

AT+QSCLK=0

  1. USB interface usage

The EG915U exposes multiple USB interfaces. For PPP operation, only the required CDC control and CDC data interfaces should be used. Accessing or reopening additional interfaces while PPP is active may lead to unstable USB behavior, particularly on embedded USB host implementations.

  1. ESP32-S3 USB host considerations

The ESP32-S3 USB host stack is sensitive to CDC endpoint stalls. We recommend:

-Disabling USB suspend on the host side
-Increasing USB CDC task stack size and priority
-Ensuring a single task controls modem state and USB access

Please let us know if the issue persists after applying the above recommendations, or if you need further assistance reviewing the USB or PPP configuration.

Best regards,
Ananthan

Thank you for the help and advice. But it seems everything turned out to be much simpler — most likely either a defective ESP dev board or a non-original ESP. I replaced the ESP32-S3 dev board and the problem disappeared. Unfortunately, this is not the first time I’ve run into issues with the ESP32-S3 (in the previous one, Wi-Fi didn’t work).

Thanks for the update. That explains it. Issues like this are often caused by faulty or non-genuine ESP32-S3 boards.

Good to know the problem was resolved after replacing the dev board. Let us know if you need any further assistance.

Thanks!
Have a great day!

Best Regards,
Ananthan