Skip to content

usbipd failed to attach #1239

@minicarpet

Description

@minicarpet

Probably again the same issue, I can't attach my device using usbipd.

My device is a Jetson Orin NX which is in recover state, the first step works and the device can be attached to send the boot (device 0955:7323 APX), but then the device restart as mass storage (1d6b:0104 Mass storage USB) and I got the issue.

usbipd.exe attach --busid 1-8 --wsl --auto-attach
usbipd: info: Using WSL distribution 'Ubuntu-24.04' to attach; the device will be available in all WSL 2 distributions.
usbipd: info: Detected networking mode 'nat'.
usbipd: info: Using IP address 172.24.16.1 to reach the host.
usbipd: info: Starting endless attach loop; press Ctrl+C to quit.
WSL Monitoring host 172.24.16.1 for BUSID: 1-8
WSL 2025-08-01 18:04:36 Device 1-8 is available. Attempting to attach...
WSL 2025-08-01 18:04:36 Failed to attach device 1-8
WSL 2025-08-01 18:04:54 Device 1-8 is available. Attempting to attach...
WSL 2025-08-01 18:04:54 Failed to attach device 1-8
WSL 2025-08-01 18:05:11 Device 1-8 is available. Attempting to attach...
WSL 2025-08-01 18:05:11 Failed to attach device 1-8
WSL 2025-08-01 18:05:29 Device 1-8 is available. Attempting to attach...
WSL 2025-08-01 18:05:29 Failed to attach device 1-8
WSL 2025-08-01 18:05:46 Device 1-8 is available. Attempting to attach...
WSL 2025-08-01 18:05:46 Failed to attach device 1-8
WSL 2025-08-01 18:06:04 Device 1-8 is available. Attempting to attach...
WSL 2025-08-01 18:06:04 Failed to attach device 1-8
WSL 2025-08-01 18:06:22 Device 1-8 is available. Attempting to attach...
WSL 2025-08-01 18:06:22 Failed to attach device 1-8
WSL 2025-08-01 18:06:39 Device 1-8 is available. Attempting to attach...
WSL 2025-08-01 18:06:39 Failed to attach device 1-8
WSL 2025-08-01 18:06:56 Device 1-8 is available. Attempting to attach...

On usbipd server:

usbipd server Logging:LogLevel:Default=Trace
dbug: Microsoft.Extensions.Hosting.Internal.Host[1]
      Hosting starting
dbug: Usbipd.PcapNg[1000]
      usbipd:PcapNg:Path = ''
dbug: Usbipd.Server[1000]
      usbipd:Port = 3240
dbug: Usbipd.Server[1000]
      5.1.0-41+Branch.master.Sha.fe06088bb6916e6722bd66b03d245141ae8ec6c1
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:\Users\logan.gallois
dbug: Microsoft.Extensions.Hosting.Internal.Host[2]
      Hosting started
dbug: Usbipd.Server[1000]
      new connection from 172.24.16.71
dbug: Usbipd.Server[1000]
      connection close: Unable to read beyond the end of the stream.
dbug: Usbipd.Server[1000]
      connection closed
dbug: Usbipd.Server[1000]
      new connection from 172.24.16.71
dbug: Usbipd.ConnectedClient[1000]
      Received opcode: OP_REQ_DEVLIST
dbug: Usbipd.Server[1000]
      connection closed
dbug: Usbipd.Server[1000]
      new connection from 172.24.16.71
dbug: Usbipd.ConnectedClient[1000]
      Received opcode: OP_REQ_IMPORT
fail: Usbipd.ConnectedClient[3]
      An exception occurred while communicating with the client:
      System.IO.FileNotFoundException: Unable to find the specified file.
         at Usbipd.ConfigurationManager.GetVBoxDevice(BusId) + 0x153
         at Usbipd.VBoxUsb.<ClaimDeviceOnce>d__0.MoveNext() + 0x6b
      --- End of stack trace from previous location ---
         at Usbipd.VBoxUsb.<ClaimDevice>d__1.MoveNext() + 0x17e
      --- End of stack trace from previous location ---
         at Usbipd.VBoxUsb.<ClaimDevice>d__1.MoveNext() + 0x2b9
      --- End of stack trace from previous location ---
         at Usbipd.ConnectedClient.<HandleRequestImportAsync>d__8.MoveNext() + 0xf03
      --- End of stack trace from previous location ---
         at Usbipd.ConnectedClient.<HandleRequestImportAsync>d__8.MoveNext() + 0x18f9
      --- End of stack trace from previous location ---
         at Usbipd.ConnectedClient.<RunAsync>d__5.MoveNext() + 0x32f
dbug: Usbipd.Server[1000]
      connection close: Unable to find the specified file.
dbug: Usbipd.Server[1000]
      connection closed
dbug: Usbipd.Server[1000]
      new connection from 172.24.16.71
dbug: Usbipd.ConnectedClient[1000]
      Received opcode: OP_REQ_DEVLIST
dbug: Usbipd.Server[1000]
      connection closed
dbug: Usbipd.Server[1000]
      new connection from 172.24.16.71
dbug: Usbipd.ConnectedClient[1000]
      Received opcode: OP_REQ_IMPORT
fail: Usbipd.ConnectedClient[3]
      An exception occurred while communicating with the client:
      System.IO.FileNotFoundException: Unable to find the specified file.
         at Usbipd.ConfigurationManager.GetVBoxDevice(BusId) + 0x153
         at Usbipd.VBoxUsb.<ClaimDeviceOnce>d__0.MoveNext() + 0x6b
      --- End of stack trace from previous location ---
         at Usbipd.VBoxUsb.<ClaimDevice>d__1.MoveNext() + 0x17e
      --- End of stack trace from previous location ---
         at Usbipd.VBoxUsb.<ClaimDevice>d__1.MoveNext() + 0x2b9
      --- End of stack trace from previous location ---
         at Usbipd.ConnectedClient.<HandleRequestImportAsync>d__8.MoveNext() + 0xf03
      --- End of stack trace from previous location ---
         at Usbipd.ConnectedClient.<HandleRequestImportAsync>d__8.MoveNext() + 0x18f9
      --- End of stack trace from previous location ---
         at Usbipd.ConnectedClient.<RunAsync>d__5.MoveNext() + 0x32f

Note that on windows I can't enumerate the device:

Image

I have tried to rebuild Linux kernel for my WSL (see attached file : config-wsl.txt). MAy I have to set CONFIG_USB_GADGET ?

We can see that kernel only see the first device:

[   55.397915] vhci_hcd vhci_hcd.0: Device attached
[   55.631603] usb 1-1: new high-speed USB device number 3 using vhci_hcd
[   55.759413] usb 1-1: SetAddress Request (3) to port 0
[   55.794238] usb 1-1: New USB device found, idVendor=0955, idProduct=7323, bcdDevice= 4.01
[   55.794242] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[   55.794242] usb 1-1: Product: APX
[   55.794243] usb 1-1: Manufacturer: NVIDIA Corp.
[   75.659646] vhci_hcd: connection closed
[   75.659733] vhci_hcd: stop threads
[   75.659735] vhci_hcd: release socket
[   75.659738] vhci_hcd: disconnect device
[   75.659772] usb 1-1: USB disconnect, device number 3

but never the Mass storage one.

What I should I do now ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions