Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[USB2_Soft / UART Loopback] Error in Communication Device Class (Abstract Control Model) / Zero length descriptor references #11

Open
Semnodime opened this issue Nov 23, 2024 · 2 comments

Comments

@Semnodime
Copy link
Contributor

usb2_soft

usb_uart_loopback.gprj

dmesg ->

[  +0,000000] usb 1-4: new high-speed USB device number 1 using xhci_hcd
[  +0,156252] usb 1-4: New USB device found, idVendor=33aa, idProduct=0000, bcdDevice= 1.00
[  +0,000007] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  +0,000002] usb 1-4: Product: USB2Serial
[  +0,000001] usb 1-4: Manufacturer: Gowinsemi
[  +0,000619] cdc_acm 1-4:1.0: Zero length descriptor references
[  +0,000004] cdc_acm: probe of 1-4:1.0 failed with error -22
@kyonmiriam
Copy link
Collaborator

Hi, I have understood your problem.
Sorry we haven't had time to test on Linux yet because we lack such a device.
But I guess this issue may be caused by a small bug in the USB descriptor. We can see such a line of error prompts in USBTreeView.

WeChat 截圖_20241124230448

This corresponds to line 212 in the src/usb_descriptor.v file in the project. You can see that h02 is written here.

WeChat 截圖_20241124230904

Maybe changing this to h00 and rebuilding the project will help.

@kyonmiriam
Copy link
Collaborator

kyonmiriam commented Nov 25, 2024

After careful inspection, it was confirmed that there was an error in the USB interface descriptor related content in the previous demo.

The relevant content has now been corrected. The demo has been updated and additionally tested on Linux and macOS. You can try the updated demo.

WeChat 截圖_20241125201116
As you can see, now Linux can recognize it normally as /dev/ttyACM0 . We tested on Ubuntu 22.04 and openSUSE tumbleweed, and the demo works fine.

@Semnodime

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants