Skip to content

usb: usbip: add initial support for USBIP server #74141

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

Merged
merged 17 commits into from
Feb 10, 2025

Conversation

jfischer-no
Copy link
Collaborator

@jfischer-no jfischer-no commented Jun 12, 2024

The server uses minimal host support to export a USB device to a remote
USBIP client. It supports control and bulk transfers, interrupt
transfers may also work, but this depends on the host controller used.
Only a single USB device can be exported yet.

@jfischer-no jfischer-no added area: USB Universal Serial Bus Experimental Experimental features not enabled by default labels Jun 12, 2024
@jfischer-no jfischer-no self-assigned this Jun 12, 2024
*
* SPDX-License-Identifier: Apache-2.0
*/

Copy link
Collaborator

Choose a reason for hiding this comment

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

This file is missing include guards.

@github-actions github-actions bot added the Stale label Aug 17, 2024
@jfischer-no jfischer-no removed the Stale label Aug 19, 2024
@zephyrproject-rtos zephyrproject-rtos deleted a comment from github-actions bot Aug 19, 2024
@github-actions github-actions bot added the Stale label Oct 19, 2024
@jfischer-no jfischer-no removed the Stale label Oct 21, 2024
@zephyrproject-rtos zephyrproject-rtos deleted a comment from github-actions bot Oct 21, 2024
@github-actions github-actions bot added the Stale label Dec 21, 2024
@github-actions github-actions bot closed this Jan 5, 2025
@jfischer-no jfischer-no reopened this Jan 6, 2025
@zephyrproject-rtos zephyrproject-rtos deleted a comment from github-actions bot Jan 6, 2025
@jfischer-no jfischer-no removed the Stale label Jan 6, 2025
@jfischer-no jfischer-no force-pushed the pr-uhc-usbip-initial branch 3 times, most recently from d123ee7 to 01328a1 Compare January 6, 2025 16:16
@jfischer-no jfischer-no added this to the v4.1.0 milestone Jan 17, 2025
@jfischer-no jfischer-no force-pushed the pr-uhc-usbip-initial branch 2 times, most recently from e0dac48 to 57a7aab Compare January 21, 2025 09:10
@jfischer-no jfischer-no marked this pull request as ready for review January 21, 2025 12:05
@jfischer-no
Copy link
Collaborator Author

rebased to resolve conflicts (loopback PR).

@jfischer-no
Copy link
Collaborator Author

I just want to put forward a huge thank you to @jfischer-no for your work on this! I'm really excited and looking forward to this being merged

This is still initial support. There are performance issues using it with virtual devices such as native_sim, and I have not had time to test it on real devices, but that is on my list.

nordicjm
nordicjm previously approved these changes Feb 7, 2025
Copy link
Collaborator

@nordicjm nordicjm left a comment

Choose a reason for hiding this comment

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

Nit. build system changes OK

module-str = usbip
source "subsys/logging/Kconfig.template.log_config"

endif #USBIP
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
endif #USBIP
endif # USBIP

modprobe usbip-core
modprobe usbip-host

There are a few basic commands for everyday use. To list exported USB devices,
Copy link
Collaborator

Choose a reason for hiding this comment

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

worth mentioning packages to get for ubuntu here so users don't have to search for why the command is not found?

CONFIG_NET_TCP=y
CONFIG_NET_SOCKETS=y

#CONFIG_NO_OPTIMIZATIONS=y
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
#CONFIG_NO_OPTIMIZATIONS=y

The server uses host support to export a USB device to a remote
USBIP client. It supports control and bulk transfers, interrupt
transfers may also work, but this depends on the host controller used.

Signed-off-by: Johann Fischer <[email protected]>
Snippet that helps to build USB device samples with virtual device and
host controllers and USBIP support.

Signed-off-by: Johann Fischer <[email protected]>
Add initial USB/IP documentation for the new USB support.

Signed-off-by: Johann Fischer <[email protected]>
@kartben kartben merged commit d9f40b4 into zephyrproject-rtos:main Feb 10, 2025
24 checks passed
@jfischer-no jfischer-no deleted the pr-uhc-usbip-initial branch February 10, 2025 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Build System area: USB Universal Serial Bus Experimental Experimental features not enabled by default
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants