Skip to main content
Visitor II
June 12, 2025
Question

USB Host "No registered class for this device."

  • June 12, 2025
  • 2 replies
  • 561 views

Hi, i'm working on connecting a multimeter to an stm32f2 via USB (STM32 as a HOST). The goal is to send SCPI commands to it (I easly did it in python just to chek the correct behevor of the multimeter).
I implemented the USB Host lib but after few hours of debugging i cant figure out how to set the active class... (phost->pActiveClass != NULL) return false and i get "No registered class for this device". I have setup CDC in cubeMX but doesn't seems to work).
I use the USBH_CDC_Transmit to send command to the multimeter but since the USBH_UserProcess state machine never reach APPLICATION_READY state it's not even a thing (i tryed sending commands in APPLICATION_START state but no success either).

I get the folowing output with max lvl of debug :

USB Device Connected
USB Device Reset Completed
PID: ea60h
VID: 10c4h
Address (#1) assigned.
Manufacturer : Silicon Labs
Product : METRIX MX5060
Serial Number : 10003926
Enumeration done.
This device has only 1 configuration.
Default configuration set.
No registered class for this device.

 

Regards,


- Flankiste

 

    This topic has been closed for replies.

    2 replies

    Technical Moderator
    June 13, 2025

    Hi @Flankiste 

    Did you refer to the example provided here ? Do you use a reference board? You may need to attach minimum firmware to replicate the issue or attach a USB traffic using USB analyzer or sniffer.

    Super User
    June 17, 2025

    Is it a composite device perhaps?

    FlankisteAuthor
    Visitor II
    June 18, 2025

    I don't really understand your question. The device is a multimeter, but the USB COM interface is managed by a CP210x chip from Silicon Labs. And yes, I've checked the example provided, but it doesn't help much since it is made for CDC class devices. So it looks like I need to use my own implementation of the CP210 driver. After some more digging, I stumbled across this repo:
    https://github.com/henla464/USB_Host_Shield_Library_2.0/blob/master/CP210x.cpp
    Do you think it's possible to adapt it and use it alongside the USBH library ?

    Super User
    June 18, 2025

    AFAIK, at least some CP210x do not conform to the USB CDC standard. Their USB descriptors can indicate a vendor-specific class (0xFF) rather than the CDC class. From the referred source, CP210 has 3 endpoints similar to the CDC so it may be possible to adapt the ST CDC driver. Since the device does not expose the standard CDC class, the "core" host code also should be adapted (match by VID & PID instead of class).