Skip to content

Conversation

tzy0002088
Copy link

@tzy0002088 tzy0002088 commented Sep 22, 2025

Specify the usb_ncm device in net_config_init_app to avoid issues when multiple network interfaces are present.

Copy link

Hello @tzy0002088, and thank you very much for your first pull request to the Zephyr project!
Our Continuous Integration pipeline will execute a series of checks on your Pull Request commit messages and code, and you are expected to address any failures by updating the PR. Please take a look at our commit message guidelines to find out how to format your commit messages, and at our contribution workflow to understand how to update your Pull Request. If you haven't already, please make sure to review the project's Contributor Expectations and update (by amending and force-pushing the commits) your pull request if necessary.
If you are stuck or need help please join us on Discord and ask your question there. Additionally, you can escalate the review when applicable. 😊

@zephyrbot zephyrbot added area: Samples Samples area: Networking size: XS A PR changing only a single line of code area: Sockets Networking sockets labels Sep 22, 2025
@tzy0002088 tzy0002088 changed the title 【modify】echo_server usb.c, specify the usb network card device to avo… sample: echo_server: specify the USB network device Sep 22, 2025
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.

No objection with the change, but please follow Pull Request guidelines, specifically:

  • Pull Request needs description,
  • Commit's sign-off entry must match commit author's name.

Plus the compliance issue with line length needs fixing.

@tzy0002088 tzy0002088 force-pushed the echo_server_usb branch 2 times, most recently from 90d7d99 to 9097400 Compare September 22, 2025 14:44
}

(void)net_config_init_app(NULL, "Initializing network");
(void)net_config_init_app(DEVICE_DT_GET(DT_NODELABEL(cdc_ncm_eth0)),
Copy link
Member

Choose a reason for hiding this comment

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

One enhancement for the future PR could be to make the label configurable so that user could set "cdc_ncm_eth0" or similar via kconfig option.

Copy link
Author

Choose a reason for hiding this comment

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

Yes, it is better to be able to configure rather than hard-code

@jukkar
Copy link
Member

jukkar commented Sep 22, 2025

Please fix the compliance error. It now says

Error: See https://docs.zephyrproject.org/latest/contribute/guidelines.html#commit-guidelines for more details 1: UC2 Signed-off-by: must have a full name Error: See https://docs.zephyrproject.org/latest/contribute/guidelines.html#commit-guidelines for more details ba5d6f437abe9f48ed76487e792ed34d31432ba3: Signed-off-by line (Signed-off-by: tangzhenye <tangzhenye@proton.me>) does not follow the syntax: First Last <email>. Compliance error, check for error messages in the "Run Compliance Tests" step You can run this step locally with the ./scripts/ci/check_compliance.py script. Error: Process completed with exit code 1. 
When there are multiple network cards in the system, usb.c will select the first network card as the USB network card device, which will cause problems. Signed-off-by: tangzhenye <zytang@linkedsemi.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Networking area: Samples Samples area: Sockets Networking sockets size: XS A PR changing only a single line of code

4 participants