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

sys/usb: Use luid_base for stable USB serials #20944

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

maribu
Copy link
Member

@maribu maribu commented Oct 28, 2024

Contribution description

This uses luid_base() instead of luid_get() to create USB serials in a stable manner. This is useful when having multiple instances of the same board connected via USB CDC ACM and telling the TTYs apart.

Testing procedure

Two instances of the same board using CDC ACM as default stdio should (if they do have decent CPU IDs) now yield serials that only depend on the board and not on the app flashed.

Issues/PRs references

None

@github-actions github-actions bot added Area: USB Area: Universal Serial Bus Area: sys Area: System labels Oct 28, 2024
@maribu maribu added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Process: API change Integration Process: PR contains or issue proposes an API change. Should be handled with care. CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed Area: USB Area: Universal Serial Bus Area: sys Area: System Process: API change Integration Process: PR contains or issue proposes an API change. Should be handled with care. labels Oct 28, 2024
@maribu
Copy link
Member Author

maribu commented Oct 28, 2024

Let's not call this one a breaking API change: Before, the USB serial was not stable anyway, so changing this with this PR is not yielding unexpected behavior.

@riot-ci
Copy link

riot-ci commented Oct 28, 2024

Murdock results

✔️ PASSED

6b80a1a sys/usb: Use luid_base for stable USB serials

Success Failures Total Runtime
10215 0 10215 17m:40s

Artifacts

sys/usb/usbus/usbus.c Outdated Show resolved Hide resolved
This is useful when having multiple instances of the same board
connected via USB CDC ACM and telling the TTYs apart.
@github-actions github-actions bot added Area: USB Area: Universal Serial Bus Area: sys Area: System labels Oct 29, 2024
@maribu maribu changed the title sys/usb: Use luid_custom for stable USB serials sys/usb: Use luid_base for stable USB serials Oct 29, 2024
@maribu maribu added this pull request to the merge queue Oct 29, 2024
Merged via the queue into RIOT-OS:master with commit 02e0595 Oct 29, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: sys Area: System Area: USB Area: Universal Serial Bus CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants