• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# README for usbip-utils
3#
4# Copyright (C) 2011 matt mooney <mfm@muteddisk.com>
5#               2005-2008 Takahiro Hirofuchi
6
7
8[Requirements]
9    - USB/IP device drivers
10	Found in the staging directory of the Linux kernel.
11
12    - sysfsutils >= 2.0.0
13	sysfsutils library
14
15    - libwrap0-dev
16	tcp wrapper library
17
18    - gcc >= 4.0
19
20    - libglib2.0-dev >= 2.6.0
21
22    - libtool, automake >= 1.9, autoconf >= 2.5.0, pkg-config
23
24
25[Install]
26    0. Generate configuration scripts.
27	$ ./autogen.sh
28
29    1. Compile & install the userspace utilities.
30	$ ./configure [--with-tcp-wrappers=no] [--with-usbids-dir=<dir>]
31	$ make install
32
33    2. Compile & install USB/IP drivers.
34
35
36[Usage]
37    server:# (Physically attach your USB device.)
38
39    server:# insmod usbip-core.ko
40    server:# insmod usbip-host.ko
41
42    server:# usbipd -D
43	- Start usbip daemon.
44
45    server:# usbip list -l
46	- List driver assignments for USB devices.
47
48    server:# usbip bind --busid 1-2
49	- Bind usbip-host.ko to the device with busid 1-2.
50	- The USB device 1-2 is now exportable to other hosts!
51	- Use `usbip unbind --busid 1-2' to stop exporting the device.
52
53    client:# insmod usbip-core.ko
54    client:# insmod vhci-hcd.ko
55
56    client:# usbip list --remote <host>
57	- List exported USB devices on the <host>.
58
59    client:# usbip attach --host <host> --busid 1-2
60	- Connect the remote USB device.
61
62    client:# usbip port
63	- Show virtual port status.
64
65    client:# usbip detach --port <port>
66	- Detach the USB device.
67
68
69[Example]
70---------------------------
71	SERVER SIDE
72---------------------------
73Physically attach your USB devices to this host.
74
75    trois:# insmod path/to/usbip-core.ko
76    trois:# insmod path/to/usbip-host.ko
77    trois:# usbipd -D
78
79In another terminal, let's look up what USB devices are physically
80attached to this host.
81
82    trois:# usbip list -l
83    Local USB devices
84    =================
85     - busid 1-1 (05a9:a511)
86	     1-1:1.0 -> ov511
87
88     - busid 3-2 (0711:0902)
89	     3-2:1.0 -> none
90
91     - busid 3-3.1 (08bb:2702)
92	     3-3.1:1.0 -> snd-usb-audio
93	     3-3.1:1.1 -> snd-usb-audio
94
95     - busid 3-3.2 (04bb:0206)
96	     3-3.2:1.0 -> usb-storage
97
98     - busid 3-3 (0409:0058)
99	     3-3:1.0 -> hub
100
101     - busid 4-1 (046d:08b2)
102	     4-1:1.0 -> none
103	     4-1:1.1 -> none
104	     4-1:1.2 -> none
105
106     - busid 5-2 (058f:9254)
107	     5-2:1.0 -> hub
108
109A USB storage device of busid 3-3.2 is now bound to the usb-storage
110driver. To export this device, we first mark the device as
111"exportable"; the device is bound to the usbip-host driver. Please
112remember you can not export a USB hub.
113
114Mark the device of busid 3-3.2 as exportable:
115
116    trois:# usbip --debug bind --busid 3-3.2
117    ...
118    usbip debug: usbip_bind.c:162:[unbind_other] 3-3.2:1.0 -> usb-storage
119    ...
120    bind device on busid 3-3.2: complete
121
122    trois:# usbip list -l
123    Local USB devices
124    =================
125    ...
126
127     - busid 3-3.2 (04bb:0206)
128	     3-3.2:1.0 -> usbip-host
129    ...
130
131---------------------------
132	CLIENT SIDE
133---------------------------
134First, let's list available remote devices that are marked as
135exportable on the host.
136
137    deux:# insmod path/to/usbip-core.ko
138    deux:# insmod path/to/vhci-hcd.ko
139
140    deux:# usbip list --remote 10.0.0.3
141    Exportable USB devices
142    ======================
143     - 10.0.0.3
144	    1-1: Prolific Technology, Inc. : unknown product (067b:3507)
145	       : /sys/devices/pci0000:00/0000:00:1f.2/usb1/1-1
146	       : (Defined at Interface level) / unknown subclass / unknown protocol (00/00/00)
147	       :  0 - Mass Storage / SCSI / Bulk (Zip) (08/06/50)
148
149	1-2.2.1: Apple Computer, Inc. : unknown product (05ac:0203)
150	       : /sys/devices/pci0000:00/0000:00:1f.2/usb1/1-2/1-2.2/1-2.2.1
151	       : (Defined at Interface level) / unknown subclass / unknown protocol (00/00/00)
152	       :  0 - Human Interface Devices / Boot Interface Subclass / Keyboard (03/01/01)
153
154	1-2.2.3: OmniVision Technologies, Inc. : OV511+ WebCam (05a9:a511)
155	       : /sys/devices/pci0000:00/0000:00:1f.2/usb1/1-2/1-2.2/1-2.2.3
156	       : (Defined at Interface level) / unknown subclass / unknown protocol (00/00/00)
157	       :  0 - Vendor Specific Class / unknown subclass / unknown protocol (ff/00/00)
158
159	    3-1: Logitech, Inc. : QuickCam Pro 4000 (046d:08b2)
160	       : /sys/devices/pci0000:00/0000:00:1e.0/0000:02:0a.0/usb3/3-1
161	       : (Defined at Interface level) / unknown subclass / unknown protocol (00/00/00)
162	       :  0 - Data / unknown subclass / unknown protocol (0a/ff/00)
163	       :  1 - Audio / Control Device / unknown protocol (01/01/00)
164	       :  2 - Audio / Streaming / unknown protocol (01/02/00)
165
166Attach a remote USB device:
167
168    deux:# usbip attach --host 10.0.0.3 --busid 1-1
169    port 0 attached
170
171Show the devices attached to this client:
172
173    deux:# usbip port
174    Port 00: <Port in Use> at Full Speed(12Mbps)
175	   Prolific Technology, Inc. : unknown product (067b:3507)
176	   6-1 -> usbip://10.0.0.3:3240/1-1  (remote bus/dev 001/004)
177	   6-1:1.0 used by usb-storage
178			  /sys/class/scsi_device/0:0:0:0/device
179			  /sys/class/scsi_host/host0/device
180			  /sys/block/sda/device
181
182Detach the imported device:
183
184    deux:# usbip detach --port 0
185    port 0 detached
186
187
188[Checklist]
189    - See 'Debug Tips' on the project wiki.
190	- http://usbip.wiki.sourceforge.net/how-to-debug-usbip
191    - usbip-host.ko must be bound to the target device.
192	- See /proc/bus/usb/devices and find "Driver=..." lines of the device.
193    - Shutdown firewall.
194	- usbip now uses TCP port 3240.
195    - Disable SELinux.
196    - If possible, compile your kernel with CONFIG_USB_DEBUG flag and try again.
197    - Check the kernel and daemon messages.
198
199
200[Contact]
201    Mailing List: linux-usb@vger.kernel.org
202