• windows usbip(瑞芯微windows开发)


    Rockchip RK3588 windows开发

    安装usbipd

    除usbipd之外,还有一个usbip仓库可以参考usbip-win,但是相对麻烦一些

    windows install
    winget install usbipd
    
    • 1
    Share Devices
    usbipd --help
    usbipd list
    usbipd bind --busid=
    
    • 1
    • 2
    • 3
    Remote Connecting Devices
    > usbip list --remote=<HOST>
    > usbip list -r 172.16.5.111 (例子)
    
    Exportable USB devices
    ======================
     - 172.16.5.111
            1-9: Fuzhou Rockchip Electronics Company : unknown product (2207:0006)
               : USB\VID_2207&PID_0006\5&17411534&0&9
               : (Defined at Interface level) (00/00/00)
               :  0 - Vendor Specific Class / unknown subclass / unknown protocol (ff/42/01)
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    > sudo usbip attach --remote= --busid=
    报错
    libusbip: error: udev_device_new_from_subsystem_sysname failed
    usbip: error: open vhci_driver
    
    • 1
    • 2
    • 3
    • 4

    检查 vhci_hcd 模块: 确保 vhci_hcd 模块已加载

    lsmod | grep vhci_hcd
    sudo modprobe vhci_hcd
    
    • 1
    • 2
    wsl2(注意升级wsl2版本)

    windows上运行

    wsl --update
    
    • 1

    wsl2内运行

    sudo apt install linux-tools-virtual hwdata
    sudo update-alternatives --install /usr/local/bin/usbip usbip `ls /usr/lib/linux-tools/*/usbip | tail -n1` 20
    
    • 1
    • 2

    注意:下面的代码是运行在windows上,而不是wsl2上

    usbipd wsl --help
    usbipd wsl list
    usbipd wsl attach --busid=
    
    • 1
    • 2
    • 3
    • 绑定报错
    usbipd wsl attach --busid 1-9
    
    报错:
    usbipd: info: Using default WSL distribution 'Ubuntu-20.04'; specify the '--distribution' option to select a different one.
    usbip: error: Attach Request for 1-9 failed - Device busy (exported)
    
    usbipd: error: Failed to attach device with busid '1-9'.
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 关闭windows上adb.exe
    adb kill-server
    
    • 1
    • 取消绑定
    usbipd wsl detach --busid 1-9
    
    • 1

    wsl2中运行,可发现设备

    lsusb
    
    • 1

    在这里插入图片描述

    adb支持

    要注意的是必须使用sudo命令才能显示出设备

    > adb devices
    * daemon not running; starting now at tcp:5037
    * daemon started successfully
    List of devices attached
    
    > adb kill-server
    
    > sudo adb devices
    * daemon not running; starting now at tcp:5037
    * daemon started successfully
    List of devices attached
    5950907f        device
    
    > adb devices
    List of devices attached
    5950907f        device
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
  • 相关阅读:
    Python绘图系统24:绘图类型和坐标映射的关系
    腾讯云16核CPU服务器配置大全,CVM和轻量服务器
    运筹说 第76期 | 最短路问题
    C语言纳秒级计时
    7、IOC 之Bean定义继承 parent
    微信小程序开发(超详细保姆式教程)
    C#/VB.NET 创建PDF/UA文件
    SAP ABAP——数据类型(四)【TYPE系列关键字】
    【2014NOIP普及组】T3. 螺旋矩阵 试题解析
    虚拟数字人的商业价值
  • 原文地址:https://blog.csdn.net/qq_39280836/article/details/134437093