vadimgrn / usbip-win2

USB/IP Client for Windows
GNU General Public License v3.0
469 stars 40 forks source link

some experiences using usbip win-win and win-lin #47

Closed comsyspro closed 9 months ago

comsyspro commented 11 months ago

development: i'm working on a gui for the usbip client side for windows: image here you can easily attach and detach usb devices (usbip client gui works together with windows and linux usbip server)

here i made different experiences connecting from: -windows (client) to windows (server) and -windows (client) to linux (server)

windows (client) to windows (server): -here attaching the usb devices works very easy, but some usb devices like usb storage sticks are only working with wdm drivers -so you have to adapt the devices to different usbip.exe versions (wdm or ude driver) by testing it out

windows (client) to linux (server): -attaching usb devices sometimes needs fixes to work properly. so you have to create rules for some vendors or devices to get it work. these fixes are normally not needed in windows (client) to windows (server) scenario. -ude drivers often leeds to bluescreen

results: -crossplatform usage needs some tweaking and fixes with rules for wdm and ude usage -it is not possible to use only one driver version, you have to mix both drivers and have to decide which usb device will work with which driver by testing and creating rules -it is important to have the wdm driver version, because many usb devices will work only with that driver

questions: -can you also say or comment something to these observations? -would it be possible to have only one version of usbip-win2 which will work crossplatform or do you need both driver versions (wdm and ude) and you can't avoid creating vendor or device specific rules? -can this info help you in developping further the usbip-win2 project?

vadimgrn commented 11 months ago
comsyspro commented 11 months ago

from my observations at the moment i have to use wdm in following cases: -usb storage sticks only work with wdm from win (client) to linux (server) -/- with ude the usb sticks are only recognized but the volume is not created and so the usb stick is not mounted with a drive letter -some controllers like graphic tablet or 3d controller only work stable with wdm -/- using ude makes the system unstable often getting bsod -when using win (client) to win (server) there are not so many problems with ude and bsod, so to make it crossplatform for win and lin you need to find the best combination at least at the moment

my gui is created with python and pyqt. it is very minimalistic but it can attach/detach usb devices on win + lin client side and also another gui is in development for win + lin server side to bind/unbind. perhaps i will add an autoconnect function later for server and client side.

as i don't know how fast you will develop further i'm taking the actual releases 0.9.3.4 for wdm and 0.9.5.8 for ude. if it is possible to do all the stuff only based on the ude driver then it would be much easier. but at the moment it is not possible to use only ude and has also some problems for which wdm driver is required at least for crossplatform usage. and as i described without testing the usb devices and fixing it with some rules the usbip has also problems. i don't know how the other software developers has solved this for big amount of usb devices perhaps they have also to deal with different usb classes or they have developed independant/own software for linux and windows usbip which is not based on usbip from linux.

vadimgrn commented 11 months ago

I have several usb flash drives and all work without issues. Gigabytes of data can be copied without errors. Bug reports, logs.

comsyspro commented 11 months ago

from windows to windows the usb flash works also with ude for me, but from windows to linux i have to use wdm as described. i don't know why that's the case. at the moment i will develop the gui and later when i have more time i can collect more infos about logs.

here is a small overview that shows some observations using different os combinations and usb devices: usb storage devices: win to win -> ude is ok -> wdm is ok win to lin -> wdm is ok -> ude recognizes usb stick but do not mount

3d controller or 3d mouse: win to win -> ude causes bsod -> wdm is ok win to lin -> wdm is ok -> ude is ok

vadimgrn commented 11 months ago

I don't care about Win server, I use Linux server only.

comsyspro commented 11 months ago

what linux do you use? perhaps there are also some differences. mainly i use ubuntu with usbip version 2.0.

vadimgrn commented 11 months ago

I use Linux Mint with kernel 6.2 currently. Previous kernels work well too.

comsyspro commented 11 months ago

thank you. overall it works now either with wdm or ude drivers. there ar some devices like card readers which i can't get work, but that is not so important for me. i wonder how other usb redirection software solutions can handle all types of usb devices.

vadimgrn commented 11 months ago

Are you sure about that? I worked for major developer of such proprietary software with its own protocol instead of usbip. Its products had, have and will always have tons of bugs. I can't solve only one real problem in UDE driver.

comsyspro commented 11 months ago

i tried different software solutions and they do support for example out of the box some of my usb devices. (usb storage sticks, graphic tablet, 3d mouse, multi card reader...). so i got the impression that they do something different or have an own development. now i can get the most usb devices running with your usbip-win2 project on windows client. as decribed i have to experiment which driver to use best for which usb device. also making tests with win to win and win to lin until i got something running stable.

i have also another question. in the latest code you have a folder with ude and wdm driver. when compiling this is then only the ude driver included in the innosetup? or is it possible to add both drivers in one innosetup or is wdm only in wdm branch and development is stopped for wdm?

vadimgrn commented 11 months ago

WDM is in "wdm" branch, I will delete its directory from UDE branch to not confuse people.

comsyspro commented 11 months ago

thank you. can you also say something what is the "USBIP SDK" and "Program DataBase files" for when running the innosetup installer? do you need this or is this for debugging errors only?

vadimgrn commented 11 months ago

SDK will install C++ headers, PDB are required for debugging BSOD.