USB/IP Server

Install

apt install linux-tools-common linux-tools-$(uname -r) hwdata
echo "usbip_host" >> /etc/modules

Usage

# if you didn't reboot, or add to /etc/modules, then:
modprobe usbip_host

usbipd -D

usbip list -l
usbip bind -b 1-1.5
usbip unbind -b 1-1.5

Systemd Unit

/etc/systemd/system/usbip.service:

[Unit]
Description=USB IP Daemon
After=network-online.target

[Service]
ExecStart=/usr/sbin/usbipd
Restart=on-failure
RestartSec=5s
User=root

[Install]
WantedBy=multi-user.target

systemctl daemon-reload
systemctl enable usbip.service
systemctl start usbip.service

Auto Bind a Deice

/lib/udev/rules.d/99-usbip.rules:

SUBSYSTEMS=="usb",KERNEL=="1-1.3",RUN{program}+="/usr/sbin/usbip bind -b %k"

udevadm control --reload-rules && udevadm trigger

Client

Install

apt install linux-tools-generic
echo "vhci_hcd" >> /etc/modules

Usage

# if you didn't reboot, or add to /etc/modules, then:
modprobe vhci_hcd

usbip list -r 192.168.0.135
usbip attach -r 192.168.0.135 -b 1-1.5
usbip port
usbip detach -p 0