usbip_stub
and usbip_vhci
projects' Target OS version to Windows 7
.
Project > Properties > Driver Settings > Target OS version > Windows 7
usbip_win.sln
usbip
, usbip_common
, usbipd
, stubctl
) should be adjusted.usbip_stub
and usbip_vhci
projects
Project > Properties > Driver Signing > Test Certificate
driver/usbip_test.pfx
(password: usbip)# modprobe vhci-hcd
driver/usbip_test.pfx
(password: usbip)> bcdedit.exe /set TESTSIGNING ON
usbip.exe
, usbipd.exe
, usb.ids
, usbip_stub.sys
, usbip_stub.inx
into a folder in target machine
usbip.exe
, usbipd.exe
, usbip_stub.sys
in the output folder after build or on release page.userspace/usb.ids
driver/stub/usbip_stub.inx
> usbip.exe list -l
usbip.exe
listing is shown as:
usbip.exe list -l
usbip_stub.inx
and usbip_stub.sys
files should be in the same folder as usbip.exe
> usbip.exe bind -b 1-59
usbipd.exe
> usbipd.exe -d -4
3240
should be allowed by firewall# usbip attach -r <usbip server ip> -b 1-59
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).# modprobe usbip-host
# usbipd -4 -d
driver/usbip_test.pfx
(password: usbip)> bcdedit.exe /set TESTSIGNING ON
vhci(ude)
, copy usbip.exe
, usbip_vhci_ude.sys
, usbip_vhci_ude.inf
, usbip_vhci_ude.cat
into a folder in target machine;vhci(wdm)
, copy usbip.exe
, usbip_vhci.sys
, usbip_vhci.inf
, usbip_root.inf
, usbip_vhci.cat
into a folder in target machine;usbip.exe
or manuallyusbip.exe
install commandPS> usbip.exe install
PS> usbip.exe install -u
if UDE driver onlyPS> usbip.exe install -w
if WDM driver onlyPS> pnputil /add-driver usbip_vhci_ude.inf
PS> pnputil /add-driver usbip_vhci.inf
PS> usbip.exe attach -r <usbip server ip> -b 2-2
PS> usbip.exe uninstall
> bcdedit.exe /set TESTSIGNING OFF
usbip-win
is not yet ready for production use. We could find the problems with detailed logs.usbip-win
uses DbgPrintEx API for kernel logging..reg
file and run or manually insert the registry key
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Debug Print Filter] "IHVDRIVER"=dword:ffffffff
- Run a debugging log viewer program before you test.
- [DebugView](https://docs.microsoft.com/en-us/sysinternals/downloads/debugview) is a good tool to view the logs.
- If your testing machine suffer from BSOD (Blue Screen of Death), you should get it via remote debugging.
- `WinDbg` on virtual machines would be good to get logs.
#### How to get Windows kernel log for vhci(ude)
- A new vhci(ude) implementation uses WPP SW tracing instead of DbgPrintEx.
- `DebugView.exe` cannot catch a VHCI debug message
- `TraceView.exe` is a good utility for a new approach, which is included in WDK.
- `usbip_vhci_ude.pdb` file is required to add a trace provider easily.
- Create a new session log in `TraceView.exe`
- Choose PDB file radio button in \"*Provider Control GUID Setup*\" popup dialog
- Specify `usbip_vhci_ude.pdb` as a PDB file
- You can send real-time trace messages to WinDbg by modifying in \"*Advanced Log Session Options*\".
- If your testing machine suffer from BSOD (Blue Screen of Death), you should get it via remote debugging.
- `WinDbg` on virtual machines would be good to get logs
#### How to get usbip forwarder log
- usbip-win transmits usbip packets via a userland forwarder.
- forwarder log is the best to look into usbip packet internals.
- edit `usbip_forward.c` to define `DEBUG_PDU` at the head of the file
- compile `usbip.exe` or `usbipd.exe`
- `debug_pdu.log` is created at the path where an executable runs.
#### How to get linux kernel log
- Sometimes Linux kernel log is required
<hr>
<sub>This project was supported by Basic Science Research Program through the National Research Foundation of Korea(NRF) funded by the Ministry of Education(2020R1I1A1A01066121).</sub>