6

I have a router that a printer can be attached to to print wirelessly to. It appears that the software for Windows uses a virtual USB bus using TCP. This allows the printer to appear as if it was plugged directly into the computer.

Windows device driver

Is it possible to create a virtual USB bus using TCP on Ubuntu or is this a custom protocol used by the router and Windows software?

2
  • Further to my comments below - I see from your other question this is a WNDR4500. I have a DGND3700 which is quite different, but some things are the same. You might get some answers if you enable the telnet console on this device and poke around in the system, though this is quite advanced stuff, and you can break it if you're not careful. Dec 8, 2012 at 1:12
  • @AlistairBuxton Thanks for the suggestion and warning, but it's my dad's router, so I don't want to risk breaking it.
    – iBelieve
    Dec 12, 2012 at 15:03

1 Answer 1

4
+50

This is potentially a custom/proprietary protocol used by your router and the software designed by the manufacturer.

However, USB over IP is a thing and it can be used on Ubuntu. Assuming your router is using the standard USB over IP and not a custom protocol, this page (paraphrased below for anyone who finds this through google) should help you set it up.

  1. Install usbip

    sudo apt-get install usbip

  2. Load the vhci-hcd kernel module

    modprobe vhci-hcd

  3. Check if it really got loaded

    lsmod | grep vhci_hcd

    (Your out should be similar to below)

    root@client1:~# lsmod | grep vhci_hcd
    vhci_hcd               19800  0
    usbip_common_mod       13605  1 vhci_hcd
    root@client1:~#
    
  4. (optional) Add module to load on boot

    sudo echo vhci-hcd >> /etc/modules

  5. Connect to the server (your router) and get a list of devices.

    usbip -l serverip

    Replace serverip with the IP address of your router.

    Example output:

    root@client1:~# usbip -l 192.168.0.100
    - 192.168.0.100
         1-1: SanDisk Corp. : Cruzer Micro Flash Drive (0781:5151)
            : /sys/devices/pci0000:00/0000:00:07.2/usb1/1-1
            : (Defined at Interface level) (00/00/00)
            :  0 - Mass Storage / SCSI / Bulk (Zip) (08/06/50)
    

    Note the designation of the USB device you want to use (1-1 in this example).

  6. Attach the remote device to the local computer.

    usbip -a serverip designation
    

    e.g.

    usbip -a 192.168.12.34 1-1
    

    The remote device should now be attached locally to your computer. You should see it listed if you execute lsusb from the terminal.

5
  • Thanks for your help. When I get to the usbip -l 192.168.1.1 part, I get this message - 192.168.1.1 failed. When I go to the router's IP address in a web browser, I'm prompted for the user name and password to administer the router. Is this the reason the command is failing or is it because the device doesn't support the standard protocol?
    – iBelieve
    Dec 6, 2012 at 13:56
  • 1
    I came across this question. Would the bug it mentions affect me?
    – iBelieve
    Dec 6, 2012 at 14:16
  • With regards 'proprietary protocols' - I would say it is unlikely. Many of the high-end routers which have features like this run Linux inside so there is a good chance it uses usbip. Telling us the make of router might help. Dec 7, 2012 at 22:00
  • 1
    And yes, looks like that bug may affect you. Dec 7, 2012 at 22:04
  • I just tried the instructions given above. No only did it not work, it also hard locked my machine a couple of seconds later. Dec 7, 2012 at 22:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .