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