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

usbip: error: import device #13

Open
PhoeLycia opened this issue Jun 11, 2020 · 2 comments
Open

usbip: error: import device #13

PhoeLycia opened this issue Jun 11, 2020 · 2 comments

Comments

@PhoeLycia
Copy link

PhoeLycia commented Jun 11, 2020

Hello. Thanks for This Documents at first.
Here is the problem while executing usbip attach -r $winHost -b $busid:

root@PHOELYCIA:~# usbip list -r $winHost
Exportable USB devices
======================
 - 172.27.208.1
      1-249: Meizu Corp. : MX Phone (MTP & ADB) (2a45:0c02)
           : \\?\usb#vid_2a45&pid_0c02#79bqads3k8h4b#{fb265267-c609-41e6-8eca-a20d92a833e6}
           : (Defined at Interface level) (00/00/00)

root@PHOELYCIA:~# usbip attach -r $winHost -b 1-249
usbip: error: import device

Environments:

  • OS:
    • WIndows: Microsoft Windows NT 10.0.19041.0
    • WSL2: Ubuntu 18.04.4 LTS
  • WSL2 Kernel--Added USB support.
    root@PHOELYCIA:~# uname -r
    4.19.121-microsoft-standard
    
    image
  • usbip--Compiled Successfully.
    root@PHOELYCIA:~# usbip help
    usage: usbip [--debug] [--log] [--tcp-port PORT] [version]
               [help] <command> <args>
    
    attach     Attach a remote USB device
    detach     Detach a remote USB device
    list       List exportable or local USB devices
    bind       Bind device to usbip-host.ko
    unbind     Unbind device from usbip-host.ko
    port       Show imported USB devices
    
  • usbip-win--Installed Successfully
    PS C:\Windows\System32> usbip list -l
    - busid 1-31 (045e:096f)
      Microsoft Corp. : unknown product (045e:096f)
    - busid 1-249 (2a45:0c02)
      Meizu Corp. : MX Phone (MTP & ADB) (2a45:0c02)
    - busid 1-50 (0cf3:e302)
      Atheros Communications, Inc. : unknown product (0cf3:e302)
    
    PS C:\Windows\System32> usbip bind -b 1-249
    usbip: info: bind_device: bind device on busid 1-249: complete
    

Record steps to reproduce the problem:

  1. Start usbipd.exe:
PS C:\Windows\System32> usbipd --debug
usbipd: info: starting usbipd (usbip 1.0.0)
usbip: debug: C:\work\usbip-win\userspace\src\usbipd\usbipd_sock.c:38:[build_sockfd] opening :::3240
usbip: info: listening on :::3240
usbip: debug: C:\work\usbip-win\userspace\src\usbipd\usbipd_sock.c:38:[build_sockfd] opening 0.0.0.0:3240
usbip: info: listening on 0.0.0.0:3240
  1. Execute usbip attach -r $winHost -b 1-249 on WSL2:
usbip attach -r $winHost -b 1-249
usbip: error: import device

Here are debug infomations of usbip client & server:

usbipd.exe --debug:

usbip: info: connection from 172.27.223.175:46938
usbip: info: recv_pdu: received request: 0x8003 - attach device
usbip: debug: C:\work\usbip-win\userspace\src\usbipd\usbipd_import.c:18:[forwarder_stub] stub forwarding started
usbip: debug: C:\work\usbip-win\userspace\src\usbipd\usbipd_import.c:108:[recv_request_import] import request busid 1-249: complete
usbip: info: recv_pdu: request 0x8003: complete
usbip: debug: C:\work\usbip-win\userspace\src\usbipd\usbipd_import.c:28:[forwarder_stub] stub forwarding stopped

usbip --debug attach -r $winHost -b 1-249:

