WSL2 使用usbipd工具 连接USB设备

Connect USB devices | Microsoft Learn

使用开源工具usbipd,可以让usb设备连接WSL

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 command usbipd bind must be used to share the device, allowing it to be attached to WSL. This requires administrator privileges. Select the bus ID of the device you would like to use in WSL and run the following command. After running the command, verify that the device is shared using the command usbipd list again.
To attach the USB device, run the following command. (You no longer need to use an elevated administrator prompt.) Ensure that a WSL command prompt is open in order to keep the WSL 2 lightweight VM active. Note that as long as the USB device is attached to WSL, it cannot be used by Windows. Once attached to WSL, the USB device can be used by any distribution running as WSL 2. Verify that the device is attached using usbipd list. From the WSL prompt, run lsusb to verify that the USB device is listed and can be interacted with using Linux tools.

相关推荐
LeoZY_3 天前
CH347应用 USB转JTAG功能之:probe-rs搭配CH347下载MCU命令全指南
单片机·嵌入式硬件·mcu·开源·github
sramdram4 天前
基于MCU微控制器的电子血压计应用解决方案
单片机·嵌入式硬件·mcu·mcu微控制器
南岸的水5 天前
BMS国标充电解析
单片机·嵌入式硬件·mcu
sramdram5 天前
低功耗国产蓝牙芯片,蓝牙MCU方案
单片机·嵌入式硬件·mcu·蓝牙mcu·蓝牙方案
EMTime14 天前
玲珑GUI-工程设置
单片机·mcu·ui·用户界面
agathakuan15 天前
從零開始在家開發 IoT: Flash & Run 腳本解析(STM32 + WiFi HaLow)
stm32·mcu·iot
sramdram17 天前
基于国民32位MCU的无磁智能水表方案
mcu·32位mcu
十年编程老舅18 天前
读懂 MCU 启动:从上电到程序运行全链路
单片机·嵌入式硬件·mcu·嵌入式·cpu·嵌入式开发·ram
小麦嵌入式18 天前
PCB设计笔记(一):51核心板原理图(电源、晶振、复位)
stm32·单片机·嵌入式硬件·mcu·51单片机·硬件工程·pcb设计
李永奉19 天前
杰理SDK开发-【BUG】软件开启音量同步连接华为、荣耀手机没有自动开启音量同步
单片机·嵌入式硬件·mcu·物联网·智能手机·bug·语音识别