How to run usbip properly

adapted from this blog post

Turns out the usbip package in Ubuntu doesn’t quite work properly, 6 years without updates, modules not being loaded, it’s THAT headache again.

Well here you go:

Install server under Linux

sudo -s
apt-get update && apt-get install sysfsutils libsysfs-dev libtool linux-source
cd /usr/src/linux-source-"$(uname -r)"
aunpack linux-source-"$(uname -r)".bz2
cd linux-source-"$(uname -r)"/drivers/staging/usbip/userspace
# Make version match with the client we want to use: Windows 2.0.0 signed
sed -i 's/USBIP_VERSION 0x00000111/USBIP_VERSION 0x00000106/g' configure
./configure --prefix=/usr --sysconfdir=/etc
make install
modprobe usbip-core
modprobe usbip-host
modprobe vhci-hcd

Use server under Linux:

# Start the daemon
usbipd -D
# List available usb ports
usbip list -l
# Expose a usb port
usbip bind -b <desired busid>

Use client under windows 7