Skip to content

Commit 444d930

Browse files
kopasiakgregkh
authored andcommitted
tools: usb: usbip: Update README
Update README file: - remove outdated parts - clarify terminology and general structure - add some description of vUDC Signed-off-by: Krzysztof Opasiak <[email protected]> Acked-by: Shuah Khan <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 68bd6fc commit 444d930

File tree

1 file changed

+56
-1
lines changed

1 file changed

+56
-1
lines changed

tools/usb/usbip/README

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,33 @@
44
# Copyright (C) 2011 matt mooney <[email protected]>
55
# 2005-2008 Takahiro Hirofuchi
66

7+
[Overview]
8+
USB/IP protocol allows to pass USB device from server to client over the
9+
network. Server is a machine which provides (shares) a USB device. Client is
10+
a machine which uses USB device provided by server over the network.
11+
The USB device may be either physical device connected to a server or
12+
software entity created on a server using USB gadget subsystem.
13+
Whole project consists of four parts:
14+
15+
- usbip-vhci
16+
A client side kernel module which provides a virtual USB Host Controller
17+
and allows to import a USB device from a remote machine.
18+
19+
- usbip-host (stub driver)
20+
A server side module which provides a USB device driver which can be
21+
bound to a physical USB device to make it exportable.
22+
23+
- usbip-vudc
24+
A server side module which provides a virtual USB Device Controller and allows
25+
to export a USB device created using USB Gadget Subsystem.
26+
27+
- usbip-utils
28+
A set of userspace tools used to handle connection and management.
29+
Used on both sides.
730

831
[Requirements]
932
- USB/IP device drivers
10-
Found in the staging directory of the Linux kernel.
33+
Found in the drivers/usb/usbip/ directory of the Linux kernel tree.
1134

1235
- libudev >= 2.0
1336
libudev library
@@ -36,6 +59,10 @@
3659

3760

3861
[Usage]
62+
On a server side there are two entities which can be shared.
63+
First of them is physical usb device connected to the machine.
64+
To make it available below steps should be executed:
65+
3966
server:# (Physically attach your USB device.)
4067

4168
server:# insmod usbip-core.ko
@@ -52,6 +79,30 @@
5279
- The USB device 1-2 is now exportable to other hosts!
5380
- Use `usbip unbind --busid 1-2' to stop exporting the device.
5481

82+
Second of shareable entities is USB Gadget created using USB Gadget Subsystem
83+
on a server machine. To make it available below steps should be executed:
84+
85+
server:# (Create your USB gadget)
86+
- Currently the most preferable way of creating a new USB gadget
87+
is ConfigFS Composite Gadget. Please refer to its documentation
88+
for details.
89+
- See vudc_server_example.sh for a short example of USB gadget creation
90+
91+
server:# insmod usbip-core.ko
92+
server:# insmod usbip-vudc.ko
93+
- To create more than one instance of vudc use num module param
94+
95+
server:# (Bind gadget to one of available vudc)
96+
- Assign your new gadget to USB/IP UDC
97+
- Using ConfigFS interface you may do this simply by:
98+
server:# cd /sys/kernel/config/usb_gadget/<gadget_name>
99+
server:# echo "usbip-vudc.0" > UDC
100+
101+
server:# usbipd -D --device
102+
- Start usbip daemon.
103+
104+
To attach new device to client machine below commands should be used:
105+
55106
client:# insmod usbip-core.ko
56107
client:# insmod vhci-hcd.ko
57108

@@ -60,6 +111,8 @@
60111

61112
client:# usbip attach --remote <host> --busid 1-2
62113
- Connect the remote USB device.
114+
- When using vudc on a server side busid is really vudc instance name.
115+
For example: usbip-vudc.0
63116

64117
client:# usbip port
65118
- Show virtual port status.
@@ -192,6 +245,8 @@ Detach the imported device:
192245
- http://usbip.wiki.sourceforge.net/how-to-debug-usbip
193246
- usbip-host.ko must be bound to the target device.
194247
- See /proc/bus/usb/devices and find "Driver=..." lines of the device.
248+
- Target USB gadget must be bound to vudc
249+
(using USB gadget susbsys, not usbip bind command)
195250
- Shutdown firewall.
196251
- usbip now uses TCP port 3240.
197252
- Disable SELinux.

0 commit comments

Comments
 (0)