最後更新: 2015-05-20
Homepage
http://usbip.sourceforge.net/
支援
- USB storage devices
- USB keyboards and USB mice
- USB webcams and USB speakers
- USB printers, USB scanners,
- USB serial converters and
- USB Ethernet interfaces
Diagram:
client host Server
VHCI -----------> Stub driver
(Virtual Host Controller Interface) driver
In the server
load usbip_common_mod.ko and vhci-hcd.ko
client host
load usbip_common_mod.ko and usbip.ko,
安裝
apt-get install usbip
/usr/sbin/usbip
/usr/sbin/usbipd
/usr/sbin/usbip_bind_driver
-l, --list <hosts>
Usage
C:\usbip>usbip -l 192.168.88.151
- 192.168.88.151
2-1.4: Philips : Senselock SenseIV v2.x (0471:485d)
: /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4
: Vendor Specific Class / unknown subclass / unknown protocol (ff/00/00)
: 0 - Vendor Specific Class / unknown subclass / unknown protocol (ff/a0/b0)
-a, --attach <host> <bus_id>
C:\usbip>usbip -a 192.168.88.151 2-1.4
new usb device attached to usbvbus port 1
-p, --port // List virtual USB port status.
Server 會見到
connected from 192.168.88.208:1044 connected from 192.168.88.208:1045 connected from 192.168.88.208:1046 connect 2-1.4
C:\usbip>usbip.exe -p
max used port:1
port 1: used
-d, --detach <ports>
server:~# modprobe usbip
server:~# modprobe usbip_common_mod
server:# usbipd -D
-D, --daemon
server:# usbip_bind_driver --list
List USB devices
- busid 1-1 (8087:0024)
1-1:1.0 -> hub
- busid 2-1 (8087:0024)
2-1:1.0 -> hub
- busid 2-1.4 (0471:485d)
2-1.4:1.0 -> none
server:# usbip_bind_driver --usbip 2-1.4 // Make a device exportable
** (process:4744): DEBUG: 2-1.4:1.0 -> none
** (process:4744): DEBUG: write "add 2-1.4" to /sys/bus/usb/drivers/usbip/match_busid
** Message: bind 2-1.4 to usbip, complete!
server:# usbip_bind_driver --other 2-1.4 // Use a device by a local driver