Replies: 6 comments 33 replies
-
The serial USB CDC gadget has be developed by @sebastienNEC. Sebastien do you
think, the described modification should be generally added for the device
descriptor?
I think, we can discuss this here.
|
Beta Was this translation helpful? Give feedback.
-
Aha indeed, I tested your modification and linux (5.4.0) still works, while Windows (10) now works (it didn't use to). This needs fixed in the develop branch indeed, sorry for overlooking that as I had only tested on linux ! |
Beta Was this translation helpful? Give feedback.
-
While I'm playing with USB: would it be reasonable to replace in dwusbgadget.cpp all CTimer::Get()->xxxxDelay() by their CScheduler::Get()->xxxSleep() equivalent ? I tried that for the CDC gadget and it works, of course by having the USB initialization code in a CTask. If so, care must be taken to fallback to CTimer delays if the scheduler was not instantiated. Noting that one cannot use a test on (CScheduler::Get() == nullptr) because the assert would fail. |
Beta Was this translation helpful? Give feedback.
-
To be honest, the bDeviceClass=0x0 was an oversight on my side, but indeed, a composite CDC/MSC device would be super useful. From my experience on the STM32 though, windows/linux are pretty fussy about the exact descriptors of composite devices - they only recognize certain configuration. Do you have an existing composite device whose descriptor you could copy ? Now mind you, this was a few years ago, the situation might have improved :) |
Beta Was this translation helpful? Give feedback.
-
I have made the @messinm Thanks for reporting this, and @sebastienNEC Thanks for testing the recommended change and for clarifying the situation. |
Beta Was this translation helpful? Give feedback.
-
You're welcome!
|
Beta Was this translation helpful? Give feedback.
-
Was trying test\usb-serial-cdc-gadget to connect Raspi zero2 to Windows (11), and could not get it to connect properly. Code 10, device would not start.
I have a board running Yocto with gadget driver,and it connected to Windows with no problems, and so I ran packet captures to compare the two. The Yocto driver responds to GET DESCRIPTOR DEVICE with bDeviceClass =0x02 (CDC), while Circle responds with 0x0.
I changed CUSBCDCGadget::s_DeviceDescriptor so that Circle would respond with bDeviceClass =0x02, and that fixed the issue. Seems like this would work with other OS as well, but I haven't tested.
Should I create an issue for this?
Beta Was this translation helpful? Give feedback.
All reactions