AMB82-Mini USB Host CDC ECM fails to enumerate Quectel EC200U 4G modem — "ecm init fail"

Hi Realtek team,

I am developing a 4G dashcam using AMB82-Mini ( RTL8735B) with a Quectel EC200U-CN 4G modem ( Quectel EC200U 4G Modem - CAPUF ). The modem is configured for USB CDC ECM mode via AT+QCFG=“usbnet”,1. UART AT commands work perfectly, the modem registers on the network, and gets an IP address. However, USB Host CDC ECM enumeration always fails with ecm init fail.

Hardware Setup

  • Board: AMB82-Mini EVB (Rev 2V0)

  • Modem: Quectel EC200U-CN

  • SDK: ameba-rtos-pro2 (FreeRTOS SDK, GCC build)

  • USB connection: EC200U USB header pins (5/P/M/G) → AMB82-Mini CON9 (USB Host port)

    • Pin P (USB D+) → CON9 D+ → R60 (33Ω) → USB_HSDP (module pin 85 as per schematic)

    • Pin M (USB D-) → CON9 D- → R61 (33Ω) → USB_HSDM (module pin 86 as per schematic)

    • Pin G (GND) → CON9 GND

    • Pin 5 (VBUS) → CON9 VBUS (5V confirmed with multimeter)

  • Debug serial: CON8 (CH340 debug port) — separate from USB Host

  • UART AT commands: PA_2 (TX) → EC200U RX, PA_3 (RX) → EC200U TX — working

What Works

  • UART AT commands: all working (AT+CPIN? → READY, AT+CREG? → registered, AT+CGPADDR → IP assigned)

  • Modem USB ECM mode confirmed: AT+QCFG=“usbnet” returns +QCFG: “usbnet”,1

  • Modem registered on Airtel 5G LTE (Band 40), signal CSQ 23

  • PDP context active, IP assigned

  • VBUS 5V verified at CON9 and at EC200U USB header pin

  • Tried both D+/D- orientations

What Fails

USB Host ECM enumeration fails every time. Serial log:

[ECM] USB host ECM demo started…

usb otg mode 1

USB_Init

[4G] Waiting for DHCP… (28)

[4G] Waiting for DHCP… (27)

ecm init fail

The bulk_task already deinit

The intr_task already deinit

USB_DeInit

ecm deinit ok

ecm_status 2

The USB host controller initializes (usb otg mode 1, USB_Init) but usbh_cdc_ecm_on() returns false — no USB device is detected on the bus.

Code Reference

I am calling ethernet_usb_init() from component/ethernet_mii/ethernet_usb.c (line 593), which creates the usbh_ecm_thread. Inside that thread, ecm_on() (line 290) calls usbh_cdc_ecm_on(), which fails.

My initialization code is as following:

/* In modem_task — called after modem AT init completes */

ethernet_usb_init();

/* Wait for DHCP */

int dhcp_timeout = 30;

while (ecm_lwip_dhcp_status() != 4 && dhcp_timeout-- > 0) {

***printf("\[4G\] Waiting for DHCP... (%d)\\r\\n", dhcp_timeout);***

***vTaskDelay(1000 / portTICK_PERIOD_MS);***

}

Build configuration in video_example_media_framework.cmake:

CONFIG_USBH_CDC_ECM=1

platform_opts.h:

#define CONFIG_ETHERNET 1

#define MII_INTERFACE 0

#define USB_INTERFACE 1

#define ETHERNET_INTERFACE USB_INTERFACE

What I’ve Verified

  1. Schematic confirmed: CON9 D+/D- route to USB_HSDP (pin 85) / USB_HSDM (pin 86) via 33Ω series resistors (R60/R61)

  2. CON8 is separate: Debug USB goes to CH340C (U9), not RTL8735B USB OTG

  3. VBUS detected by modem: USB PWR LED turned on in EC200U module when VBUS connected

  4. Tried with retries: Added 3 retry attempts with ethernet_usb_deinit() between each — same result

  5. Tried longer delays: Waited up to 15 seconds before calling ethernet_usb_init() — same result

Questions

  1. Has USB Host CDC ECM been tested with any device other than RTL8152B USB Ethernet dongle?

  2. Does usbh_cdc_ecm_on() in libusbd.a filter by USB VID/PID?

  3. Is there a way to enable verbose USB host debug logging to see if the host detects any electrical activity on D+/D-?

  4. Is there a known issue with USB Host enumeration on AMB82-Mini EVB ?

  5. Would it be possible to get source code for usbh_cdc_ecm_on() (currently in precompiled library form) so we can debug the enumeration failure?

Environment

  • SDK: ameba-rtos-pro2

  • Board: AMB82-Mini EVB 2V0

  • OS: Windows11

Warm Regards,

Pradeep

Hi @Pradeep_1,

Kindly refer to this link for the USB-to-Ethernet adapter that we have tested on our end.

Could you share which USB Ethernet adapter you are using?

May I also check if you are using the default JXF37 sensor? We can provide a test firmware for you to try, which may help narrow down whether the issue is related to hardware or the source code.

Hi Pammy,

i am not using USB to Ethernet adapter. if you have seen my post i have already written everything in very detail. I am trying to interface EC200U modem with AMB82-mini using USB interface. SO AMB82-mini will act as a USB host. Please read my previous post before providing any solution, i have written everything in detail. Also, i am using JXF37 sensor, and it is working fine i am able to record video as well.

Best regards,

Pradeep

Hi @Pradeep_1,

Apologies for the misunderstanding. Thank you for your clarification and waiting while we reviewed the requested feature.

The current USB ECM example is intended only for USB-to-Ethernet adapter use cases, and is not compatible with 4G dongle usage.

Support for 4G dongles is still under development and will require some time to complete.

We will provide an update once this feature becomes available in the SDK.

Thank you.