Skip to content

embassy-usb: add CDC-ECM device and host class drivers - #7496

Merged
leftger merged 4 commits into
embassy-rs:mainfrom
leftger:feat/usb-net
Nov 11, 2026
Merged

leftger merged 4 commits into
embassy-rs:mainfrom
leftger:feat/usb-net

Conversation

@leftger

@leftger leftger commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the USB Communications Device Class - Ethernet Control Model (CDC-ECM, class 0x02, subclass 0x06) to embassy-usb, supporting both device and host roles:

  • Device (class::cdc_ecm::device): Exposes raw Ethernet frame communication over USB bulk endpoints (no NTB encapsulation needed, unlike CDC-NCM). Integrates with embassy-net-driver-channel via into_embassy_net_device(), allowing full TCP/IP networking with embassy-net. Handles standard ECM control requests (SET_ETHERNET_PACKET_FILTER, SET_ETHERNET_MULTICAST_FILTERS) and MAC address string conversion.
  • Host (class::cdc_ecm::host): Implements EcmMatcher and EcmHost driver capable of attaching to USB Ethernet adapters, cellular 4G/LTE modems in ECM mode, and embedded devices running ECM gadget mode. Also provides into_embassy_net_device() to pipe USB Ethernet directly into embassy-net.

@github-actions github-actions Bot added the e-usb label Nov 10, 2026
@leftger
leftger marked this pull request as draft November 10, 2026 19:06
@leftger
leftger marked this pull request as ready for review November 11, 2026 09:27
@embassy-bot

embassy-bot Bot commented Nov 11, 2026

Copy link
Copy Markdown

CI on this pull request is failing, so it isn't in the review queue yet. A pull request needs passing CI to be queued for review — push a fix and it'll be added automatically.

@leftger

leftger commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

bender run

@leftger
leftger enabled auto-merge November 11, 2026 12:14
@leftger
leftger added this pull request to the merge queue Nov 11, 2026
Merged via the queue into embassy-rs:main with commit 5c6a6f9 Nov 11, 2026
8 checks passed
@leftger
leftger deleted the feat/usb-net branch November 11, 2026 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant