cezanne / usbip-win Goto Github PK
View Code? Open in Web Editor NEWThis project forked from george-hopkins/usbip-windows
USB/IP for Windows
License: GNU General Public License v3.0
This project forked from george-hopkins/usbip-windows
USB/IP for Windows
License: GNU General Public License v3.0
On Ubuntu 18.04:
$ usbip help
usage: usbip [--debug] [--log] [--tcp-port PORT] [version]
[help] <command> <args>
attach Attach a remote USB device
detach Detach a remote USB device
list List exportable or local USB devices
bind Bind device to usbip-host.ko
unbind Unbind device from usbip-host.ko
port Show imported USB devices
$ sudo usbip port
Imported USB devices
====================
Port 00: <Port in Use> at Low Speed(1.5Mbps)
Dell Computer Corp. : Mouse (413c:3200)
3-1 -> usbip://192.168.1.1:3240/1-1.2
-> remote bus/dev 001/004
Is there a similar command like port
?
As @wrenchonline reported (#6 (comment)), USB device with USB class 255(vendor-specific) is not working.
Can it be resolved similarly such as a device with class 0 ?
USB mouse and keyboard are working well,
but it seems not working with my kingston USB Flash
the error code is 10
"This device cannot start. Try upgrading the device drivers for this device. (Code 10)"
There is no compiled program download, I did not start the environment, just want to use this program.
I've been able to successfully get other devices like webcams and flash drives happening over usbip, but can't manage to get an Xbox One controller working at all.
I'm using an Orange Pi Zero with Armbian as my host, and it can successfully bind either the controller, or the USB wireless adapter.
Then the problems start with the Windows 10 side of things. With the wireless adapter I will either get a blue screen with kernel security check failure, or I will get an error of "failed to read: err:6". I think one time it didn't give me either of those, but nothing showed up in device manager, so I don't think it actually worked.
With the controller connected via a usb cable to the host, it seems to bind and attach fine, but then device manager gives me this:
Are there any known issues with trying to get Xbox One controllers happening? Anything else I can try to get it working?
According to @luochaoying mouse,USB flash drive,are working well,but the UVC camera driver always have exception, and it doesnt install correctly in Device Manager of the win10.
VHCI fails for OMRON PLC. Detailed description is here: #52 (comment)
I installed the usbip-win 0.0.4
pre-release on Windows 7 (7601), and even after manually generating a signed cat file, windows refuses to load the driver with Code 39
.
Event viewer says
Application popup: : \SystemRoot\system32\DRIVERS\usbip_vhci.sys cannot find ntoskrnl.exe KeInitializeSpinLock
which looks like Win7 compatibility was broken.
I tried compiling the driver with the old build system and the Win7 DDK but there were quite a few issues and I could not get it to compile successfully.
I do not have access to a proper Windows 10 dev installation at the moment to have a look, so it would be appreciated if this could be fixed.
From the USBIP application, I see that keep alive is implemented. When testing with wireshark I found out that KeepAlive packets send after 2 hours than an interval of 1 second. From my understanding, this is a default configuration in windows 10. One can modify the keepAlive default values by modifying/adding two new parameters to Tcpip.
Open "Registry editor" navigate to the following directory
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
Add DWORD(32bits) value with name KeepAliveInterval set desired in value data (milliseconds)
Add DWORD(32bits) value with name KeepAliveTime set desired in value data (milliseconds)
My question is it possible to set keepalive time and interval from the application ?
Hi @cezuni,
I am looking for a working usb-ip solution.
I need Linux to be server (Kernel V 4.1x) and windows 10 as client.
Is your project suitable for that config?
Did you test any config like that?
Thanks
Best regards
Hi, I'm testing a fingerprint reader (U.are.U® 4500 Fingerprint Reader). I have as client a linux machine with kernel 4.15, but when I try to open the device I get:
journal: interface claim failed: LIBUSB_ERROR_NOT_FOUND
Am I forgetting some configuration?
Hello all,
I use USBIP client on windows. It works quite fine (except some errors with queue overflow etc.).
I Try to compile USBIP by Release configuration. It fails. Mainly because mishmash between debug and release header/libraries.
My question is - is this behaviour intentionall ot it's a bug. If it's a Bug, may I create PR with repairs? Or it's the subject of further/actual development.
@cezuni In case of PR - from which branch I can create a PR?
Hello!
I've been trying to get an FTDI FT4232H (which is a 4 port version of the very common FT232) working with WSL 2 with windows being the server of the FT4232H and Ubuntu 18.04 LTS (kernel 4.19.43-microsoft-standard) as the client (although I don't think that WSL 2 is a source of this bug at this point (I'll elaborate on this a bit more further down)).
A little backstory: WSL 2 does not have USB support so I've been trying to add it back in. Adding in USB support in WSL 2 would solve probably the most major issue with WSL 2. The usbip-win project has the ability to solve this. I've been successful at compiling the usbip kernel modules in 4.19.43-microsoft-standard and modprobing them all in. I've been successful using this repo to host a CDC-ACM device on Windows and was able to use the compiled kernel modules to allow this CDC-ACM device to exist on Linux and I'm able to communicate with the CDC-ACM device with no issues.
When attempting to host the FT4232H in Windows and trying to attach to the device in Linux I get these messages in dmesg:
[ 544.218303] usb 1-1: new high-speed USB device number 2 using vhci_hcd
[ 544.368397] usb 1-1: SetAddress Request (2) to port 0
[ 544.410263] ftdi_sio 1-1:1.0: FTDI USB Serial Device converter detected
[ 544.410294] usb 1-1: Detected FT4232H
[ 549.488900] vhci_hcd: unlink->seqnum 11
[ 549.488902] vhci_hcd: urb->status -1
[ 549.488983] ftdi_sio ttyUSB0: Unable to read latency timer: -110
I get this message repeated 4 times, 1 for each FTDI port. I'm unable to interact with any of these devices. All interactions time out and no data is sent to the FTDI device. I suspect although I have no proof that no data is being sent or received on endpoint 0.
When starting usbip --debug in Windows this is displayed:
usbip: info: exportable devices: 1
usbip: debug: C:\Users\rpasek\Documents\usbip-win\userspace\lib\usbip_common.c:90:[dump_usb_device] path = \\?\usb#vid_0403&pid_6011#7&98cdda5&0&3#{fb265267-c609-41e6-8eca-a20d92a833e6}
usbip: debug: C:\Users\rpasek\Documents\usbip-win\userspace\lib\usbip_common.c:91:[dump_usb_device] busid = 1-176
usbip: debug: C:\Users\rpasek\Documents\usbip-win\userspace\lib\usbip_common.c:97:[dump_usb_device] Device(C/SC/P) = (Defined at Interface level) (00/00/00)
usbip: debug: C:\Users\rpasek\Documents\usbip-win\userspace\lib\usbip_common.c:99:[dump_usb_device] bcdDevice = 0
usbip: debug: C:\Users\rpasek\Documents\usbip-win\userspace\lib\usbip_common.c:104:[dump_usb_device] Vendor/Product = unknown vendor : unknown product (0403:6011)
usbip: debug: C:\Users\rpasek\Documents\usbip-win\userspace\lib\usbip_common.c:106:[dump_usb_device] bNumConfigurations = 0
usbip: debug: C:\Users\rpasek\Documents\usbip-win\userspace\lib\usbip_common.c:107:[dump_usb_device] bNumInterfaces = 0
usbip: debug: C:\Users\rpasek\Documents\usbip-win\userspace\lib\usbip_common.c:109:[dump_usb_device] speed = High Speed(480Mbps)
usbip: debug: C:\Users\rpasek\Documents\usbip-win\userspace\lib\usbip_common.c:111:[dump_usb_device] busnum = 1
usbip: debug: C:\Users\rpasek\Documents\usbip-win\userspace\lib\usbip_common.c:112:[dump_usb_device] devnum = b0
usbip: info: request 0x8005: complete
usbip: info: connection from 172.18.186.174:42598
usbip: info: received request: 0x8003
usbip: debug: C:\Users\rpasek\Documents\usbip-win\userspace\src\usbipd\usbipd_import.c:18:[forwarder_stub] stub forwarding started
usbip: debug: C:\Users\rpasek\Documents\usbip-win\userspace\src\usbipd\usbipd_import.c:108:[recv_request_import] import request busid 1-176: complete
usbip: info: request 0x8003: complete
I find it a little concerning that no interfaces or configurations are found. Maybe this could be related? Update: I found this is true for other devices that function fine, so probably unrelated.
To prove that this issue is most certainly with the Windows instance of USBIP driver and not with WSL 2, I hosted the same FTDI device with usbip on native Linux machine and I'm able to connect to the FTDI device with no issues in the hosted WSL 2 Ubuntu environment.
More on WSL 2: (https://devblogs.microsoft.com/commandline/wsl-2-is-now-available-in-windows-insiders/)
Please let me know if this is something you'd have interest in fixing or if you'd like to have help fixing!
Update: I attempted to us a FT232 (the single port FTDI device) and I seem to have the same results.
Thanks,
Richard
Currently, only usbip client is supported on windows. Is a special driver like a linux usbip stub driver required?
There is the same issue (Oxalin/usbip_windows#9)
I am configuring my windows 10 as client using this repository. And Raspberry Pi 3 ( Linux raspberrypi 4.4.50-v7+ ) as server using steps given in link.
USBIP version of server is 2.0
I am able to list the usb drive shared by server on windows. But unable to connect to it.
In device manager it is showing an unknown device named 'USB Device over IP'.
Is this ab bug of this repository as you mentioned in last line of README that it did not work?
Hi,
I trying to share a usb device from Ubuntu 16.04 (usbip server) to a windows 10 (1809 17763.678) (usbip client).
Build OK.
Bind on Ubuntu 16.04 server side OK
Certificate installed OK
test signing enabled OK
All files copied OK
VHCI driver install OK
USB/IP VHCI driver visible into device manager and OK
usbip list OK (found wished usb device)
but :
usbip attach -r 192.168.1.2 -b 4.12
usbip: error: recv op_common
usbip: error: read_devbuf: failed to read: err: 0x6
Is this a known issue ?
Have I missed something ?
Beautify and cleanup windows version userspace codes
Hi. First, thank you for this great work. I've been working on this all weekend and today to get this working; really appreciate you help.
Running the 2.0 USBIP tools from Debian 9 (not the buggy version). All works great re the setup on the Debian host and I can share the devices.
From Windows I can see the devices with the correct USB.IDS. Looks fine.
Latest 0.4 version and have installed the driver correctly after cert install and dropping the Windows 10 x64 host into 'Test' Mode. Driver installs with no errors.
On attach I get pop-ups saying that USBIP is being setup and then it mentions that it's all ready. I don't get a command prompt back and I have no messages relating the setup of the actual device nor any new device appearing in the Device Manager.
Checking on the USBIP on the Debian host, I see working responses from the server with 'received request' 0x8005 (5) on the listing remotely and the connection request which responds with a 0x8003(5) complete.
Any ideas? I'm going mad! ;-)
I do now see to get the 'USB Device Over IP' 'device' in the correct category of Device Manager for the device I am attempting to connect, but I get a 'This device cannot start (Code 10).
Mo
Hello!
I'm working on a device which has multiple configurations. I've noticed that when attaching the device in Linux I see:
[ 78.134224] usb 1-1: new high-speed USB device number 2 using vhci_hcd
[ 78.284314] usb 1-1: SetAddress Request (2) to port 0
[ 78.321383] usb 1-1: can't set config #1, error -1
Looking in the Windows kernel logs I see:
usbip_stub:(EE) select_usb_conf: non-existent configuration descriptor: index: 1
When running uspipd --debug in Windows I see:
usbip: info: exportable devices: 1
usbip: debug: C:\Users\rpasek\Documents\usbip-win\userspace\lib\usbip_common.c:90:[dump_usb_device] path = \\?\usb#vid_f17b&pid_1111#ed648296380e#{fb265267-c609-41e6-8eca-a20d92a833e6}
usbip: debug: C:\Users\rpasek\Documents\usbip-win\userspace\lib\usbip_common.c:91:[dump_usb_device] busid = 1-12
usbip: debug: C:\Users\rpasek\Documents\usbip-win\userspace\lib\usbip_common.c:97:[dump_usb_device] Device(C/SC/P) = (Defined at Interface level) (00/00/00)
usbip: debug: C:\Users\rpasek\Documents\usbip-win\userspace\lib\usbip_common.c:99:[dump_usb_device] bcdDevice = 0
usbip: debug: C:\Users\rpasek\Documents\usbip-win\userspace\lib\usbip_common.c:104:[dump_usb_device] Vendor/Product = unknown vendor : unknown product (f17b:1111)
usbip: debug: C:\Users\rpasek\Documents\usbip-win\userspace\lib\usbip_common.c:106:[dump_usb_device] bNumConfigurations = 0
usbip: debug: C:\Users\rpasek\Documents\usbip-win\userspace\lib\usbip_common.c:107:[dump_usb_device] bNumInterfaces = 0
usbip: debug: C:\Users\rpasek\Documents\usbip-win\userspace\lib\usbip_common.c:109:[dump_usb_device] speed = High Speed(480Mbps)
usbip: debug: C:\Users\rpasek\Documents\usbip-win\userspace\lib\usbip_common.c:111:[dump_usb_device] busnum = 1
usbip: debug: C:\Users\rpasek\Documents\usbip-win\userspace\lib\usbip_common.c:112:[dump_usb_device] devnum = c
usbip: info: request 0x8005: complete
usbip: info: connection from 172.17.221.248:59058
usbip: info: received request: 0x8003
usbip: debug: C:\Users\rpasek\Documents\usbip-win\userspace\src\usbipd\usbipd_import.c:18:[forwarder_stub] stub forwarding started
usbip: debug: C:\Users\rpasek\Documents\usbip-win\userspace\src\usbipd\usbipd_import.c:108:[recv_request_import] import request busid 1-12: complete
The error seems to make sense considering what is reported in uspipd. It seems that one of the descriptors is not being read properly or the data from the descriptors isn't being propagated correctly. Do you have any hints on why bNumConfigurations and bNumInterfaces appear as 0?
Thanks,
Richard
win7×64
usbip:error:cannot load certificate:subject: USBIP Test
Testing usbip-win on Windows 10 (1607) connecting to a USB Mass Storage class device hosted from Ubuntu Linux 14.04. I am able to attach I get usbip: error: tcp connect
when attempting usbip.exe attach -r 192.168.1.100 -b 5-2
.
The firewall is open on both devices and they are on the same LAN.
Hi.
I've compiled usbip-win on Windows 10 version 18.09, but when I try to bind a device I get the following error:
usbip: error: calc_hash: path not found C:\Users\CHIFIL~1\AppData\Local\Temp\stu7A36.tmp\usbip_stub.inf
usbip: error: failed to update driver: 2
usbip: error: failed to bind device
usbip: error: open vhci driver
usbip: error: failed to read: err:6
What i do ?
As discussed in #23 It can be helpfull to move/add usbip-win to CMake.
I opened this Issue to gather more opinions and for discussion.
CMake dvantages for me
Problems
CMake works fine for standard user-space applications.
Driver development is quite complicated. There are several quite good CMake modules for Windows kernel drivers but It's not widely tested.
Client windows7 installed camera and headset driver can not be installed, or blue screen
This error occurs when attach usb disk scrolls, but does not affect actual use。
#16 does not solve the problem
According to the following bug report, an attached device will not be freed if the connection between a client and a server is abruptly interrupted.
From here: https://sourceforge.net/p/usbip/discussion/418508/thread/34da2931c0/?limit=25#13b9
Under usbip_network.c > usbip_net_tcp_connect(), there is a TODO note stating "/* TODO: write code for heartbeat */".
I used VS2017 to compile USBip-win.sln, but the usbipd project failed to compile:
usbip_common.lib(usbip_common.obj) : error LNK2001: Unparsable external symbols __acrt_iob_func
1>usbip_common.lib(usbip_setupdi.obj) : error LNK2001: Unparsable external symbols _acrt_iob_func
1>usbip_common.lib(usbip_forward.obj) : error LNK2001: Unparsable external symbols __acrt_iob_func
1>usbip_common.lib(names.obj) : error LNK2001: Unparsable external symbols __acrt_iob_func
1>usbipd_sock.obj : error LNK2001: Unparsable external symbols __acrt_iob_func
1>usbipd_stub.obj : error LNK2001: Unparsable external symbols __acrt_iob_func
1>usbip_common.lib(usbip_network.obj) : error LNK2001: Unparsable external symbols __acrt_iob_func
1>usbip_common.lib(usbip_windows.obj) : error LNK2001: Unparsable external symbols __acrt_iob_func
usbipd_sock.obj : error LNK2001: Unparsable external symbols __stdio_common_vfprintf
1>usbipd_stub.obj : error LNK2001: Unparsable external symbols __stdio_common_vfprintf
1>usbip_common.lib(usbip_network.obj) : error LNK2001: Unparsable external symbols __stdio_common_vfprintf
1>usbip_common.lib(usbip_windows.obj) : error LNK2001: Unparsable external symbols __stdio_common_vfprintf
In the case of device drivers, signing is even required by certain versions of Windows in certain situations. Currently, the USBIP requires windows 10 to run in test mode to be able to install the driver. Does anyone from here know how this driver can be signed/approved by Microsoft? Does Microsoft provide an open source license?
From my understanding, Microsoft announced on 2015-04-01 that all new Windows 10 kernel mode drivers must be submitted to and digitally signed by the Windows Hardware Developer Center Dashboard portal, which is a web service provided by Microsoft. According to the link under there should be two different routes for getting the driver signed "Hardware compatibility" and "Attestation".
The Hardware Compatibility route is the old route where your driver is subjected to a series of tests designed by Microsoft to ensure its quality. Then Microsoft will supposedly sign your driver properly for all the versions of Windows you are interested in, and you can have a single driver that works on all those versions.
The attestation route is the new route where your driver does not have to pass any tests, but the resulting driver only works on Windows 10.
The portal will only accept driver submissions from you if you sign them with an Extended Validation (EV) certificate, which is typically more expensive than a normal certificate.
https://www.osr.com/blog/2015/07/24/questions-answers-windows-10-driver-signing/
@cezuni this more a case of thinking about the future and getting some inputs from people.
I am using the version from the repository https://github.com/cezuni/usbip-win
The server part is deployed on Debian Stretch using usbip from the distribution.
The client part is deployed on the VmWare virtual machine in the Windows 10 Pro (x64) operating environment, in which debug mode is enabled.
The virtual machine is deployed on a host with a Windows 10 Pro (x64) operating environment;
After building the client part, the usbip module and the driver were copied to the guest station.
Further, all actions were carried out according to the Readme.
As a result of buid and testing the assembly, it turned out the following:
Next usb devices was tested to Linux station (Debian stretch) , where the server part was deployed
1.Webcam Logitech c170
2.Microskope Digital.B006
3. Epson L132 Printer
4.USB scanner Epson V19
5.Flash drives
When connecting devices from the list above
when run in command line
usbip attach -r 192.168.xxx.xxx -b 1-5
in the device manager, these devices were displayed without errors.
but cameras connected to the server did not play in the client.
To play the video on the client side, the WindowsCamera.exe module was used.
The WindowsCamera.exe module threw out the error that there are no connected cameras and the device manager remov the cameras from the list of installed devices.
The same thing happen , when trying to print on a printer.
At the same time, the scanner and flash drives worked without errors.
Please tell me what can fix the driver.
P.S
Cameras and printer were not registered in the usb.ids file. I registered them.
log file (log with DebugView) Bind and play webcam C170 Logitech(composite device)
https://drive.google.com/open?id=1noCk8eQZED0q84y7WvWoIsihO5dpWF3D
if necessary, I can submit the log obtained by the UsbLyzer utility
I want to install VHCI driver programatically. I try many ways but none works.
One usable:
https://stackoverflow.com/questions/11659223/install-the-libusb-driver-using-the-inf-file-with-c-sharp
I recognized that the problem is not with driver but with "How to install devices programatically". I can install driver itself but can not install usbip device.
How can I install USBIP VHCI driver programatically on windows machine? Is there any clean way?
Thanks a lot for any advise.
hello,cezuni
There is report an error after i download the source codes and compiled usbip-win, installed the USBIP test certificate and USBIP vhci driver subsequently. but the USB/IP VHCI display a abnormity icon at the device manager. i used the the windows OS version is win7,is it results in this issue of USBIP vhci driver?
Looking forward to your reply,thanks!
My Build Tools is as below:
Visual Studio 2017 Community
Windows SDK 10.0.17134
Windows Driver Kit 10.0.17134
Build is tested on Win7
I'm trying to get the client working for this server for Android to share game controllers through it:
https://play.google.com/store/apps/details?id=org.cgutman.usbipserverforandroid&hl=en_US
I have attempted both v0.0.1 and v0.0.4 drivers from this repository and I am getting the below message in both versions in Device Manager:
This device cannot start. (Code 10)
Insufficient system resources exist to complete the API.
I tried googling that error and I found this possible solution here: https://superuser.com/questions/1316839/usb-driver-this-device-cannot-start-code-10-insufficient-system-resources
Deleting LowerFilter and UpperFilter values of that USB classes in the registry. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class***********
You can find the class guid from device manager, USB controller properties -> Details -> Class GUID.
I have not tried the other versions posted but I did have it working once by using the usbip_windows_v0.2.0.0_signed.zip file from https://sourceforge.net/projects/usbip/files/usbip_windows/
after which Windows helpfully downloaded an update and broke it after that. I'm on 10.0.17134 (v1803) as I type this. Looking at my Windows Update history (guessing here) according to those dates KB4023057 was the one that may have broke it since I'm 99.9% sure it was working before that.
hi,
i just try to use usb-ip (0.0.6) for windows (server and client) it's working great with win 2019 (server side) and win 10 (1903)
(usbip: info: received request: 0x8003
usbip: debug: C:\work\usbip-win\userspace\src\usbipd\usbipd_import.c:18:[forwarder_stub] stub forwarding started
usbip: debug: C:\work\usbip-win\userspace\src\usbipd\usbipd_import.c:108:[recv_request_import] import request busid 1-140: complete
usbip: info: request 0x8003: complete)
but i f i make the same configuration for the client on a windows 2012r2 it's not working ...
the drivers are not correctly installed
(device status : Windows cannot initialize the device driver for this hardware. (Code 37)
{Wrong Type}
There is a mismatch between the type of object required by the requested operation and the type of object that is specified in the request.)
then of course the usbip command does not working....
i see this post drivers (version 0.0.3) => usbip_vhci not loading on Windows 7 #12 it's solve my drivers problem but i don't have the lastest drivers...
Currently, stub driver does not work as @koudis pointed out. This is due to that stub driver depends on obsolete usbip forwarding style, which assumes sufficiently large read/write buffer. Of course, vhci handles well. Maybe stub driver has not been used by community.
I have a USB Composite Device connected on a Linux box and using USBIP to connect it to a Win7 machine. Everything seems to working as intended, except the libusb's libusb_get_device_list()
is unable to detect the presence of the USB device.
The research that I've done suggests that might be because the VHCI driver doesn't register a USB Root Hub, and libusb doesn't know to look for usb devices that aren't connected to a root hub.
Is it possible to make a change to the VHCI driver such that it creates a USB Root Hub and attaches the remote devices to that created hub?
Hello. The usbip.exe file in the 0.0.5 release is being reported as virus infected by Windows Defender and several others on VirusTotal: https://www.virustotal.com/gui/file/c39191db245494c59269b5d12e4136bfe9a33b40e9f99d0bc2cb1431d6a01f4e/detection
Your readme explains installation of server on linux, but I thought, that your port is for windows.
Can I use usbip server on windows?
Hi Guys. I am trying to emulate the STMicroelectronics Virtual Com Port via the usbip vhci.
As result I have net issue:
The USBIP/VHCI driver was installed properly:
Here is a log from the usbip.exe:
D:\Projects\USBIP\usbip-win\Debug\output_copy3>usbip.exe --debug attach -r localhost -b 1-1
usbip: debug: d:\projects\usbip\usbip-win\userspace\src\usbip\usbip.c:133:[run_command] running command: `attach'
usbip: debug: d:\projects\usbip\usbip-win\userspace\src\usbip\usbip_vhci.c:58:[usbip_vhci_driver_open] device path: \\?\root#unknown#0000#{d35f7840-6a0c-11d2-b841-00c04fad5171}
usbip: debug: d:\projects\usbip\usbip-win\userspace\src\usbip\usbip_attach.c:57:[import_device] got free port 1
As a device that emulate device I use project https://github.com/lcgamboa/USBIP-Virtual-USB-Device. I run cdc-acm and get this:
cdc started....
Connection address:127.0.0.1
Header Packet
command: 0x8003
attach device
------------------------------------------------
handles requests
usbip cmd 1
usbip seqnum 2147483647
usbip devid 65538
usbip direction 1
usbip ep 0
usbip flags 0
usbip number of packets 0
usbip interval 0
usbip setup 9225060895304978944
usbip buffer lenght 18
#control requests
8006000200001200
UC Request Type 128
UC Request 6
UC Value 2[0]
UCIndex 0-0
UC Length 18
handle_get_descriptor 2 [0]
Configuration
------------------------------------------------
handles requests
usbip cmd 1
usbip seqnum 1
usbip devid 65538
usbip direction 1
usbip ep 0
usbip flags 0
usbip number of packets 0
usbip interval 0
usbip setup 9225060891010011648
usbip buffer lenght 18
#control requests
8006000100001200
UC Request Type 128
UC Request 6
UC Value 1[0]
UCIndex 0-0
UC Length 18
handle_get_descriptor 1 [0]
Device
------------------------------------------------
handles requests
usbip cmd 1
usbip seqnum 2
usbip devid 65538
usbip direction 1
usbip ep 0
usbip flags 0
usbip number of packets 0
usbip interval 0
usbip setup 9225060895304976640
usbip buffer lenght 9
#control requests
8006000200000900
UC Request Type 128
UC Request 6
UC Value 2[0]
UCIndex 0-0
UC Length 9
handle_get_descriptor 2 [0]
Configuration
------------------------------------------------
handles requests
usbip cmd 1
usbip seqnum 3
usbip devid 65538
usbip direction 1
usbip ep 0
usbip flags 0
usbip number of packets 0
usbip interval 0
usbip setup 9225060895304991488
usbip buffer lenght 67
#control requests
8006000200004300
UC Request Type 128
UC Request 6
UC Value 2[0]
UCIndex 0-0
UC Length 67
handle_get_descriptor 2 [0]
Configuration
------------------------------------------------
handles requests
usbip cmd 1
usbip seqnum 4
usbip devid 65538
usbip direction 1
usbip ep 0
usbip flags 0
usbip number of packets 0
usbip interval 0
usbip setup 9225060895304976641
usbip buffer lenght 265
#control requests
8006000200000901
UC Request Type 128
UC Request 6
UC Value 2[0]
UCIndex 0-0
UC Length 265
handle_get_descriptor 2 [0]
Configuration
------------------------------------------------
handles requests
usbip cmd 1
usbip seqnum 5
usbip devid 65538
usbip direction 0
usbip ep 0
usbip flags 1
usbip number of packets 0
usbip interval 0
usbip setup 2534374302023680
usbip buffer lenght 0
#control requests
0009010000000000
UC Request Type 0
UC Request 9
UC Value 0[1]
UCIndex 0-0
UC Length 0
handle_set_configuration 0[1]
------------------------------------------------
handles requests
usbip cmd 1
usbip seqnum 6
usbip devid 65538
usbip direction 0
usbip ep 0
usbip flags 1
usbip number of packets 0
usbip interval 0
usbip setup 75153818798522368
usbip buffer lenght 0
#control requests
010B000001000000
UC Request Type 1
UC Request 11
UC Value 0[0]
UCIndex 0-1
UC Length 0
SET_INTERFACE
------------------------------------------------
handles requests
Please help.
Will there be any support plan in the future?
I have an application that sends a lot of URB Interrupts in a very short period of time, and after a while, usbip starts unlinking them.
With the new unlinking code introduced by 10d26c6 in vhci, a bugcheck is triggered after a few URBs get unlinked.
WinDbg shows that the issue occurs here https://github.com/cezuni/usbip-win/blob/94b35a0916962874f062076176ec597a612aaa77/driver/vhci/usbreq.c#L114-L115
The following patch prevents the crash, however I haven't made a PR because I am not sure if it is the right approach to follow.
Additionally, while the patch solves the bluescreen, the usbip client then throws a few failed to record. out queue full
errors, and the connection seems to freeze. I can still detach and reattach the device though.
diff --git a/driver/vhci/usbreq.c b/driver/vhci/usbreq.c
index db5bb0c..261ee39 100644
--- a/driver/vhci/usbreq.c
+++ b/driver/vhci/usbreq.c
@@ -111,8 +111,10 @@ remove_cancelled_urbr(pusbip_vpdo_dev_t vpdo, PIRP irp)
urbr = find_urbr_with_irp(vpdo, irp);
if (urbr != NULL) {
- RemoveEntryList(&urbr->list_state);
- RemoveEntryList(&urbr->list_all);
+ if ((&urbr->list_state)->Blink != NULL && (&urbr->list_state)->Flink != NULL)
+ RemoveEntryList(&urbr->list_state);
+ if((&urbr->list_all)->Blink != NULL && (&urbr->list_all)->Flink != NULL)
+ RemoveEntryList(&urbr->list_all);
if (vpdo->urbr_sent_partial == urbr) {
vpdo->urbr_sent_partial = NULL;
vpdo->len_sent_partial = 0;
I am not sure how to further debug this issue. Any help would be appreciated. If the patch above is acceptable, then I can open a PR to get it merged.
You stop the Linux USBIP host should it stop the windows client? By using the wire shark I noticed that in fact a Finish flag is been sent from the host to the windows client. The client does not do anything with flag. should it disconnect as well in windows?
Did anyone look at this ?
Let Windows_client_ip be xxx.xxx.xxx.xxx
USBIP_Linux$ sudo tcpdump -i wlo1 host xxx.xxx.xxx.xxx
//Sending data from Linux host to windows client Flags[P.] P. stands for Push
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on wlo1, link-type EN10MB (Ethernet), capture size 262144 bytes
15:04:08.797585 IP ZBook-15.3240 > xxx.xxx.xxx.xxx.50285: Flags [P.], seq 3259045765:3259045820, ack 2855156516, win 229, length 55
15:04:08.803557 IP xxx.xxx.xxx.xxx.50285 > ZBook-15.3240: Flags [P.], seq 1:49, ack 55, win 252, length 48
15:04:08.805504 IP ZBook-15.3240 > xxx.xxx.xxx.xxx.50285: Flags [P.], seq 55:110, ack 49, win 229, length 55
15:04:08.810277 IP xxx.xxx.xxx.xxx.50285 > ZBook-15.3240: Flags [P.], seq 49:97, ack 110, win 252, length 48
15:04:08.853446 IP ZBook-15.3240 > xxx.xxx.xxx.xxx.50285: Flags [.], ack 97, win 229, length 0
//Here a finish flag is been sent to windows client and the windows client answer with an acknowledgement
15:04:24.699197 IP ZBook-15.3240 > xxx.xxx.xxx.xxx.50285: Flags [F.], seq 110, ack 97, win 229, length 0
15:04:24.705279 IP xxx.xxx.xxx.xxx.50285 > ZBook-15.3240: Flags [.], ack 111, win 252, length 0
usbip: error: failed to record. out queue full.
but It can be used normally.
On Windows 7
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.