usbip: debug: usbip.c:141:[run_command] running command: `attach'
libusbip: debug: vhci_driver.c:269:[usbip_vhci_driver_open] available ports: 16
libusbip: debug: vhci_driver.c:281:[usbip_vhci_driver_open] available controllers: 1
libusbip: debug: vhci_driver.c:128:[refresh_imported_device_list] controller 0
libusbip: debug: vhci_driver.c:68:[parse_status] hub hs port 0 status 4 speed 0 devid 0
libusbip: debug: vhci_driver.c:69:[parse_status] sockfd 0 lbusid 0-0
libusbip: debug: vhci_driver.c:68:[parse_status] hub hs port 1 status 4 speed 0 devid 0
libusbip: debug: vhci_driver.c:69:[parse_status] sockfd 0 lbusid 0-0
libusbip: debug: vhci_driver.c:68:[parse_status] hub hs port 2 status 4 speed 0 devid 0
libusbip: debug: vhci_driver.c:69:[parse_status] sockfd 0 lbusid 0-0
libusbip: debug: vhci_driver.c:68:[parse_status] hub hs port 3 status 4 speed 0 devid 0
libusbip: debug: vhci_driver.c:69:[parse_status] sockfd 0 lbusid 0-0
libusbip: debug: vhci_driver.c:68:[parse_status] hub hs port 4 status 4 speed 0 devid 0
libusbip: debug: vhci_driver.c:69:[parse_status] sockfd 0 lbusid 0-0
libusbip: debug: vhci_driver.c:68:[parse_status] hub hs port 5 status 4 speed 0 devid 0
libusbip: debug: vhci_driver.c:69:[parse_status] sockfd 0 lbusid 0-0
libusbip: debug: vhci_driver.c:68:[parse_status] hub hs port 6 status 4 speed 0 devid 0
libusbip: debug: vhci_driver.c:69:[parse_status] sockfd 0 lbusid 0-0
libusbip: debug: vhci_driver.c:68:[parse_status] hub hs port 7 status 4 speed 0 devid 0
libusbip: debug: vhci_driver.c:69:[parse_status] sockfd 0 lbusid 0-0
libusbip: debug: vhci_driver.c:68:[parse_status] hub ss port 8 status 4 speed 0 devid 0
libusbip: debug: vhci_driver.c:69:[parse_status] sockfd 0 lbusid 0-0
libusbip: debug: vhci_driver.c:68:[parse_status] hub ss port 9 status 4 speed 0 devid 0
libusbip: debug: vhci_driver.c:69:[parse_status] sockfd 0 lbusid 0-0
libusbip: debug: vhci_driver.c:68:[parse_status] hub ss port 10 status 4 speed 0 devid 0
libusbip: debug: vhci_driver.c:69:[parse_status] sockfd 0 lbusid 0-0
libusbip: debug: vhci_driver.c:68:[parse_status] hub ss port 11 status 4 speed 0 devid 0
libusbip: debug: vhci_driver.c:69:[parse_status] sockfd 0 lbusid 0-0
libusbip: debug: vhci_driver.c:68:[parse_status] hub ss port 12 status 4 speed 0 devid 0
libusbip: debug: vhci_driver.c:69:[parse_status] sockfd 0 lbusid 0-0
libusbip: debug: vhci_driver.c:68:[parse_status] hub ss port 13 status 4 speed 0 devid 0
libusbip: debug: vhci_driver.c:69:[parse_status] sockfd 0 lbusid 0-0
libusbip: debug: vhci_driver.c:68:[parse_status] hub ss port 14 status 4 speed 0 devid 0
libusbip: debug: vhci_driver.c:69:[parse_status] sockfd 0 lbusid 0-0
libusbip: debug: vhci_driver.c:68:[parse_status] hub ss port 15 status 4 speed 0 devid 0
libusbip: debug: vhci_driver.c:69:[parse_status] sockfd 0 lbusid 0-0
libusbip: debug: vhci_driver.c:104:[parse_status] exit
usbip: debug: usbip_attach.c:112:[import_device] got free port 0
libusbip: debug: vhci_driver.c:367:[usbip_vhci_attach_device2] writing: 0 3 65785 0
libusbip: debug: vhci_driver.c:372:[usbip_vhci_attach_device2] attach attribute path: /sys/devices/platform/vhci_hcd.0/attach
usbip: debug: sysfs_utils.c:24:[write_sysfs_attribute] error writing to attribute /sys/devices/platform/vhci_hcd.0/attach
libusbip: debug: vhci_driver.c:376:[usbip_vhci_attach_device2] write_sysfs_attribute failed
usbip: error: import device
@CodemanVAN
Copy link

I meet the same error

@PandaWei
Copy link

PandaWei commented Jul 9, 2024

same error, is there any solution?

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