WSL中想要连接公司的开发板
WSL的操作,在微软网站上最权威了。
看这里: 连接 USB 设备
执行到下面的时候,会有错误提示
usbipd wsl attach --busid 5-4
usbipd: error: WSL kernel is not USBIP capable; update with 'wsl --update'
处理:
wsl --update
wsl --shutdown
- 重新以管理员模式打开 PowerShell
Ubuntu中查看usb设备
lsusb
# PowerShell
PS C:\Users\Think> usbipd wsl attach --busid 5-4
usbip: error: Attach Request for 5-4 failed - Device busy (exported)
usbipd: error: Failed to attach device with busid '5-4'.
PS C:\Users\Think> ipconfig
Windows IP 配置
以太网适配器 vEthernet (Default Switch):
连接特定的 DNS 后缀 . . . . . . . :
本地链接 IPv6 地址. . . . . . . . : fe80::dd9f:747e:67d3:dd55%13
IPv4 地址 . . . . . . . . . . . . : 172.27.192.1
子网掩码 . . . . . . . . . . . . : 255.255.240.0
默认网关. . . . . . . . . . . . . :
#Ubuntu
user@DESKTOP-3QLDUKM:~$ sudo usbip list --remote 172.17.96.1
Exportable USB devices
======================
- 172.17.96.1
5-4: Google Inc. : Nexus 4 (debug) (18d1:d002)
: USB\VID_18D1&PID_D002\6&12DC5A37&0&4
: (Defined at Interface level) (00/00/00)
: 0 - Vendor Specific Class / unknown subclass / unknown protocol (ff/42/01)
user@DESKTOP-3QLDUKM:~$ sudo usbip attach --remote=172.17.96.1 --busid=5-4
usbip: error: Attach Request for 5-4 failed - Device busy (exported)
其他设备可以attach到WSL的Ubuntu上的,只有这个开发板不成,疑问保留吧。