Skip to main content
Associate
August 2, 2024
Solved

Can't Enumerate Telit modem USB port as a CDC ACM device with usbx host

  • August 2, 2024
  • 21 replies
  • 6365 views

     I am using an STM32 Nucleo H563ZI board for stm32CubeIDE and I am trying to send AT commands to a Telit LE910C4-WWX threadx modem over usb using the usbx host and threadx middleware. My program should be able to detect the modem as a cdc acm device, but it's failing to enumerate. When I connect a usb mouse to the Nucleo, it can enumerate properly as an hid mouse, which leads me to believe that the modem might not be properly configured. When I connect the modem with the configuration AT#USBCFG=1, it steps through the _ux_host_class_cdc_acm_entry() function 7 times, and the last time, it is able to check for IAD presence, but the IAD class is 2, and the IAD subclass is 0, so it still fails. Is there some other configuration for the modem I need to do, or do I need to modify the usbx driver or the ioc file?

This topic has been closed for replies.
Best answer by Bfuller

I was able to solve my issue. All I had to do was go into the cdc acm h file and change the value of the data class from 0x0A to 0xFF. It works perfectly fine now, and I can send and receive data over usb.

21 replies

Andrew Neil
Super User
August 2, 2024

@Bfuller wrote:

When I connect a usb mouse to the Nucleo, it can enumerate properly as an hid mouse, which leads me to believe that the modem might not be properly configured. When I 


What if you connect a different CDC ACM device to your Nucleo?

 


@Bfuller wrote:

 leads me to believe that the modem might not be properly configured. 


So does the modem enumerate correctly when connected to a PC ?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
BfullerAuthor
Associate
August 2, 2024

I tried connecting a different Quectel modem to it, and that also didn't enumerate. When connected to PC, the Telit modem shows up as 2-5 different devices, depending on its usb composition. I downloaded the telit windows driver to see each device, and I get a serial diagnostics interface with class 0xFF, two modems, each with class 0xFF, an unknown device with class 0x02, and a usb composite device with class 0x00. When I look at each class when I step through the entry function, the 7th time the function is called has a class 0x0A and it passes the first if statement, but none of the devices that show up on my pc have class 0x0A.

Pavel A.
August 2, 2024

Yep these modems are over-complicated. Need to check that you are not running out of host endpoints to map all that.

 

Andrew Neil
Super User
August 3, 2024

@Pavel A. wrote:

Yep these modems are over-complicated.


Indeed - they are intended for "Big OS" hosts like Windows or Linux.

@Bfuller can you not just connect to it via a serial port?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
BfullerAuthor
Associate
August 5, 2024

Yes, but my implementation requires that I can connect the modem and the nucleo through their usb ports. I can enumerate most of the devices on Windows by installing the driver. I can't do that with the nucleo.

Explorer
August 6, 2024

I am also facing the same issue in enumeration the Quectel modem with STM32 H755ZI-Q. Could you find any helpful resources? 

Andrew Neil
Super User
August 6, 2024

@pinny wrote:

I am also facing the same issue in enumeration the Quectel modem 


Which Quectel modem?

This one: https://community.st.com/t5/stm32-mcus-embedded-software/usb-connection-between-stm32f411-and-modem-rm500-quectel/m-p/705360/highlight/true#M50183 ?

Have you contacted Quectel for any help?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Explorer
August 6, 2024

It's RM502Q-AE. Quectel supports said they could provide us USB descriptors so we had to create the driver. 

BfullerAuthorBest answer
Associate
August 15, 2024

I was able to solve my issue. All I had to do was go into the cdc acm h file and change the value of the data class from 0x0A to 0xFF. It works perfectly fine now, and I can send and receive data over usb.

Explorer
August 15, 2024

I am happy to hear that you solved your problem and thank you for sharing the solution with us. So you defined the data interface class code as vendor specific class and it works fine in cdc? What about the communication, subclass and protocol? have you also changed them? 

BfullerAuthor
Associate
August 16, 2024

It is now fully functional. All I had to do was change the data class, nothing else. I do need to have the modem in a specific usb composition though. It just needs the 2 modems as well as the ecm interface. It can't have the diagnostics interface.