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.8k stars 234 forks source link

iphone doesnt attach on ubuntu 20.04 #349

Closed someone2008 closed 2 years ago

someone2008 commented 2 years ago

usbipd wsl attach --busid 3-4 usbipd: info: Using default distribution 'Ubuntu-20.04'. usbip: error: Attach Request for 3-4 failed - Device busy (exported)

usbipd: error: Failed to attach device with BUSID '3-4'.

dorssel commented 2 years ago

Device busy (exported)

Please search through the issues for 'iPhone' and 'Device busy'. This has been answered before.

Hinkiii commented 2 years ago

Is it possible to always bind/attach to the same device slot?

dorssel commented 2 years ago

If you mean: attach as soon as the device is connected: see PR #351.

Hinkiii commented 2 years ago

Well the auto attach feature itself works great but sadly the WSL environment never sees it as being in the same port I guess?

mynam@Jojo:$ lsusb Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 003: ID 05ac:1281 Apple, Inc. Apple Mobile Device [Recovery Mode] Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub mynam@Jojo:$ lsusb Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 004: ID 05ac:1281 Apple, Inc. Apple Mobile Device [Recovery Mode] Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub mynam@Jojo:$ lsusb Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 005: ID 05ac:1227 Apple, Inc. Mobile Device (DFU Mode) Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

And the usbipd logs

usbipd wsl attach --auto-attach -b 6-2 usbipd: info: Starting endless attach loop; press Ctrl+C to quit. Attached Detached usbip: error: Attach Request for 6-2 failed - Device not found Attached Detached usbip: error: Attach Request for 6-2 failed - Device not found Attached Detached usbip: error: Attach Request for 6-2 failed - Device not found Attached

I think it could be more that there's no libusb event when usbip updates what's attached and when

dorssel commented 2 years ago

@Hinkiii I think you are confusing "Bus 001 Device 004" with the device ID designator. You'll find that the latter is always 1-1 (unless of course you attach multiple devices). It is normal for the Linux VHCI driver to have an incremental number for "Bus XXX Device YYY". This is not WSL related, but happens on any Linux. What is constant is the "1-1" as listed in /sys/bus/usb/devices.

dorssel commented 2 years ago

@Hinkiii Has this issue been resolved?

Hinkiii commented 2 years ago

It's probably worth closing, it wasn't working quite as I wanted it to but it's fine

WWIA7062 commented 6 months ago

i have the same issue trying to run checkra1n on WSL 2