AnsweredAssumed Answered

USB CDC Class problem

Question asked by ab val on Feb 26, 2018


I am working on a nucleo STM32H7 and I am trying to communicate with a Hokuyo through USB. 

When  I connect the device  the init fails at some point in the usbh_cdc.c (USBH_CDC_InterfaceInit)

In this function there is first:


interface = USBH_FindInterface(phost, 

                                                    COMMUNICATION_INTERFACE_CLASS_CODE, //0x02

                                                    ABSTRACT_CONTROL_MODEL,    //0x02
                                                    COMMON_AT_COMMAND);   //0x01


then another one that fails: 

interface = USBH_FindInterface(phost,


Could someone explain to me why the second function is called with different parameters?

Can I change those parameters to match the device's Class?


Here is the log:

USB| USB Device Attached
USB| PID: 0h
USB| VID: 15d1h
USB| Address (#1) assigned.
USB| Manufacturer : Hokuyo Data Flex for USB
USB| Product : URG-Series USB Driver
USB| Serial Number : N/A
USB| Enumeration done.
USB| This device has only 1 configuration.
USB| Default configuration set.
USB| Switching to Interface (#0)
USB| Class : 2h
USB| SubClass : 2h
USB| Protocol : 1h
DEBUG: Cannot Find the interface for Data Interface Class.
USB| Device not supporting CDC class.