WSL默认是不支持直连USB设备的, 通常通过开源项目usbipd-win实现USB设备的共享. usbipd-win能够将连接至本地的USB设备共享给包括虚拟机, WSL2在内的其他主机, 使其能够与USB设备进行交互. 在Windows下可以通过系统自带的包管理器winget实现对usbipd的安装. wingetinstallusbipd 关于usbipd的使用也非常简单, 通过us...
https://github.com/dorssel/usbipd-win usbipd list 可以查看连接到win上的设备。 把USB设备从win转移到WSL需要执行下面两个指令。 usbipd bind --busid <BUSID> usbipd attach --wsl --busid <busid> Before attaching the USB device, the commandusbipd bindmust be used to share the device, allo...
make menuconfig KCONFIG_CONFIG=Microsoft/config-wsl 进入Device Drivers->USB support->Support for Host-side USB,选中USB Mass Storage support(*号是直接编译进内核,M是编译为内核模块,内核模块需要手动加载),把下面弹出来的一堆驱动都选上,保存完之后就可以退出了。 5B2688B6-6ED1-4527-959D-4954D9179CF3 ...
WSL 本身并不支持连接 USB 设备,因此你需要安装开源 usbipd-win 项目。 内核要求 若要将 USBIPD 与适用于 Linux 的 Windows 子系统 (WSL) 配合使用,则需要具有Linux 内核版本 5.10.60.1 或更高版本。 如果已安装的内核版本低于 5.10.60.1,则可以通过使用wsl --shutdown先关闭 WSL 的任何正在运行的实例,然后...
Device Driver->USB support 需要加入的配置 编译 # 生成的kernel镜像在 arch/x86/boot/bzImage make -j$(nproc) bzImage KCONFIG_CONFIG=Microsoft/config-wsl 把bzImage拷贝到C:\Users\{username}\ (可以拷到任意文件夹跟下面配置的地址对应就可以) ...
输入usbipd wsl list回车,查看USB设备: PSC:\\Users\\qinyunti > usbipd wsl listBUSIDVID:PID DEVICE STATE2-3046d:c542USB 输入设备 Not attached2-6174f:1811Integrated Camera, Integrated IR Camera, Camera DFU Device Not attached2-100bda:4853Realtek BluetoothAdapter Not attached3-31a86:7523USB-SE...
To check if the USB device has been attached to WSL, in WSL, run: lsusb The result shows: Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 002: ID 1366:0101 SEGGER J-Link PLUS Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub ...
In case the command line interface isn't your forte, you can givewsl-usb-guia try. It's an unofficial GUI wrapper around the usbipd-win binary, which greatly simplifies the USB device listing and interoperability between the host OS and the WSL instance. ...
I'm on Windows 11 and using WSL2 with Ubuntu-20.04. In July 2023 I followed the instructions at Connect USB devices usbipd to attach an FTDI to USB device. I did it successfully for several months. After several months of not attaching a...
You should see the device you just attached and be able to interact with it using normal Linux tools. Depending on your application, you may need to configure udev rules to allow non-root users to access the device. Once you are done using the device in WSL, you can either physically di...