README (e5451c8f8330e03ad3cfa16048b4daf961af434f) README (444d930998f87ce2b5803866ecd171fdbd2c85ec)
1#
2# README for usbip-utils
3#
4# Copyright (C) 2011 matt mooney <mfm@muteddisk.com>
5# 2005-2008 Takahiro Hirofuchi
6
1#
2# README for usbip-utils
3#
4# Copyright (C) 2011 matt mooney <mfm@muteddisk.com>
5# 2005-2008 Takahiro Hirofuchi
6
7[Overview]
8USB/IP protocol allows to pass USB device from server to client over the
9network. Server is a machine which provides (shares) a USB device. Client is
10a machine which uses USB device provided by server over the network.
11The USB device may be either physical device connected to a server or
12software entity created on a server using USB gadget subsystem.
13Whole project consists of four parts:
7
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.
30
8[Requirements]
9 - USB/IP device drivers
31[Requirements]
32 - 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.
11
12 - libudev >= 2.0
13 libudev library
14
15 - libwrap0-dev
16 tcp wrapper library
17
18 - gcc >= 4.0

--- 12 unchanged lines hidden (view full) ---

31 1. Compile & install the userspace utilities.
32 $ ./configure [--with-tcp-wrappers=no] [--with-usbids-dir=<dir>]
33 $ make install
34
35 2. Compile & install USB/IP drivers.
36
37
38[Usage]
34
35 - libudev >= 2.0
36 libudev library
37
38 - libwrap0-dev
39 tcp wrapper library
40
41 - gcc >= 4.0

--- 12 unchanged lines hidden (view full) ---

54 1. Compile & install the userspace utilities.
55 $ ./configure [--with-tcp-wrappers=no] [--with-usbids-dir=<dir>]
56 $ make install
57
58 2. Compile & install USB/IP drivers.
59
60
61[Usage]
62On a server side there are two entities which can be shared.
63First of them is physical usb device connected to the machine.
64To make it available below steps should be executed:
65
39 server:# (Physically attach your USB device.)
40
41 server:# insmod usbip-core.ko
42 server:# insmod usbip-host.ko
43
44 server:# usbipd -D
45 - Start usbip daemon.
46
47 server:# usbip list -l
48 - List driver assignments for USB devices.
49
50 server:# usbip bind --busid 1-2
51 - Bind usbip-host.ko to the device with busid 1-2.
52 - The USB device 1-2 is now exportable to other hosts!
53 - Use `usbip unbind --busid 1-2' to stop exporting the device.
54
66 server:# (Physically attach your USB device.)
67
68 server:# insmod usbip-core.ko
69 server:# insmod usbip-host.ko
70
71 server:# usbipd -D
72 - Start usbip daemon.
73
74 server:# usbip list -l
75 - List driver assignments for USB devices.
76
77 server:# usbip bind --busid 1-2
78 - Bind usbip-host.ko to the device with busid 1-2.
79 - The USB device 1-2 is now exportable to other hosts!
80 - Use `usbip unbind --busid 1-2' to stop exporting the device.
81
82Second of shareable entities is USB Gadget created using USB Gadget Subsystem
83on 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
104To attach new device to client machine below commands should be used:
105
55 client:# insmod usbip-core.ko
56 client:# insmod vhci-hcd.ko
57
58 client:# usbip list --remote <host>
59 - List exported USB devices on the <host>.
60
61 client:# usbip attach --remote <host> --busid 1-2
62 - Connect the remote USB device.
106 client:# insmod usbip-core.ko
107 client:# insmod vhci-hcd.ko
108
109 client:# usbip list --remote <host>
110 - List exported USB devices on the <host>.
111
112 client:# usbip attach --remote <host> --busid 1-2
113 - 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
63
64 client:# usbip port
65 - Show virtual port status.
66
67 client:# usbip detach --port <port>
68 - Detach the USB device.
69
70

--- 116 unchanged lines hidden (view full) ---

187 port 0 detached
188
189
190[Checklist]
191 - See 'Debug Tips' on the project wiki.
192 - http://usbip.wiki.sourceforge.net/how-to-debug-usbip
193 - usbip-host.ko must be bound to the target device.
194 - See /proc/bus/usb/devices and find "Driver=..." lines of the device.
116
117 client:# usbip port
118 - Show virtual port status.
119
120 client:# usbip detach --port <port>
121 - Detach the USB device.
122
123

--- 116 unchanged lines hidden (view full) ---

240 port 0 detached
241
242
243[Checklist]
244 - See 'Debug Tips' on the project wiki.
245 - http://usbip.wiki.sourceforge.net/how-to-debug-usbip
246 - usbip-host.ko must be bound to the target device.
247 - 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)
195 - Shutdown firewall.
196 - usbip now uses TCP port 3240.
197 - Disable SELinux.
198 - Check the kernel and daemon messages.
199
200
201[Contact]
202 Mailing List: linux-usb@vger.kernel.org
250 - Shutdown firewall.
251 - usbip now uses TCP port 3240.
252 - Disable SELinux.
253 - Check the kernel and daemon messages.
254
255
256[Contact]
257 Mailing List: linux-usb@vger.kernel.org