Skip to content

Install usbip win client

KyungWoon Cho edited this page Jan 27, 2021 · 2 revisions

Notes

  • Currently, there are 2 versions for a vhci driver - vhci(wdm): original version, implemented via WDM(Windows Driver Model) - vhci(ude): newly developed version to fully support USB applications and implemented via UDE(USB Device Emulation) which is MS provided USB virtualization framework over KMDF(Kernel-Model Driver Framework) - Installation procedures for 2 versions are slightly different.

Install

  • 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

    • CMD> bcdedit.exe /set TESTSIGNING ON
    • reboot the system to apply
  • Copy vhci driver files into a folder in target machine

    • If you're testing vhci(ude), copy usbip.exe, usbip_vhci_udf.sys, usbip_vhci_udf.inf, usbip_vhci_udf.cat into a folder in target machine
    • If you're testing vhci(wdm), copy usbip.exe, usbip_vhci.sys, usbip_vhci.inf, usbip_root.inf, usbip_vhci.cat into a folder in target machine
    • You can find all files in output folder after build or on release page.
  • Install usbip-win vhci driver

    • You can install using usbip.exe or manually

Using usbip.exe install command

  • Run PowerShell or CMD as an Administrator
  • PS> usbip.exe install
    • Upper command will install a ude driver or a wdm driver depending on the available files
    • When both files are available, a ude version takes precedence.
  • PS> usbip.exe install -u will install a ude version only
  • PS> usbip.exe install -w will install a wdm version only
  • This installation instruction is for v0.3.3.

Manual Installation

  1. Run PowerShell or CMD as an Administrator

  2. PS> pnputil /add-driver usbip_vhci_ude.inf for vhci(ude) or PS> pnputil /add-driver usbip_vhci_ude.inf for vhci(wdm)

  3. Start Device manager

  4. Choose "Add Legacy Hardware" from the "Action" menu

  5. Select "Install the hardware that I manually select from the list"

    • Click "Next".
    • Click "Have Disk", click "Browse", choose the copied folder, and click "OK".
    • Click on the "usbip-win VHCI(ude)" or "usbip-win VHCI ROOT", and then click "Next".
    • Click Finish at "Completing the Add/Remove Hardware Wizard"

Testing

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

    • tested on Ubuntu 16.04(Kernel 4.15.0-29), 18.04, 20.04
    • # modprobe usbip-host
    • You can use virtual usbip-vstub as a stub server
  • Run usbipd on a USB/IP server (Linux)

    • # usbipd -4 -d
  • Attach a remote USB device

    • PS> usbip.exe attach -r <usbip server ip> -b 2-2
  • Uninstall driver

    • PS> usbip.exe uninstall
  • Disable test signing

    • > bcdedit.exe /set TESTSIGNING OFF
    • reboot the system to apply