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.

相关推荐
sramdram12 小时前
基于MCU微控制器的高速无感FOC吸尘器解决方案
mcu·微控制器·mcu微控制器
云空2 天前
《ARM Cortex‑M 系列完整梳理》
stm32·单片机·嵌入式硬件·mcu
时光の尘4 天前
【凌鸥LKS32】基础篇(二)·Timer定时器实现LED闪烁
单片机·mcu·物联网·iot·timer·lks07
小渔村的拉线工4 天前
1.HPM6E80 解析芯片整体工作原理和存储架构
单片机·嵌入式硬件·mcu·架构·hpm6e80
光子物联单片机5 天前
STM32传感器模块编程实践(二十一)DIY语音控制小车套件模型
c语言·stm32·单片机·嵌入式硬件·mcu
jianqiang.xue5 天前
系统服务层设计:沉淀通用能力,让业务层只专注业务
stm32·单片机·嵌入式硬件·mcu·物联网·esp32
156082072195 天前
飞腾D2000接入外部时钟HYM8563芯片调试
驱动开发·嵌入式硬件·mcu
亿道电子Emdoor7 天前
【Arm】MSP和PSP的区别简介
c语言·arm开发·单片机·mcu
国产HT1621B7 天前
YL1650 LED驱动芯片详解:从原理到实战应用(附51单片机驱动代码)
stm32·单片机·嵌入式硬件·mcu·fpga开发·lcd驱动
李永奉7 天前
中科蓝讯SDK开发-开启串口Debug打印调试教程
单片机·嵌入式硬件·mcu·物联网·电脑