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

Unable to attach Sierra Wireless modem to WSL2 (can't set config #1, error -110) #647

Open
mfe-dev opened this issue Jun 29, 2023 · 4 comments
Labels
hardware Incompatible device or hub

Comments

@mfe-dev
Copy link

mfe-dev commented Jun 29, 2023

Hi,

Thanks for your work on this !

I'm facing an issue when trying to attach my WP7607 devkit (from Sierra Wireless) to WSL2. From dmesg, it seems that there was an issue with interface number ...

[103150.752898] vhci_hcd vhci_hcd.0: pdev(0) rhport(1) sockfd(3)
[103150.752902] vhci_hcd vhci_hcd.0: devid(65540) speed(3) speed_str(high-speed)
[103150.752926] vhci_hcd vhci_hcd.0: Device attached
[103151.096850] usb 1-2: new high-speed USB device number 16 using vhci_hcd
[103151.246712] usb 1-2: SetAddress Request (16) to port 1
[103151.293817] usb 1-2: config 1 has an invalid interface number: 8 but max is 4
[103151.293820] usb 1-2: config 1 has an invalid interface number: 19 but max is 4
[103151.293821] usb 1-2: config 1 has an invalid interface number: 20 but max is 4
[103151.293821] usb 1-2: config 1 has an invalid interface number: 20 but max is 4
[103151.293822] usb 1-2: config 1 has no interface number 1
[103151.293822] usb 1-2: config 1 has no interface number 2
[103151.293822] usb 1-2: config 1 has no interface number 4
[103151.303594] usb 1-2: New USB device found, idVendor=1199, idProduct=68c0, bcdDevice= 4.14
[103151.303598] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[103151.303599] usb 1-2: Product: Sierra Wireless WP7607
[103151.303599] usb 1-2: Manufacturer: Sierra Wireless, Incorporated
[103151.303600] usb 1-2: SerialNumber: 29d8277a
[103151.318458] vhci_hcd: connection closed
[103151.318564] vhci_hcd: stop threads
[103151.318566] vhci_hcd: release socket
[103151.318569] vhci_hcd: disconnect device
[103156.376736] usb 1-2: can't set config #1, error -110
[103156.377304] usb 1-2: USB disconnect, device number 16

I attached the usbview from Windows

Also, I've found that on Sierra Wireless forum. It's related to another device, but it seems to be the same issue on Linux side. I tried to add this udev rules (after changing the pid) but it didn't fix anything

Let me know if there is a solution to access this device from WSL2

BR,
Mathieu F.

usbview.txt

@dorssel
Copy link
Owner

dorssel commented Jun 29, 2023

Please follow https://github.com/dorssel/usbipd-win/wiki/Troubleshooting to get full logging on the usbipd-win service and include a USB capture as well.

@mfe-dev
Copy link
Author

mfe-dev commented Jun 29, 2023

Here is the console output, and the pcapng file attached :

dbug: Microsoft.Extensions.Hosting.Internal.Host[1]
      Hosting starting
dbug: Usbipd.PcapNg[1000]
      usbipd:PcapNg:Path = 'C:\Users\MFE Airnity\usbipd_log.pcapng'
dbug: Usbipd.PcapNg[1000]
      usbipd:PcapNg:SnapLength = unlimited
dbug: Usbipd.Server[1000]
      3.0.0+361.Branch.master.Sha.89d4b327c99a4eecc9b583e1843a428aae3c9270
dbug: Usbipd.Server[1000]
      usbipd:TcpKeepAliveInterval = 500 ms
dbug: Usbipd.Server[1000]
      usbipd:TcpKeepAliveTime = 10000 ms
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\MFE Airnity
dbug: Microsoft.Extensions.Hosting.Internal.Host[2]
      Hosting started
dbug: Usbipd.PcapNg[1000]
      Flushing
dbug: Usbipd.Server[1000]
      new connection from 172.25.48.112
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.25.48.112
dbug: Usbipd.ConnectedClient[1000]
      Received opcode: OP_REQ_IMPORT
dbug: Usbipd.ConnectedClient[1000]
      Claiming took 1307 ms
info: Usbipd.ConnectedClient[1]
      Client 172.25.48.112 claimed device at 1-4 (USB\VID_1199&PID_68C0\5&345A7FD9&0&4).
dbug: Usbipd.AttachedClient[1000]
      Masked USB_CONFIG_REMOTE_WAKEUP
dbug: Usbipd.AttachedClient[1000]
      Masked USB_CONFIG_REMOTE_WAKEUP
dbug: Usbipd.AttachedClient[1000]
      Trapped SET_CONFIGURATION: 1
info: Usbipd.ConnectedClient[2]
      Client 172.25.48.112 released device at 1-4 (USB\VID_1199&PID_68C0\5&345A7FD9&0&4).
dbug: Usbipd.ConnectedClient[1000]
      Unbind or unplug while attached
fail: Usbipd.ConnectedClient[3]
      An exception occurred while communicating with the client:
      System.ComponentModel.Win32Exception (87): DeviceIoControl returned error ERROR_INVALID_PARAMETER
         at Usbipd.AttachedClient.HandleSubmitAsync(UsbIpHeaderBasic, UsbIpHeaderCmdSubmit, CancellationToken) in D:\a\usbipd-win\usbipd-win\Usbipd\AttachedClient.cs:line 310
         at Usbipd.AttachedClient.RunAsync(CancellationToken) in D:\a\usbipd-win\usbipd-win\Usbipd\AttachedClient.cs:line 521
         at Usbipd.ConnectedClient.HandleRequestImportAsync(CancellationToken) in D:\a\usbipd-win\usbipd-win\Usbipd\ConnectedClient.cs:line 228
         at Usbipd.ConnectedClient.HandleRequestImportAsync(CancellationToken) in D:\a\usbipd-win\usbipd-win\Usbipd\ConnectedClient.cs:line 251
         at Usbipd.ConnectedClient.HandleRequestImportAsync(CancellationToken) in D:\a\usbipd-win\usbipd-win\Usbipd\ConnectedClient.cs:line 270
         at Usbipd.ConnectedClient.RunAsync(CancellationToken) in D:\a\usbipd-win\usbipd-win\Usbipd\ConnectedClient.cs:line 58
dbug: Usbipd.Server[1000]
      connection close: DeviceIoControl returned error ERROR_INVALID_PARAMETER
dbug: Usbipd.Server[1000]
      connection closed
dbug: Usbipd.PcapNg[1000]
      Flushing
info: Microsoft.Hosting.Lifetime[0]
      Application is shutting down...
dbug: Microsoft.Extensions.Hosting.Internal.Host[3]
      Hosting stopping
dbug: Microsoft.Extensions.Hosting.Internal.Host[4]
      Hosting stopped

usbipd_log.zip

@dorssel
Copy link
Owner

dorssel commented Jun 29, 2023

The device resets after SET_CONFIGURATION: 1, since it immediately reports:

Unbind or unplug while attached

That's not what it is supposed to do. I'm afraid the device is incompatible with the USB spec; usbipd-win really requires to pass SET_CONFIGURATION, as it also is used by the VirtualBox driver to set up all the interfaces and pipes.

@mfe-dev
Copy link
Author

mfe-dev commented Jun 30, 2023

That's what I was afraid of ... Thanks for your analysis anyway 🙏🏻

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

No branches or pull requests

2 participants