现在usbip项目是2.0版本了,包括openwrt官网内置的,都是2.0了。windows端版本使用的是这个: https://github.com/cezuni/usbip-win USB/IP 项目旨在开发一个基于 IP 网络的通用 USB 设备共享系统。为了在计算机之间共享具有全部功能的 USB 设备,USB/IP 将“USB I/O 消息”封装到 TCP/IP 负载中,并在计算机之间传输它们。
OpenWrt 上的服务器 由于 Barrier Breaker 释放 USBIP 数据包丢失 - 安装过程存在差异 首先安装 usb 内核模块以及 usbip 服务器和客户端包: 姿态调整: opkg install kmod-usb-ohci usbip-server usbip-client破障者 + 混沌镇定者: opkg install kmod-usb-ohciopkginstall http://downloads.openwrt.org/att ... .1-2_ar71xx.ipkopkg install http://downloads.openwrt.org/att ... .1-2_ar71xx.ipkopkg install http://downloads.openwrt.org/att ... _1.1.1-2_ar71xx.ipk(软件包是从 AA 安装的,但内核模块会自动从 BB 安装以匹配内核版本) 现在用于列出可导出的可用本地 USB 设备。在以下示例中,显示了集线器、USB 打印机和光学鼠标:usbip list -l root@OpenWrt:~# usbip list -lLocal USB devices================= - busid 2-1 (05e3:0608) 2-1:1.0 -> hub - busid 2-1.4 (04e8:344f) 2-1.4:1.0 -> unknown 2-1.4:1.1 -> unknown - busid 2-2 (093a:2510) 2-2:1.0 -> unknown 您要查找的信息是 2-2,这是目标设备(光电鼠标)的 BUSID。 usbipd -D &sleep 1usbip bind -b 2-2编辑 ,然后在 之前添加以下几行:/etc/rc.localexit 0 用于查看是否一切正常:netstat root@OpenWrt:~# netstat -alptActive Internet connections (servers and established)Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:3240 0.0.0.0:* LISTEN 927/usbipd客户端 (Arch-linux PC) 在您的 PC 上安装 usbip [root@tool dani]# pacman -S usbip为客户端加载模块 [root@tool dani]# modprobe vhci_hcd在 OpenWrt(服务器端)列出可用的远程设备。 [root@tool dani]# usbip list -r 192.168.1.1Exportable USB devices====================== - 192.168.1.1 2-2: Pixart Imaging, Inc. : Optical Mouse (093a:2510) : /sys/devices/platform/bcm63xx_ohci.0/usb2/2-2 : (Defined at Interface level) (00/00/00) : 0 - Human Interface Device / Boot Interface Subclass / Mouse (03/01/02) 连接远程设备 [root@tool dani]# usbip attach -r 192.168.1.1 -b 2-2如果一切正常,现在您可以将鼠标移动到 PC 上,但使用 OpenWrt 连接到路由器。 客户端 (Windows PC (包括 W7 x64) 解决方案由 2 部分组成: 1. 安装驱动程序 2. 启动 usbip 工具 1. 安装驱动程序可能是一个挑战 - 有一个签名的驱动程序,包含在 0.200 版本的工具中。不幸的是,它们不再起作用了。至少对于 Win7 x64 来说是这样。浏览 USBIP 论坛以查找最新编译的驱动程序和工具。不幸的是,驱动程序未签名,为了安装它,您必须关闭 Windows 驱动程序签名检查。 a) 在此处下载可用的驱动程序和 usbip 工具:http://sourceforge.net/p/usbip/discussion/418507/thread/86c5e473/ b) 禁用 Windows 驱动程序检查: Open a command prompt as an admin and type: bcdedit -set loadoptions DISABLE_INTEGRITY_CHECKS bcdedit -set TESTSIGNING ON NOTE: Turning off driver signing is a security risk. If it doesn't work, for whatever reason, you can just remove loadoptions with bcedit and >switch testsigning off, though this is not recommended: bcdedit /deletevalue loadoptions bcdedit -set TESTSIGNING OFF For Windows 8.1, use the details on this page: [[http://www.howtogeek.com/167723/ ... l-unsigned-drivers/]] And then restart Windows.2. 使用与工作驱动程序一起下载的工具usbip.exe。
![]() 笔记
|
欢迎光临 谷动谷力 (http://bbs.sunsili.com/) | Powered by Discuz! X3.2 |