USB CDC Device Descriptor SubClass is set wrong

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
4 posts / 0 new
Last post
JPetersen
Offline
Last seen:1 year 2 months ago
Joined:2020-02-12 15:18
USB CDC Device Descriptor SubClass is set wrong

When using the USB cdc there USB_CDC.h have the following config defaults:

#defineCDC_USB_CLASS 2 // 2: Communication Device Class

#defineCDC_USB_SUBCLASS 0x00 //

#defineCDC_USB_PROTOCOL 0x00 //

But they are not used, when sniffing the usb connection the Device Descriptor package looks like this: 12 01 00 02 02 02 00 08 CF 2D 02 60 00 01 01 02 03 01 translated to:

12 Length

01 Device Descriptors

00 bcdUSB

02 bcdUSB

02 bDeviceClass

02 bDeviceSubClass

00 bDeviceProtocol

Giving a SubClass of 0x02 this is not a valid value, according tohttps://www.usb.org/defined-class-codesboth subclass and protocol can only be set to 0x00.

Are there any way of setting the subclass field?

Keywords:
Device:
PM_Dialog
Offline
Last seen:1 day 16 min ago
Staff
Joined:2018-02-08 11:03
Hi JPetersen,

Hi JPetersen,

Thanks for your question. Let me check it and I’ll get back to you as soon as possible. Probably I will need to escalate it internally.

Thanks, PM_Dialog

JPetersen
Offline
Last seen:1 year 2 months ago
Joined:2020-02-12 15:18
I can see that I have read

I can see that I have read the specification wrong, subclass 0x02 is a valid value “Abstract Control Model” and 0x00 is “RESERVED”.

But for the project that I am working on I still need to change it, so I would like to change my question to: “is there any possibility for changing the SubClass value?”

PM_Dialog
Offline
Last seen:1 day 16 min ago
Staff
Joined:2018-02-08 11:03
Hi JPetersen,

Hi JPetersen,

Please refer to emUSB-Device manual (UM09001) and section 9.1. Here you will find the answer for your question.

https://www.segger.com/downloads/emusb-device/UM09001

Thanks, PM_Dialog