dorssel / usbipd-win

Windows software for sharing locally connected USB devices to other machines, including Hyper-V guests and WSL 2.
GNU General Public License v3.0
3.54k stars 229 forks source link

WSL usbip: error: Attach Request for 1-2 failed - Unknown Op Common Status #1035

Open xyf2002 opened 2 hours ago

xyf2002 commented 2 hours ago

Description:

I encountered an error while trying to attach a USB device to my WSL 2 distribution using usbipd. The command fails with an "Unknown Op Common Status" error.

Steps to Reproduce:

  1. Connect the USB device to the Windows host.
  2. Run the following command in PowerShell:
    usbipd wsl list
    • The device is listed with busid=1-2.
  3. Attempt to attach the device to the WSL distribution:
    usbipd attach --wsl --busid=1-2
  4. The following error occurs:
    usbipd: info: Using WSL distribution 'Ubuntu' to attach; the device will be available in all WSL 2 distributions.
    usbipd: info: Using IP address 172.29.48.1 to reach the host.
    WSL usbip: error: Attach Request for 1-2 failed - Unknown Op Common Status
    usbipd: error: Failed to attach device with busid '1-2'.

Expected Behavior: The USB device should be successfully attached and available in the WSL 2 environment.

Actual Behavior: The attachment fails with an "Unknown Op Common Status" error.

System Information:

Additional Information:

Logs and Debug Output: (Include any relevant logs from running usbipd in debug mode or dmesg output from WSL, if applicable)

Questions:

dorssel commented 2 hours ago

WSL usbip: error: Attach Request for 1-2 failed - Unknown Op Common Status

This is an error from the WSL-side usbip tool. The "Unknown Op Common Status" suggests that the TCP connection fails in a very early stage (even before it connects to the host usbipd service). To confirm, can you run the server in a console with debug output? See: https://github.com/dorssel/usbipd-win/wiki/Troubleshooting. Also, can you ping the host from within WSL with ping 172.29.48.1? (Note that the IP address may have changed by now, it is kind of random every time WSL restarts).