Skip to content

fix(cdc-acm): don't warn when serial console gadget is disabled - #1524

Open
ilyongnoh-ux wants to merge 1 commit into
jetkvm:devfrom
ilyongnoh-ux:fix/cdc-acm-log-spam
Open

fix(cdc-acm): don't warn when serial console gadget is disabled#1524
ilyongnoh-ux wants to merge 1 commit into
jetkvm:devfrom
ilyongnoh-ux:fix/cdc-acm-log-spam

Conversation

@ilyongnoh-ux

Copy link
Copy Markdown

What

When the USB serial console gadget is disabled (the default config), /dev/ttyGS0 does not exist, but every CDC-ACM data channel open logs a warning:

WRN Failed to open CDC-ACM device error="open /dev/ttyGS0: no such file or directory"

This repeats on every client session and fills the log with noise for a configuration that is working as intended.

How

handleCDCACMChannel now checks config.UsbDevices.SerialConsole before trying to open the device. If the gadget is disabled it logs a single Debug line and closes the channel. The Warn path is preserved for the genuine failure case (gadget enabled but the device could not be opened).

Testing

Built with the buildkit toolchain and deployed on a JetKVM (v2, system 0.2.8) running a 0.5.8-based build: with the serial console disabled, the warning no longer appears across multiple client sessions.

🤖 Generated with Claude Code

The CDC-ACM data channel opens /dev/ttyGS0 in its OnOpen handler. When
the serial console USB gadget is disabled (the default), that device
node does not exist, so every channel open logged a Warn about failing
to open the device.

Check config.UsbDevices.SerialConsole first: when the console gadget is
not enabled, log a single Debug line and close the channel instead of
attempting the open and warning. The existing Warn is kept for the case
where the gadget is enabled but the open genuinely fails.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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