-
-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Workaround: attach failed with System.IO.FileNotFoundException #63
Comments
This is unfortunately the part where usbipd-win has the least amount of control. At this point, the VBoxUSBMon driver is supposed to tell the USB-hub that the device has "changed". It does this by overriding the device ID, such that Windows believes a different device is now plugged in, upon which it will use the VBoxUSB stub driver. VBoxUSBMon does this by simulating an unplug/replug sequence. I've seen exactly this error before with integrated devices that are marked as "non-pluggable". For that case, usbipd-win throws in an additional RESET_PORT to the hub. Apparently, your device is not being correctly filtered by VBoxUSBMon, hence Windows will not substitute the driver. And at that point usbipd-win reports: device not found. This means it is going wrong at the "hub" level, not at the "device" level. You can try any of these things:
At the time of "attaching" a device with usbipd-win, you will hear a Windows audio signal (the same you hear when you unplug a device). Does that happen for you? It will give some more information about the stage that goes wrong... You may also open device manager and select the device. When you try to "attach", does the device (briefly) disappear, or does nothing happen? |
Looks like I am having the same issue. For me the device does briefly disappear and I do get a Windows notification for a newly connected device. I also tried disabling the power saving feature for all my USB hubs and tried a couple of different ports on my machine just to be sure (I even tried different cables) but none of that seemed to help. Is there anything else that can be done? Here's my hardware configuration:
|
If you want to pursue this further, you could try if a full installation of VirtualBox is in fact capable of forwarding the device to its guests. If that works it is an indication that it should be fixable in Until then, we'll have to mark this device as incompatible. Can you provide make/model and the Vendor/Product ID (0123:4567)? |
hi, powershell running in admin mode to execute usbipd command `usbipd wsl list usbipd wsl attach -b 1-1 `Get-PnpDevice -FriendlyName "USB Serial Converter" | fl * Class : USB thanks |
@Eric-N-Be
This means that the USBIP client on the Linux end is not available. Please follow the instructions on how to setup the client side: https://github.com/dorssel/usbipd-win/wiki/WSL-support |
@calipzo Could you please test the build artifact of PR #93, it is at https://github.com/dorssel/usbipd-win/actions/runs/1459452495. |
Unfortunately it doesn't either fix my problem the error still same C:\Windows\system32>usbipd wsl attach -b 5-2 usbipd: error: Failed to attach device with ID '5-2'. |
Confirm, the error still same |
thanks for your help .. I have a debian distro, then a need to change a little your procedure.
i don't have at this time change the /etc/sudoers At this time it's working for a simple mass storage ... i will test later with "USB Serial Converter" edit : Working for me, thanks |
@calipzo Build artifact at: |
well no not working either C:\Windows\system32>usbipd wsl attach -b 3-3 usbipd: error: Failed to attach device with ID '3-3'. |
@dorssel thanks for looking into this. Here is some more info:
My device list:
Trying to attach:
Enabling trace logs
Is there anything that needs to be on the Linux side after installing the new MSI? |
@pouyaemami
|
|
|
ok i will look into driver and will correct it if i see clumsiness |
@dorssel
Something to note: I have a ThinkPad Thunderbolt 3 Dock that I've connected to my machine and I've connected my Android device to it. I also tried connecting directly to my laptop but the issues still persists. I also tried this without the dock connected and still no success. |
|
Let me see what I can do regarding the drivers and I'll get back to you. |
@pouyaemami
And then also the details for your 1-10 device, which is some Wacom Device. It may be listed as "USB Composite Device". For example in my case:
|
Do you want driver details for all of these devices? |
Ah, "Lenovo Pen Device". Lets examine that first. Can you run the following in a CMD prompt and report the output:
|
I ran the command you requested:
Here is the list of attached devices
I don't have USBPcap installed or anything like it (to my knowledge). |
@pouyaemami About the original issue:
|
@dorssel Here's the output you requested:
I am not clear on why I needed to run the server in the console as there were not additional logs given. Should I also try to run the attach command? |
Yes, run on the console with full logging, and while logging run the attach command. |
@pouyaemami |
@dorssel so I just rebooted after removing the registry entry. Ran the attach command and boom! Works like a charm :) Thank you so much for all the help and getting things working! If you ever need me to test things out for you, please let me know. It's the least I can do. |
@pouyaemami Here is what I will do:
Ultimate goal: get every USB device connected to every WSL installation out there... (ok, ambitious, I admit) |
Hi there and thank you @dorssel for this great tool! I'm one of those that is getting this FileNotFoundException. Sometimes I can attach my USB device (STLink Debugger), somtimes I cannot. Removing the "UpperFilters" (USBPcap was installed) did not work. But what I found out is, that if I have a dongle (simple hdmi and USB adapter) attached to my laptop (via USB-C). I can't attach. If i remove the dongle, I can attach! I don't know if this helps in any way. Let me know if I should provide more information for investigation. |
@NikLeberg I wonder if the dongle, which isn't really a USB device but is attached to a hub that could take a USB device, is throwing device enumeration off? Could you run If the problem is with VBoxUsbMon (which is what I suspect), this is a nasty one to track down. I am working on a more aggressive device grabber, see https://github.com/dorssel/usbipd-win/actions/runs/1464274520. Although that build is a bit old you may want to give it a try. |
I don't really know how to read the Sadly with the more aggressive device grabber doesnt work either. But the error changes! (It stills works if I disconnect the dongle though.)
|
@NikLeberg |
Well now it gets a bit funny @dorssel ... I installed the artifact of PR #134 But I could make some observations:
The error in the tracelog was always the following:
After that I tried a few times more with the current version If I can provide some additional logging / debugging I'm more than happy to assist! |
@NikLeberg How is the timing? How much time do you guestimate for successful attach without dongle, with dongle, and failure with dongle? The "double sound" thing is interesting as well. Do you get any disconnect/connect sounds when it fails? |
@dorssel On failure it makes the distinct "disconnect" sound right after entering the wsl password, then right when it fails, it plays the "connect" sound. |
@NikLeberg
My guess, it will refresh after the disconnect sound. I am hoping the device will show differently for those 5 seconds. Does the device name change? Does it have a bang or question mark? Does it change at all? |
@dorssel The |
@NikLeberg |
@dorssel Very grateful for your hard work! Let me know if I can help in any way! |
@NikLeberg |
When I try to connect the device, it says the following:
PS C:\windows\system32> usbipd wsl attach --busid=6-1 [sudo] password for calipso: usbip: error: Attach Request for 6-1 failed - Request Failed usbipd: error: Failed to attach device with ID '6-1'. PS C:\windows\system32>
With extended error output the messages are as follows:
dbug: Microsoft.Extensions.Hosting.Internal.Host[1] Hosting starting info: Microsoft.Hosting.Lifetime[0] Application started. Press Ctrl+C to shut down. info: Microsoft.Hosting.Lifetime[0] Hosting environment: Production info: Microsoft.Hosting.Lifetime[0] Content root path: C:\windows\system32 dbug: Microsoft.Extensions.Hosting.Internal.Host[2] Hosting started dbug: UsbIpServer.Server[0] new connection from 172.21.14.67 dbug: UsbIpServer.ConnectedClient[0] Received opcode: OP_REQ_IMPORT fail: UsbIpServer.ConnectedClient[3] An exception occurred while communicating with the client: System.IO.FileNotFoundException: Unable to find the specified file. at UsbIpServer.VBoxUsbMon.ClaimDeviceOnce(ExportedDevice device) in D:\a\usbipd-win\usbipd-win\UsbIpServer\VBoxUsbMon.cs:line 144 at UsbIpServer.VBoxUsbMon.ClaimDevice(ExportedDevice device) in D:\a\usbipd-win\usbipd-win\UsbIpServer\VBoxUsbMon.cs:line 155 at UsbIpServer.VBoxUsbMon.ClaimDevice(ExportedDevice device) in D:\a\usbipd-win\usbipd-win\UsbIpServer\VBoxUsbMon.cs:line 161 at UsbIpServer.ConnectedClient.HandleRequestImportAsync(CancellationToken cancellationToken) in D:\a\usbipd-win\usbipd-win\UsbIpServer\ConnectedClient.cs:line 158 dbug: UsbIpServer.Server[0] connection closed
Any ideas?
The text was updated successfully, but these errors were encountered: