cezanne / usbip-win

USB/IP for Windows
GNU General Public License v3.0
1.92k stars 346 forks source link

Issue when unbinding device #311

Open charleliedesmet opened 2 years ago

charleliedesmet commented 2 years ago

Hello, i have an issue with usbip and usbipd, i am using it to access smart card readers over the network, but whenever i unbind one of them on the server, it stops working (only the one i unbind) and the only way to get it back to a working state is to physically unplug it and plug it back in.

I tried to unbind/bind/usbreset/etc.. it via using the CLI but nothing works, maybe you have an idea ?

Thanks !

cezanne commented 2 years ago

@charleliedesmet : Which version did you test? I believe that the usbip tools in dev branch(d10576d) may resolve your issue. Here is a temporary package usbip-win-d10576d.zip. Can you try this?

Kogotoro commented 2 years ago

Hi, on windows same (or a like) problem with usb-key-token , before bind it displayed as USB Token, and after unbind it become some thing like 'smart-card device reader Microsoft Usbccid (WUDF)' with error code 31 (its translation and maybe a bit wrong). build d10576d win10. (and it require manual replug, or deleting device from device-manager and perform search plug&play)

__upd: seems SafeNetAuthenticationClient cause this mess... (its create in smart-card-device-reader-pool: 2x IFD Handler, 1x VR Handler, 1x iKey Enumerator, 2x iKey Virtual Reader (2 is configurable value, ie it can work with 2 usb-keys now), and retranslate keys as usb-devices to USB-pool seems...)

Because without it usb-key appears in smart-card-device-reader-pool and bind& unbindhappens within that pool and all ok...

But after install SafeNetAuthenticationClient usb-key appears in USB-pool as USB Token initially, bindcreate STUB in USB-pool and works fine, but unbindtry install driver from smart-card-device-reader-pool to device from USB-pool...?

_upd2: its usbdeview report 1st line without SafeNetAuthenticationClient , 2nd with it -- report1.zip

___Q1: is there any other windows utilities with more detailed info? (beside 'line by line' from device-manager)

Kogotoro commented 1 year ago

upd3: as mention here https://github.com/mareklinka/SafeNetTokenSigner/issues/1#issuecomment-482046292 SafeNet have countermeasures for remote work (at least it tries), it also can be same for other soft working with smartcards(usb-keys/tokens).

i also tried change install/deinstall driver based on how it done in https://github.com/dorssel/usbipd-win and it gives same behavior.

__ also i checked same thing with vbox: host dont have safenet (token normaly appear in device manager in both sections 'smartcard readers' and 'smartcard') client vbox machine with safenet

and after mount usb into client and unmount it, token displays only in 'smartcard readers' until replug, and if not replug then after 1-2 min. it get error state.