cancel
Showing results for 
Search instead for 
Did you mean: 

received unexpected UX_DEVICE_REMOVAL from USB dongle

strayedboat
Associate

I ran Ux_Host_CDC_ACM project from https://github.com/STMicroelectronics/STM32CubeH5.git on STM32H573I-DK board, inserted an EC800G (Quectel LTE USB dongle) to STM32H573I-DK via USB port, expecting the STM32H573(USB CDC host) to control the EC800G(USB CDC device). However, I noticed that after the device was connected, a UX_DEVICE_REMOVAL event was triggered, which caused the CDC ACM object to be released. I'm not sure why this is happening. Below is the log from the STM32H573:

============================
Simple Interface initialized

PID: 0x3004
VID: 0x2ecc
CDC Data Interface initialized

UX_DEVICE_REMOVAL

MX_USBX_Host_Init OK !!!!!!!!
**** USB DRD CDC Host ****

USB Host library started.

Starting CDC Application
Connect your CDC Device

*** Device descriptor ***
bDescriptorType 1
bcdUSB 512
bDeviceClass 0x2
bDeviceSubClass 0x2
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x2ECC
idProduct 0x3004
bcdDevice 0
iManufacturer 1
iProduct 2
iSerialNumber 3
bNumConfigurations 1
    *** Interface descriptor ***
    bDescriptorType 4
    bInterfaceNumber 0
    bAlternateSetting 0
    bNumEndpoints 1
    bInterfaceClass 0x2
    bInterfaceSubClass 0x2
    bInterfaceProtocol 0x0
        *** Endpoint descriptor ***
        bDescriptorType 5
        bEndpointAddress 0x83
        bmAttributes 0x3
        wMaxPacketSize 10
        bInterval 1
    *** Interface descriptor ***
    bDescriptorType 4
    bInterfaceNumber 1
    bAlternateSetting 0
    bNumEndpoints 2
    bInterfaceClass 0xA
    bInterfaceSubClass 0x0
    bInterfaceProtocol 0x0
        *** Endpoint descriptor ***
        bDescriptorType 5
        bEndpointAddress 0x2
        bmAttributes 0x2
        wMaxPacketSize 64
        bInterval 0
        *** Endpoint descriptor ***
        bDescriptorType 5
        bEndpointAddress 0x81
        bmAttributes 0x2
        wMaxPacketSize 64
        bInterval 0
    *** Configuration descriptor ***
    bDescriptorType 2
    bNumInterfaces 2
    bConfigurationValue 1
    iConfiguration 4
    bmAttributes 0xC0
    bMaxPower 0

COMMAND_ACTIVATE
COMMAND_ACTIVATE

UX_DEVICE_INSERTION

USB CDC Device Found
PID: 0x3004
VID: 0x2ecc
Data Interface initialized

UX_DEVICE_CONNECTION

Simple Interface initialized

PID: 0x3004
VID: 0x2ecc
CDC Data Interface initialized

UX_DEVICE_REMOVAL

USB CDC ACM Device Removal

UX_DEVICE_DISCONNECTION

