Coder Social home page Coder Social logo

usbip-win's Introduction

USB/IP for Windows

  • This project aims to support both a usbip server and a client on windows platform.

Build

Build Tools

  • Visual Studio 2017 Community
  • Windows SDK 10.0.17134
  • Windows Driver Kit 10.0.17134
  • Build is tested on Win10

Build Process

  • Open usbip_win.sln
  • Set certificate driver signing for usbip_stub, usbip_vhci project
    • Use driver/usbip_test.pfx for testing usbip-win
  • Build solution
  • x86/x64 platforms are supported
  • All output files are created under {Debug,Release}/{x64,x86} folder

Install

Usbip server

  • Prepare a linux machine as a usbip client

    • tested on Ubuntu 16.04
    • Kernel 4.15.0-29 (usbip kernel module crash was observed on some other version)
    • # modprobe vhci-hcd
  • Install USBIP test certificate

    • Install driver/usbip_test.pfx(password: usbip)
    • Certificate should be installed into "Trusted Root Certification Authority" and "Trusted Publishers" on local machine(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.
    • userspace/usb.ids
    • driver/stub/usbip_stub.inx
  • Find usb device id

    • You can get device id from usbip listing
      • <target dir>\usbip.exe list -l
    • Bus id is always 1. So output from usbip.exe listing is shown as:

    C:\work\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 usb device to usbip stub

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

    • usbipd.exe -d -4
    • TCP port 3240 should be allowed by firewall
  • Attach usbip device on linux machine

    • # usbip attach -r <usbip server ip> -p 1-59

Usbip client

  • Prepare a linux machine as a usbip server

    • tested on Ubuntu 16.04(Kernerl 4.15.0-29)
    • # modprobe usbip-host
  • Run usbipd on a usbip server(Linux)

    • # usbipd -4 -d
  • Install USBIP test certificate

    • Install driver/usbip_test.pfx(password: usbip)
    • Certificate should be installed into "Trusted Root Certification Authority" on local machine(not current user)
  • Enable test signing

  • Copy usbip.exe, usbip_vhci.sys, usbip_vhci.inf, usbip_vhci.cer, usbip_vhci.cat into a folder in target machine

    • You can find usbip.exe, usbip_vhci.sys, usbip_vhci.cer, usbip_vhci.inf in output folder.
    • usbip_vhci.cat can be found from usbip_vhci subfolder of output folder
  • Install USBIP vhci driver

    • Start a device manager
    • Choose "Add Legacy Hardware" from the "Action" menu.
    • 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 'USB/IP VHCI, and then click Next.
    • Click Finish at 'Completing the Add/Remove Hardware Wizard.'
  • Attach a remote USB device

    • C:\usbip.exe attach -r <usbip server ip> -b 2-2

This project was supported by Basic Science Research Program through the National Research Foundation of Korea(NRF) funded by the Ministry of Education(2016R1A6A3A11930295).

usbip-win's People

Contributors

cezanne avatar danice123 avatar george-hopkins avatar mfmooney avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.