EG915U in ECM mode doesn't notify about link up event

Hi, EG915U module fw version EG915UEUABR03A01M08_01.216.01.216
is wired via USB to STM32H7 MCU, i want to communicate with module via CDC-ECM model, i enumerate interfaces 0(ECM config), 1(ECM data) and 2(AT), get two notifications via interface 0, first that link is down and second about speed change. After that i start to connect to LTE network via 2 interface using such sequence:

< RDY
< AT
< OK
< ATE0
< OK
AT_CMD> AT+GMM
< EG915U
< OK
AT_CMD> AT+QURCCFG=“urcport”
< +QURCCFG: “urcport”,“usbat”
< OK
moem AT_CMD> ATE0
< OK
AT_CMD> AT
< +CFUN: 1
< +CPIN: READY
< +QUSIM: 1
< OK
AT_CMD> AT+CREG=2
< OK
AT_CMD> AT+CGREG=2
< OK
AT_CMD> AT+CEREG=2
< OK
AT_CMD> AT+CMEE=2
< OK
AT_CMD> AT+QCFG=“nwscanmode”
< +QCFG: “nwscanmode”,0
< OK
AT_CMD> AT+QGMR
< EG915UEUABR03A01M08_01.216.01.216
< OK
AT_CMD> AT+GSN
< 861327081695657
< OK
AT_CMD> AT+QCCID
< +QCCID: 89380062300679605880
< OK
AT_CMD> AT+CRSM=176,28589,0,0,4
< +CRSM: 144,0,“00000002”
< OK
AT_CMD> AT+CIMI
< 255061056045632
< OK
AT_CMD> AT+QICSGP=1
< +QICSGP: 1,“internet”,“”,“”,0
< OK
AT_CMD> AT+QCFG=“dftpdn”
< +QCFG: “dftpdn”,1,“internet”,0,“”,“”
< OK
< +CMGF: 0
< OK
AT_CMD> AT+CNMI?
< +CNMI: 2,1,0,0,0
< OK
AT_CMD> AT+CNMI=2,2,0,0,0
< OK
AT_CMD> AT+CSCS=“IRA”
< OK
< +QIND: SMS DONE
< +CREG: 1,“345C”,“C5C2116”,7
< +CGREG: 1,“345C”,“C5C2116”,7
< +CEREG: 1,“345C”,“C5C2116”,7
< +QIND: PB DONE
AT_CMD> AT+CNUM
< +CNUM: “”,“+380635145945”,145
< OK
AT_CMD> AT+QNWINFO
< +QNWINFO: “FDD LTE”,“25506”,“LTE BAND 1”,125
< OK
AT_CMD> AT+CGATT=1
< OK
AT_CMD> AT+CHUP
< OK
AT_CMD> AT+CGATT?
< +CGATT: 1
< OK
AT_CMD> AT+CREG?
< +CREG: 2,1,“345C”,“C5C2116”,7
< OK
AT_CMD> AT+CGREG?
< +CGREG: 2,1,“345C”,“C5C2116”,7
< OK
AT_CMD> AT+CEREG?
< +CEREG: 2,1,“345C”,“C5C2116”,7
< OK
AT_CMD> AT+CSQ
< +CSQ: 31,99
< OK
AT_CMD> AT+CPIN?
< +CPIN: READY
< OK
PS attached
AT_CMD> AT+QNETDEVCTL?
< +QNETDEVCTL: 3,1,1,0
< OK
AT_CMD> AT+QIACT=1
< OK
AT_CMD> AT+QIACT?
< OK
AT_CMD> AT+QIDNSCFG=1
< +QIDNSCFG: 1,“10.74.32.5”,“10.74.227.5”
< OK
AT_CMD> AT+CGCONTRDP=1
< +CGCONTRDP: 1,5,“internet.mnc006.mcc255.gprs”,“10.109.219.115.255.255.255.0”,“10.109.219.1”,“10.74.32.5”,“10.74.227.5”
< +QNETDEVSTATUS: 1

As i found on forum, after +QNETDEVSTATUS: 1 modem shall be able to work in ECM mode, and as per USB-IF standard, i wait for link up notification on interface 0, yet it never comes. Is there anything i do wrong, and is there some kind of application note for implementing ecm mode on EG915?

Dear @Kyrylo_Bychko ,

Thanks for the detailed log, it is very helpful.

From your AT outputs the modem side is already in a healthy state: the module is registered on LTE, signal is good, the PDP context is active, and the IP parameters are assigned. The unsolicited +QNETDEVSTATUS: 1 indicates the module network device is ready from the modem side.

The missing part is on the USB CDC-ECM host implementation. On PC OS drivers, the ECM link-up notification is typically observed only after the host completes the required CDC-ECM class control steps. On an MCU, those steps must be implemented explicitly. If they are not done, the module may stay in the initial link-down state and you will only see the initial notifications you described.

Please check the following on your STM32 USB host stack:

  1. Activate the ECM data interface by selecting the correct alternate setting
    On many CDC-ECM devices, the data interface has alt 0 with no endpoints and alt 1 with the bulk IN and bulk OUT endpoints. The host must send SET_INTERFACE to switch the ECM data interface to the active alternate setting. If the data interface remains at alt 0, the device can keep reporting link down.
  2. Set the Ethernet packet filter
    After enumeration, the host should send the class request SET_ETHERNET_PACKET_FILTER and enable at least directed and broadcast traffic. Some devices will not report network connection up until this filter is set.
  3. Bring up IP on the host side after the PDP is active
    Once the module reports network device ready and the ECM endpoints are active, the host should run a DHCP client on the ECM interface (most common) or apply a static configuration if your design uses static addressing.

To make this conclusive, please share these items from your USB host logs:

  • whether you send SET_INTERFACE on the ECM data interface and which alternate setting you select
  • whether you send SET_ETHERNET_PACKET_FILTER and the exact value used
  • the CDC-ECM descriptor section for the data interface, showing whether alt settings are present

After we confirm these three points, we can tell you exactly what to change in the STM32 ECM implementation. If you already do these steps and link-up still never appears, we will then check whether this specific firmware build reports link status only through +QNETDEVSTATUS and not through the USB notification in your configuration and advise the best practice flow accordingly.

Best Regards,
Aghelan

Hello, thank you for your answer, in time of waiting i’ve created a support ticket on support service, can we move our communication there? https://e-service.quectel.com/en/support/tickets/224729