*** Device descriptor ***
bDescriptorType 1
bcdUSB 512
bDeviceClass 0xEF
bDeviceSubClass 0x2
bDeviceProtocol 1
bMaxPacketSize0 64
idVendor 0x2C7C
idProduct 0x6002
bcdDevice 792
iManufacturer 1
iProduct 2
iSerialNumber 3
bNumConfigurations 1
*** Interface Association Descriptor ***
bDescriptorType 11
bInterfaceCount 2
bFunctionClass 0x2
bFunctionSubClass 0x6
bFunctionProtocol 0x0
    *** Interface descriptor ***
    bDescriptorType 4
    bInterfaceNumber 0
    bAlternateSetting 0
    bNumEndpoints 1
    bInterfaceClass 0x2
    bInterfaceSubClass 0x6
    bInterfaceProtocol 0x0
        *** Endpoint descriptor ***
        bDescriptorType 5
        bEndpointAddress 0x87
        bmAttributes 0x3
        wMaxPacketSize 64
        bInterval 16
        *** Interface descriptor ***
        bDescriptorType 4
        bInterfaceNumber 1
        bAlternateSetting 0
        bNumEndpoints 0
        bInterfaceClass 0xA
        bInterfaceSubClass 0x0
        bInterfaceProtocol 0x0
    *** Interface descriptor ***
    bDescriptorType 4
    bInterfaceNumber 1
    bAlternateSetting 1
    bNumEndpoints 2
    bInterfaceClass 0xA
    bInterfaceSubClass 0x0
    bInterfaceProtocol 0x0
        *** Endpoint descriptor ***
        bDescriptorType 5
        bEndpointAddress 0x83
        bmAttributes 0x2
        wMaxPacketSize 512
        bInterval 0
        *** Endpoint descriptor ***
        bDescriptorType 5
        bEndpointAddress 0xC
        bmAttributes 0x2
        wMaxPacketSize 512
        bInterval 0
    *** Interface descriptor ***
    bDescriptorType 4
    bInterfaceNumber 2
    bAlternateSetting 0
    bNumEndpoints 2
    bInterfaceClass 0xFF
    bInterfaceSubClass 0x0
    bInterfaceProtocol 0x0
        *** Endpoint descriptor ***
        bDescriptorType 5
        bEndpointAddress 0x82
        bmAttributes 0x2
        wMaxPacketSize 64
        bInterval 0
        *** Endpoint descriptor ***
        bDescriptorType 5
        bEndpointAddress 0xB
        bmAttributes 0x2
        wMaxPacketSize 64
        bInterval 0
    *** Interface descriptor ***
    bDescriptorType 4
    bInterfaceNumber 3
    bAlternateSetting 0
    bNumEndpoints 3
    bInterfaceClass 0xFF
    bInterfaceSubClass 0x0
    bInterfaceProtocol 0x0
        *** Endpoint descriptor ***
        bDescriptorType 5
        bEndpointAddress 0x89
        bmAttributes 0x3
        wMaxPacketSize 64
        bInterval 16
        *** Endpoint descriptor ***
        bDescriptorType 5
        bEndpointAddress 0x86
        bmAttributes 0x2
        wMaxPacketSize 64
        bInterval 0
        *** Endpoint descriptor ***
        bDescriptorType 5
        bEndpointAddress 0xF
        bmAttributes 0x2
        wMaxPacketSize 64
        bInterval 0
    *** Interface descriptor ***
    bDescriptorType 4
    bInterfaceNumber 4
    bAlternateSetting 0
    bNumEndpoints 3
    bInterfaceClass 0xFF
    bInterfaceSubClass 0x0
    bInterfaceProtocol 0x0
        *** Endpoint descriptor ***
        bDescriptorType 5
        bEndpointAddress 0x88
        bmAttributes 0x3
        wMaxPacketSize 64
        bInterval 16
        *** Endpoint descriptor ***
        bDescriptorType 5
        bEndpointAddress 0x81
        bmAttributes 0x2
        wMaxPacketSize 64
        bInterval 0
        *** Endpoint descriptor ***
        bDescriptorType 5
        bEndpointAddress 0xA
        bmAttributes 0x2
        wMaxPacketSize 64
        bInterval 0
*** Configuration descriptor ***
bDescriptorType 2
bNumInterfaces 5
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xE0
bMaxPower 250

UX_DEVICE_CONNECTION

Composite Interface initialized

PID: 0x6002
VID: 0x2c7c
USB Device Enumeration Failure

============================

When the EC800G is plugged into a Windows PC, following ports can be observed:
device                                       VID     PID   interface_number
Quectel USB Modem #2           2C7C 6002 MI_04
Quectel USB AT Port                 2C7C 6002 MI_03
Quectel USB DIAG Port            2C7C 6002 MI_02
Mobile ECM Network Adapter   2C7C 6002 MI_00
Mobile Composite Device         2C7C 6002 5

I want access the USB AT Port with STM32H573, How can I do this?

1 REPLY 1
Pavel A.
Evangelist III

Use a real, physical USB bus analyzer to find why the disconnect occurs. Check that the dongle receives enough power.