Usbip Windows 服务器和 Linux 客户端版本不匹配。如何匹配它们?

Usbip Windows 服务器和 Linux 客户端版本不匹配。如何匹配它们?

实际上我很喜欢 WSL2。我想在 WSL2 / Ubuntu 中使用我的 XBOX / KINECT。

为此,我需要使在 Linux 中运行的 usbip 客户端的 USB 端口与在 Windows 上运行的 usbip 服务器进行通信。这正是以下项目所做的:

https://github.com/cezanne/usbip-win

这些是我的电脑的 USB 设备地址:

usbip.exe list -l -

busid 1-129 (05e3:0608) Genesys Logic, Inc. : Hub (05e3:0608)
busid 1-167 (05e3:0608) Genesys Logic, Inc. : Hub (05e3:0608)

busid 1-149 (0480:a007) Toshiba America Inc : External Disk USB 3.0
(0480:a007)

busid 1-175 (2109:0813) VIA Labs, Inc. : unknown product (2109:0813)
busid 1-89 (2109:2813) VIA Labs, Inc. : unknown product (2109:2813)
busid 1-220 (25a7:fa23) unknown vendor : unknown product (25a7:fa23)
busid 1-177 (048d:8297) Integrated Technology Express, Inc. : unknown
product (048d:8297)
busid 1-122 (1058:0704) Western Digital Technologies, Inc. : My Passport
Essential (WDME) (1058:0704)
busid 1-43 (2109:0813) VIA Labs, Inc. : unknown product (2109:0813)
busid 1-144 (05ac:0250) Apple, Inc. : Aluminium Keyboard (ISO) (05ac:0250)
busid 1-184 (1058:25a3) Western Digital Technologies, Inc. : unknown
product (1058:25a3)
busid 1-218 (2109:2813) VIA Labs, Inc. : unknown product (2109:2813)
busid 1-209 (045e:02c4) Microsoft Corp. : unknown product (045e:02c4)
busid 1-181 (0480:a207) Toshiba America Inc : unknown product (0480:a207)
busid 1-29 (093a:2510) Pixart Imaging, Inc. : Optical Mouse (093a:2510)
busid 1-134 (0bc2:61b5) Seagate RSS LLC : unknown product (0bc2:61b5)
busid 1-158 (05ac:1006) Apple, Inc. : Hub in Aluminum Keyboard (05ac:1006)

我进行了真正的 Linux 安装,以了解我的 XBOX 的地址是什么:

[ 2.392735] usb 2-8: new SuperSpeed Gen 1 USB device number 4 using xhci_hcd
[ 2.413596] usb 2-8: New USB device found, idVendor=045e, idProduct=02c4,
bcdDevice= 1.00
[ 2.413596] usb 2-8: New USB device strings: Mfr=1, Product=2,
SerialNumber=4
[ 2.413597] usb 2-8: Product: Xbox NUI Sensor
[ 2.413597] usb 2-8: Manufacturer: Microsoft

根据这些信息,以下是我在 Windows 10 上所做的:

C:\Users\marietto2020\Desktop\WSL\Kinect\usbip-win (master -> origin)
λ usbip.exe bind -b 1-209
usbip: info: bind_device: bind device on busid 1-209: complete

C:\Users\marietto2020\Desktop\WSL\Kinect\usbip-win (master -> origin)
λ usbipd -d -4
usbipd: info: starting usbipd (usbip 1.0.0)
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

相反,这是我在 Ubuntu 20 上所做的:

root@DESKTOP-N9UN2H3:/mnt/c/Users/marietto2020/Desktop/WSL/WSL/Ubuntu-KVM/WSL2-Linux-Kernel/tools/usb/usbip#
usbip attach -r 192.168.1.6 -b 1-209
usbip: error: Attach Request for 1-209 failed - Request Completed
Successfully

当 Linux 客户端连接到 Windows 服务器时会发生以下情况:

usbip: info: connection from 192.168.1.6:51470
usbip: debug:
C:\work\usbip-win\userspace\lib\usbip_network.c:156:[usbip_net_recv_op_common]
version mismatch: 4353 273
usbip: debug:
C:\work\usbip-win\userspace\src\usbipd\usbipd_accept.c:18:[recv_pdu]
recv_pdu: could not receive opcode: 0

简而言之,如果协议版本不匹配,usbipd 会拒绝。事实上,我在 WSL2 中使用的 usbip 版本是:

root@DESKTOP-N9UN2H3:/mnt/i/macos-haxm# usbip version

usbip (usbip-utils 2.0)

相反,Windows 版本是 0.1.0,来自这里:

https://github.com/cezanne/usbip-win/releases

我该怎么做才能让它工作?有什么更简单的方法吗?在 Linux 或 Windows 中使用其他版本的 usbip 吗?

在哪里可以找到适用于 Windows 和 Linux 的 usbip 源代码?我想我需要找到匹配的版本。

我需要有人为 Windows 编译与我们在 WSL2 上运行的相同版本的 usbip,我猜是这个版本:

root@DESKTOP-N9UN2H3:/mnt/i/macos-haxm# usbip version
usbip (usbip-utils 2.0)

这超出了我的能力,也超出了我们很多人的能力。谢谢。

相关内容