Skip to main content
Graduate
February 24, 2021
Question

How to connect to module with 3 virtual com ports with USB Host library on STM32 ?

  • February 24, 2021
  • 2 replies
  • 980 views

Helllo,

I'm trying to communicate with USB module that exposes 3 virtual com ports if used under PC and Windows. It's AT command set based communication module.

I'd like to connect to it over USB Host library on STM32F779.

I have basic code running, module is properly powered, Appli_state changes to APPLICATION_START state.

Now I wonder what should I do next? I guess I need to enumerate virtual com ports

and connect to the proper one.

How do I do this? I have read USB Host library document but it's only general.

Is there any working example - possibly with FreeRTOS ?

Thanks,

regards.

    This topic has been closed for replies.

    2 replies

    Super User
    February 24, 2021

    >  I guess I need to enumerate virtual com ports

    It looks like a composite device with 3 interfaces. So yes, parse the descriptors and find the needed function (or you need all 3?)

    From the interface descriptor find the endpoint descriptors. Then use these endpoints as in CDC host example.

    -- pa

    bullyAuthor
    Graduate
    February 24, 2021

    Hello,

    thanks for info... Can you please help me with functions that will do this ?

    Are descriptors already in there or should I call functions ? Is USBH_ReEnumerate the right to do the enumeration ?

    Any hint or pointer to more info how to parse descriptors and find the correct one ?

    Thanks,

    bullyAuthor
    Graduate
    February 26, 2021

    Hello,

    I've got few steps further, I can now detect device and I see this on console :

    USB Device Reset Completed
    PID: 296h
    VID: 2c7ch
    Address (#1) assigned.
    Manufacturer : Qualcomm, Incorporated
    Product : Qualcomm CDMA Technologies MSM
    Serial Number : b349f9e4
    Enumeration done.
    This device has only 1 configuration.
    Default configuration set.
    Device remote wakeup enabled
    DEBUG : Cannot Find the interface for Communication Interface Class.
    CDC class started.

    This is a BG96 module called "LTE IOT Click 2" from Mikroelektronika and it seems that it doesn't implement VCOM under CDC class,

    but it reports as 0xff class...

    Any advice whether it is possible to connect to those devices (maybe FTDI are similar) ?

    Under Windows I had to install custom drivers to get it recognized and working...

    Thanks...