User Tools

Site Tools

This wiki is read only and for archival purposes only. >>>>>>>>>> Please use the new OpenWrt wiki at <<<<<<<<<<


This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
doc:howto:usb.iptunnel [2013/01/23 18:59]
claudyus example as server
doc:howto:usb.iptunnel [2016/06/17 13:58] (current)
Jacobbee [Notes]
Line 1: Line 1:
 +====== USB over IP tunnel ======
 +USB/IP Project aims to develop a general USB device sharing system over IP network. To share USB devices between computers with their full functionality,​ USB/IP encapsulates "USB I/O messages"​ into TCP/IP payloads and transmits them between computers.
 +| :!: This is reported to be working, but we lack a HowTo yet! |
 +===== Server on OpenWrt =====
 +**Since Barrier Breaker release USBIP packets are missing - there'​s difference in installation procedure**
 +First install the usb kernel module and usbip server and client packages:
 +//Attitude Adjustment://​
 +opkg install kmod-usb-ohci usbip-server usbip-client
 +//Barrier Breaker + Chaos Calmer://
 +opkg install kmod-usb-ohci
 +opkg install http://​​attitude_adjustment/​12.09/​ar71xx/​generic/​packages/​usbip_1.1.1-2_ar71xx.ipk
 +opkg install http://​​attitude_adjustment/​12.09/​ar71xx/​generic/​packages/​usbip-client_1.1.1-2_ar71xx.ipk
 +opkg install http://​​attitude_adjustment/​12.09/​ar71xx/​generic/​packages/​usbip-server_1.1.1-2_ar71xx.ipk
 +(The packages are installed from AA, but kernel modules would be installed from BB automatically to match kernel ver)
 +Now use ''​usbip list -l''​ to list the local usb devices available that can be exported. In the following example a hub, usb printer, and an optical mouse are shown:
 +root@OpenWrt:​~#​ usbip list -l
 +Local 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
 +The information that you are looking for is **2-2**, which is the BUSID for the target device (an optical mouse).\\
 +Edit ''/​etc/​rc.local''​ and before the ''​exit 0''​ add the following lines:
 +usbipd -D &
 +sleep 1
 +usbip bind -b 2-2
 +Use ''​netstat''​ to see if everything works:
 +root@OpenWrt:​~#​ netstat -alpt
 +Active Internet connections (servers and established)
 +Proto Recv-Q Send-Q Local Address ​          ​Foreign Address ​        ​State ​      ​PID/​Program name    ​
 +tcp        0      0​3240 ​ ​* ​              ​LISTEN ​     927/usbipd
 +===== Client side (Arch-linux PC) =====
 +Install **usbip** in your PC
 +<​code>​[root@tool dani]# pacman -S usbip</​code>​
 +Load the module for the client
 +<​code>​[root@tool dani]# modprobe vhci_hcd</​code>​
 +List the available remote devices at OpenWrt (server side). ​
 +<​code>​[root@tool dani]# usbip list -r
 +Exportable USB devices
 + -
 +        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)
 +Attach the remote device
 +<​code>​[root@tool dani]# usbip attach -r -b 2-2</​code>​
 +If all went fine now you can move the mouse on your pc, but attached to the router with OpenWrt.
 +===== Client side (Windows PC (incl. W7 x64) =====
 +Solution consists of 2 parts:
 +1. Install Driver
 +2. Start usbip tool
 +1. Installing a driver could be a challenge - there is a signed drivers, included in 0.200 version of tool. Unfortunately the don't work anymore. at least for Win7 x64. Look through USBIP forum to find the latest compiled driver and tool. Unfortunately the Driver is not signed and in order to install it, you have to switch off Windows drivers signature check.
 +a)Download the working Driver and usbip tool here: [[http://​​p/​usbip/​discussion/​418507/​thread/​86c5e473/​]]
 +b)Disable Windows Drivers check:
 +    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://​​167723/​how-to-disable-driver-signature-verification-on-64-bit-windows-8.1-so-that-you-can-install-unsigned-drivers/​]]
 +    And then restart Windows.
 +2. Use the tool usbip.exe, downloaded with the working driver.
 +a) usbip -l <HOST IP address> ​               to show all USB devices binded on the HOST
 +b) usbip -a <HOST IP address> <​BUSID> ​       to connect to particular Device.
 +:-D Tested on BB release. Working at least with USB Drives and Kvaser Leaf Lite CAN gateway.
 +===== Notes =====
 +  * http://​​how-to-set-up-a-usb-over-ip-server-and-client-with-ubuntu-10.04
 +  * [[https://​​ticket/​5590|#​5590]]
 +  * [[http://​​]]
 +  * [[https://​​ticket/​9953|#​9953]] (usbip server on OpenWRT fails after client tries to attach device) also features a small how to.
 +  * [[http://​​usb-over-ip/​ | USB over IP]] - the other solution to access USB over IP network.