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

Restore ability to read usb_cdc buffer when serial client is disconnected #10177

Merged
merged 1 commit into from
Mar 24, 2025

Conversation

Neradoc
Copy link

@Neradoc Neradoc commented Mar 24, 2025

This is a fix for the issue I mentioned all the way here: #7456 (comment)

The issue mentioned in #6018 is now fixed in tinyusb: hathach/tinyusb#2630

The original solution in #7100 caused the buffer to contain inaccessible data, requiring a serial software on the host to be connected to be able to read the buffer (asserting DTR). Another solution would be to test tud_ready() or tud_cdc_n_ready() instead of connected, but that would be redundant with the tinyusb fix.

I was not able to reproduce #6018 with that PR.

…l client is connected

the original issue is fixed in tinyusb
Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on a Metro M4, using the test program in #7456. Then I tried the build from here, and confirmed that it reads characters normally through tio. Then i did echo abc >/dev/ttyACM1 and confirmed the problem in 9.2.6 and the fix (behaved as desired) in the PR artifact.

Thank you for keeping this on your plate!

@dhalbert dhalbert merged commit 29056d4 into adafruit:9.2.x Mar 24, 2025
520 checks passed
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

Successfully merging this pull request may close these issues.

2 participants