cezanne / usbip-win

USB/IP for Windows
GNU General Public License v3.0
1.91k stars 344 forks source link
usb-client usb-over-ip usb-server usbip usbip-win vhci windows-driver

USB/IP for Windows

Build

Notes

Build Tools

Build Process

Install

Windows USB/IP server

Windows USB/IP client

Reporting Bugs

How to get Windows kernel log for vhci(wdm)

[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

dmesg --follow | tee kernel_log.txt



<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>