usbip is a part of the linux kernel (kernel version >= 3.17) and it is used to export USB devices over TCP network from one computer (server) to another (client)
The usbip protocol can also be used to, like in this project, create a playground for USB stack and/or USB device development.
The goal for this project is to implement a usbip-server that can be used for USB device prototyping on a linux host.
The code in src/ is a C implementation of a C++ version I did back in 2016.
The C++ version is still available in the cpp_version branch in the cpp/ folder, but it will probably not be updated...
- linux kernel >= 3.17
- package linux-tools-generic [apt-get install linux-tools-generic]
!!! WARNING !!! Playing around with kernel modules and Virtual USB devices can cause the kernel to hang!
$ make
$ out/usb_cdc_device
$ out/usb_mouse_device
$ sudo modprobe vhci-hcd
$ usbip list -r <host>
$ sudo usbip attach -b 1-1 -r <host>
Example: If you want to attach the USB device on the machine running the usbip server.
$ sudo usbip attach -b 1-1 -r localhost
$ sudo usbip detach -p 0
- Handles 1 (one) device over the usbip protocol
- Implement more device examples
- Understand and handle usbip unlink command better