Skip to content

Conversation

@jukkar
Copy link
Member

@jukkar jukkar commented Oct 7, 2024

This implements USB Network Control Model (NCM) driver for the USB next stack.

Following things are not implemented (yet):

  • ntb32 format support
  • Sending more than 1 Ethernet frames / USB packet to host. Note that it is possible to receive more than one Ethernet frames / USB packet to device.

How to try this:

west build -p -b nrf5340dk/nrf5340/cpuapp -d ../build/usb-next-zperf samples/net/zperf/ -- \
-DEXTRA_DTC_OVERLAY_FILE="usbd_next_ncm.overlay" \
-DOVERLAY_CONFIG="overlay-usbd_next.conf" \
-DCONFIG_NET_SHELL=y -DCONFIG_NET_LOG=y \
-DCONFIG_NET_L2_ETHERNET=y \
-DCONFIG_USB_DEVICE_STACK_NEXT=y \
-DCONFIG_USBD_SHELL=y \
-DCONFIG_USBD_CDC_NCM_LOG_LEVEL_DBG=n \
-DCONFIG_NET_IF_LOG_LEVEL_DBG=n

@jukkar jukkar requested a review from jfischer-no October 7, 2024 14:41
@jukkar jukkar force-pushed the devel/usb-ncm branch 2 times, most recently from f299a12 to d1efbbf Compare October 9, 2024 06:33
@jukkar
Copy link
Member Author

jukkar commented Oct 9, 2024

  • CI fixes

rlubos
rlubos previously approved these changes Oct 10, 2024
Copy link
Contributor

@rlubos rlubos left a comment

Choose a reason for hiding this comment

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

Net part looks ok.

@jfischer-no jfischer-no changed the title USB next NCM driver usb: device_next: USB CDC NCM class implementation Oct 15, 2024
@jfischer-no jfischer-no assigned jfischer-no and unassigned kartben Oct 15, 2024
@jukkar
Copy link
Member Author

jukkar commented Oct 15, 2024

  • Updated according to comments
  • Rebased against latest main

@jukkar
Copy link
Member Author

jukkar commented Oct 15, 2024

  • Updated according to comments

@jukkar jukkar force-pushed the devel/usb-ncm branch 2 times, most recently from 48cc675 to 03e8979 Compare October 16, 2024 12:55
@jukkar
Copy link
Member Author

jukkar commented Oct 16, 2024

  • reworked and simplified the sending side
  • updated to latest main

@jukkar
Copy link
Member Author

jukkar commented Oct 16, 2024

  • removed extra unused variable from cdc_ncm_acl_out_cb()

jfischer-no
jfischer-no previously approved these changes Oct 16, 2024
Copy link
Contributor

@jfischer-no jfischer-no left a comment

Choose a reason for hiding this comment

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

Thank you

@jfischer-no jfischer-no added this to the v4.0.0 milestone Oct 16, 2024
@jukkar jukkar requested a review from rlubos October 16, 2024 14:26
USB NCM Ethernet driver implementation.

Signed-off-by: Jukka Rissanen <[email protected]>
Add NCM class to sample usbd initialization and the code
triple is set properly.

Signed-off-by: Jukka Rissanen <[email protected]>
Add support for USB cdc_ncm to zperf application.

Signed-off-by: Jukka Rissanen <[email protected]>
Add support for USB cdc_ncm to echo-server application.

Signed-off-by: Jukka Rissanen <[email protected]>
@jukkar
Copy link
Member Author

jukkar commented Oct 17, 2024

  • resolving merge conflict

@nashif nashif merged commit 4c0a72b into zephyrproject-rtos:main Oct 17, 2024
@jukkar jukkar deleted the devel/usb-ncm branch October 18, 2024 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants