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

Not able to connect via USB and send commands using USBIPD because of different IP addresses #1020

Open
Henrique-Liesenfeld-Krever opened this issue Aug 20, 2024 · 3 comments

Comments

@Henrique-Liesenfeld-Krever

Hi, i'm trying to use usbipd to connect via usb from my computer to a external machine, it works on linux and macos but not on windows, the problem i've been having is the following.

I have done the procedures described in https://learn.microsoft.com/en-us/windows/wsl/connect-usb when I use the command

usbipd attach -w ubuntu --busid 1-8

I get the following message:
usbipd: info: Using WSL distribution 'Ubuntu' to attach; the device will be available in all WSL 2 distributions. usbipd: info: Using IP address 172.27.160.1 to reach the host.

The problem is, when I type "wsl" on my Powershell, it transitions to the ubuntu subsystem, when using the command:
hostname -I
on the wsl cmi i get the following message
"172.27.169.251"
which means, the IP are different, and when i execute my code to connect to my device for some reason (i guess the different IP), my device doesn't get the commands I send him and the code doesnt work properly (it works on linux and macos), is there something i'm missing? If so, please enlighten me, sorry if this is a easy fix and a dumb question, I've been banging my head all day trying to figure this out.

If more information is necessary, please let me know!

@dorssel
Copy link
Owner

dorssel commented Aug 20, 2024

Using IP address 172.27.160.1 to reach the host.

This is the host IP address, that will be used from WSL to reach the Windows host. It is not the IP address of WSL (which is what you got with hostname -I).

Is there any error after the attach? What is the output of lsusb on WSL after the attach?

@Henrique-Liesenfeld-Krever
Copy link
Author

Henrique-Liesenfeld-Krever commented Aug 21, 2024

There isn't an error after the attach procedure, the machine just doesn't receive the commands send via USB.

The output of lsusb is

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

Bus 001 Device 002: ID 0451:4200 Redacted

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The device with ID 0451:4200 is the one wich isn't receving the commands. Again, i don't think the problem is on the device, since it works on linux and macos.

@dorssel
Copy link
Owner

dorssel commented Aug 21, 2024

The device is attached correctly. See https://github.com/dorssel/usbipd-win/wiki/Troubleshooting if you want to see any captures. Looks like any problem is client side (WSL).

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

2 participants