Skip to content

Install usbip win server

KyungWoon Cho edited this page Jan 15, 2021 · 1 revision

Install usbip-win server

  • Prepare a linux machine as a USB/IP client (or windows usbip-win vhci client)

    • Tested on Ubuntu 16.04
    • Kernel 4.15.0-29 (USB/IP kernel module crash was observed on some other version)
    • # modprobe vhci-hcd
  • Install USB/IP test certificate

    • Install driver/usbip_test.pfx (password: usbip)
    • Certificate should be installed into
      1. "Trusted Root Certification Authority" in "Local Computer" (not current user) and
      2. "Trusted Publishers" in "Local Computer" (not current user)
  • Enable test signing

    • > bcdedit.exe /set TESTSIGNING ON
    • reboot the system to apply
  • Copy usbip.exe, usbipd.exe, usb.ids, usbip_stub.sys, usbip_stub.inx into a folder in target machine

    • You can find usbip.exe, usbipd.exe, usbip_stub.sys in output folder after build or on release page.
    • userspace/usb.ids
    • driver/stub/usbip_stub.inx

Testing

  • Find a USB device id
    • You can get device id from usbip listing
      • > usbip.exe list -l
    • Bus id is always 1. So output from usbip.exe listing is shown as:
usbip.exe list -l
 - busid 1-59 (045e:00cb)
   Microsoft Corp. : Basic Optical Mouse v2.0 (045e:00cb)
 - busid 1-30 (80ee:0021)
   VirtualBox : USB Tablet (80ee:0021)
  • Bind an USB device to usbip stub

    • This command replaces an existing function driver with an usbip stub driver
      • This should be executed using administrator privilege
      • usbip_stub.inx and usbip_stub.sys files should be in the same folder as usbip.exe
    • > usbip.exe bind -b 1-59
  • Run usbipd.exe

    • > usbipd.exe -d -4 - TCP port 3240 should be allowed by firewall
    • -d: enable debugging output
    • -4: running with IPv4
  • Attach USB/IP device from an usbip client

    • # usbip attach -r <usbip server ip> -b 1-59
Clone this wiki locally