-
Notifications
You must be signed in to change notification settings - Fork 355
Deployment Tips
This feature is not released yet. Only at master branch.
usbip.exe and usbipd.exe can clean up a usbip session when a peer goes away due to network failure or system error. Abortive disconnection is detected by utilizing TCP KEEPALIVE packet. If you want to set 3 seconds timeout, set a shell variable, KEEPALIVE_TIMEOUT as follows:
CMD> set KEEPALIVE_TIMEOUT=3
CMD> usbip.exe or usbipd.exe ...
If you want to run usbip-win in background instead of an open shell window, you can use SilentCMD by Stephan Brenner. It is a small utility (.exe) which calls a batch file and logs any output to a file.
You may write a Windows batch file which resolves your usbip-host and binds the USB device using usbip-win. Then you can configure your batch file in the silentcmd.exe.config
file, along with some logging options. This enables you to attach your USB device with one doubleclick. You can further customize this solution by renaming the standard .exe
file together with the .config
file. Put the finishing touches to it by assigning a custom icon in Windows, e.g. Bluray icon for a Blueray player connected via usbip-win.
In order to detach a drive before shutting down the computer or for putting it into standby mode, you can use the Windows Task Scheduler.
As triggers, you can use e.g.
- "On disconnect from user session"
- "On event". For Standby / Hibernate use: Protocol "Microsoft-Windows-Kernel-Power/Thermal-Operational", source "Microsoft-Windows-Kernel-Power", event ID "42"
As an action you can use e.g.
<path>\usbip.exe detach -p 1
- a custom batch file checking on conditions etc.