1
# vim:tw=78:ts=4:expandtab:ai:sw=4
3
# README for usbip-utils
5
# Copyright (C) 2005-2008 Takahiro Hirofuchi
9
- USB/IP device drivers
10
Its source code is included under $(top)/drivers/.
20
- libglib2.0-dev >= 2.6.0
22
- libtool, automake >= 1.9, autoconf >= 2.5.0, pkg-config
25
0. Skip here if you see a configure script.
32
2. Compile & install USB/IP drivers if not yet.
35
server:# (Attach your USB device physically.)
37
server:# insmod usbip-core.ko
38
server:# insmod usbip-host.ko
39
- It was formerly named as stub.ko.
44
server:# usbip_bind_driver --list
45
- List driver assignments for usb devices.
47
server:# usbip_bind_driver --usbip 1-2
48
- Bind usbip-host.ko to the device of busid 1-2.
49
- A usb device 1-2 is now exportable to other hosts!
50
- Use 'usbip_bind_driver --other 1-2' when you want to shutdown exporting
51
and use the device locally.
54
client:# insmod usbip-core.ko
55
client:# insmod vhci-hcd.ko
56
- It was formerly named as vhci.ko.
58
client:# usbip --list server
59
- List exportable usb devices on the server.
61
client:# usbip --attach server 1-2
62
- Connect the remote USB device.
65
- Show virtual port status.
67
client:# usbip --detach 0
68
- Detach the usb device.
72
--------------------------------------------------------------------------------------------------------
73
- SERVER SIDE (physically attach your USB devices to this host) ----------------------------------------
74
--------------------------------------------------------------------------------------------------------
75
trois:# insmod (somewhere)/usbip-core.ko
76
trois:# insmod (somewhere)/usbip-host.ko
79
--------------------------------------------------------------------------------------------------------
80
In another terminal, let's look up what usb devices are physically attached to
81
this host. We can see a usb storage device of busid 3-3.2 is now bound to
82
usb-storage driver. To export this device, we first mark the device as
83
"exportable"; the device is bound to usbip driver. Please remember you can not
86
trois:# usbip_bind_driver --list
88
- busid 3-3.2 (04bb:0206)
89
3-3.2:1.0 -> usb-storage
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
95
- busid 3-3 (0409:0058)
98
- busid 3-2 (0711:0902)
101
- busid 1-1 (05a9:a511)
104
- busid 4-1 (046d:08b2)
109
- busid 5-2 (058f:9254)
112
--------------------------------------------------------------------------------------------------------
113
Mark the device of busid 3-3.2 as exportable.
115
trois:# usbip_bind_driver --usbip 3-3.2
116
** (process:24621): DEBUG: 3-3.2:1.0 -> none
117
** (process:24621): DEBUG: write "add 3-3.2" to /sys/bus/usb/drivers/usbip/match_busid
118
** Message: bind 3-3.2 to usbip, complete!
120
trois:# usbip_bind_driver --list
122
- busid 3-3.2 (04bb:0206)
126
Iterate the above operation for other devices if you like.
129
--------------------------------------------------------------------------------------------------------
130
- CLIENT SIDE ------------------------------------------------------------------------------------------
131
--------------------------------------------------------------------------------------------------------
132
First, let's list available remote devices which are marked as exportable in
135
deux:# insmod (somewhere)/usbip-core.ko
136
deux:# insmod (somewhere)/vhci_hcd.ko
138
deux:# usbip --list 10.0.0.3
140
1-1: Prolific Technology, Inc. : unknown product (067b:3507)
141
: /sys/devices/pci0000:00/0000:00:1f.2/usb1/1-1
142
: (Defined at Interface level) / unknown subclass / unknown protocol (00/00/00)
143
: 0 - Mass Storage / SCSI / Bulk (Zip) (08/06/50)
145
1-2.2.1: Apple Computer, Inc. : unknown product (05ac:0203)
146
: /sys/devices/pci0000:00/0000:00:1f.2/usb1/1-2/1-2.2/1-2.2.1
147
: (Defined at Interface level) / unknown subclass / unknown protocol (00/00/00)
148
: 0 - Human Interface Devices / Boot Interface Subclass / Keyboard (03/01/01)
150
1-2.2.3: OmniVision Technologies, Inc. : OV511+ WebCam (05a9:a511)
151
: /sys/devices/pci0000:00/0000:00:1f.2/usb1/1-2/1-2.2/1-2.2.3
152
: (Defined at Interface level) / unknown subclass / unknown protocol (00/00/00)
153
: 0 - Vendor Specific Class / unknown subclass / unknown protocol (ff/00/00)
155
3-1: Logitech, Inc. : QuickCam Pro 4000 (046d:08b2)
156
: /sys/devices/pci0000:00/0000:00:1e.0/0000:02:0a.0/usb3/3-1
157
: (Defined at Interface level) / unknown subclass / unknown protocol (00/00/00)
158
: 0 - Data / unknown subclass / unknown protocol (0a/ff/00)
159
: 1 - Audio / Control Device / unknown protocol (01/01/00)
160
: 2 - Audio / Streaming / unknown protocol (01/02/00)
162
4-1: Logitech, Inc. : QuickCam Express (046d:0870)
163
: /sys/devices/pci0000:00/0000:00:1e.0/0000:02:0a.1/usb4/4-1
164
: Vendor Specific Class / Vendor Specific Subclass / Vendor Specific Protocol (ff/ff/ff)
165
: 0 - Vendor Specific Class / Vendor Specific Subclass / Vendor Specific Protocol (ff/ff/ff)
167
4-2: Texas Instruments Japan : unknown product (08bb:2702)
168
: /sys/devices/pci0000:00/0000:00:1e.0/0000:02:0a.1/usb4/4-2
169
: (Defined at Interface level) / unknown subclass / unknown protocol (00/00/00)
170
: 0 - Audio / Control Device / unknown protocol (01/01/00)
171
: 1 - Audio / Streaming / unknown protocol (01/02/00)
173
--------------------------------------------------------------------------------------------------------
174
Attach a remote usb device!
176
deux:# usbip --attach 10.0.0.3 1-1
179
--------------------------------------------------------------------------------------------------------
180
Show what devices are attached to this client.
183
Port 00: <Port in Use> at Full Speed(12Mbps)
184
Prolific Technology, Inc. : unknown product (067b:3507)
185
6-1 -> usbip://10.0.0.3:3240/1-1 (remote bus/dev 001/004)
186
6-1:1.0 used by usb-storage
187
/sys/class/scsi_device/0:0:0:0/device
188
/sys/class/scsi_host/host0/device
189
/sys/block/sda/device
191
--------------------------------------------------------------------------------------------------------
192
Detach the imported device.
194
deux:# usbip --detach 0
197
--------------------------------------------------------------------------------------------------------
201
- See Debug Tips in the project wiki.
202
- http://usbip.wiki.sourceforge.net/how-to-debug-usbip
203
- usbip-host.ko must be bound to the target device.
204
- See /proc/bus/usb/devices and find "Driver=..." lines of the device.
206
- usbip now uses TCP port 3240.
208
- If possible, compile your kernel with CONFIG_USB_DEBUG flag and try
210
- Check your kernel and daemon messages.
211
ex. /var/log/{messages, kern.log, daemon.log, syslog}
215
Mailing List: usbip-devel _at_ lists.sourceforge.net