Skip to content
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

can't attach device from WSL #752

Closed
ZZH-Finalize opened this issue Nov 7, 2023 · 8 comments
Closed

can't attach device from WSL #752

ZZH-Finalize opened this issue Nov 7, 2023 · 8 comments

Comments

@ZZH-Finalize
Copy link

ZZH-Finalize commented Nov 7, 2023

When I use command usbip list -r 192.168.1.3, I found it can list the devices that bind with usbipd-win, but I can't use usbip attach -r 192.168.1.3 -b 4-2 to attach this device to WSL. Why is that? I think the connection should be able to build from both side (from Windows or from WSL)

image

image

@dhcstruggle
Copy link

Same issue here.

@dhcstruggle
Copy link

I found solution here and it works for me. just FYI:
#663 (comment)

@ZZH-Finalize
Copy link
Author

I found solution here and it works for me. just FYI: #663 (comment)

It is different than my issue, because I can build the connection from Windows use usbipd wsl attach command, this command works well, but what I want is build this connection from WSL by usbip attach command, and this command will report "Device busy".

Still thx for that.

@dorssel
Copy link
Owner

dorssel commented Nov 7, 2023

"Device busy" means that the host is currently actively using the device. Either stop the software/service on Windows that is using the device, or use usbipd bind --force.

@ZZH-Finalize
Copy link
Author

ZZH-Finalize commented Nov 8, 2023

"Device busy" means that the host is currently actively using the device. Either stop the software/service on Windows that is using the device, or use usbipd bind --force.

@dorssel Actually, That device is already bind to usbipd with the --force flag, but it just can't attach from WSL (from Windows is OK), and I find if I change networkingMode to mirrored, then I can attach the same device from WSL, meanwhile, from Windows to attach the device will fail.

image

.wslconfig
image

@ZZH-Finalize
Copy link
Author

"Device busy" means that the host is currently actively using the device. Either stop the software/service on Windows that is using the device, or use usbipd bind --force.

I guess I find the reason, attach a device from WSL has to be under the root privilege, if execute the usbip command without sudo, even chang the .wslconfig is useless.

@dorssel
Copy link
Owner

dorssel commented Nov 8, 2023

attach a device from WSL has to be under the root privilege

That is correct, and that is what usbipd wsl attach uses underwater. mirror mode is not yet supported, see #714. Is your issue resolved now?

@ZZH-Finalize
Copy link
Author

attach a device from WSL has to be under the root privilege

That is correct, and that is what usbipd wsl attach uses underwater. mirror mode is not yet supported, see #714. Is your issue resolved now?

Yes, Thanks for the help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants