64

I have a USB device that reads data from a system and transfers them to the computer. I am wondering if it's possible to have a Linux single board PC (i.e. Raspberry Pi) to run a script and be a remote-server for my USB device and I can connect to that "remote-server"(Linux) through SSH or FTP or another protocol (over the Internet) and mount that USB port to my computer. Any software would do it, you know how terminal service connects the remote resources, and I need the same, but preferably on a Linux board.

My system is Windows 7, so I need to mount that remote-USB as a "local port" so the software thinks it's communicating locally, and it'll find the reader.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Caspian
  • 741
  • 1
  • 6
  • 4

1 Answers1

79

There is an open source project called usbip that provides functionality to share and/or mount a remote USB device over an IP network (LAN/Internet).

There are also at least three commercial products that provide this functionality with better documentation and UI. I've included links to the commercial products at the end of this reply.

From the usbip web page:

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. Original USB device drivers and applications can be also used for remote USB devices without any modification of them. A computer can use remote USB devices as if they were directly attached

The usbip server process runs on Linux systems and clients are available for Linux and Windows - the project has apparently been around since 2005, and they've had a signed Windows client driver since 2011. In theory, depending on the repositories configured on your Raspberry Pi, you should be able to execute sudo aptitude install usbip to install the server-side drivers and application.

Note that if you use Ubuntu 14.10 (Utopic Unicorn) or newer, you do not need to install the usbip package: the usbip tools are part of the linux-tools-generic package, and the binaries are already available in /usr/lib/linux-tools-KERNEL-VERSION/.

A walkthrough tutorial on how to install and use usbip is available at HowToForge:

The Windows client has advanced since the HowToForge tutorial and has a little more interface now instead of just a command-line tool.

Commercial USB-over-IP tools:

Fabula-Tech USB-over-Network - runs on Windows & Linux - trial available:

Eltima Software USB Network Gate - runs on Windows, Mac OS X, & Linux - trial available:

Incentives Pro/SimplyCore LLC USB Redirector - runs on Windows & Linux - apparently free for Linux server and a free Windows client is available:

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
MKartha
  • 891
  • 5
  • 4
  • +1 for the incentive-pro, it just works! where the usbip just does not compile out of the box on Ubuntu 14.04 – nhed Jun 16 '15 at 19:16
  • fresh ubuntu's don't have drivers for usbipd. more details: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/898003/comments/37 – Psychozoic Nov 17 '15 at 10:57
  • USB-IP project does not have signed win64 drivers, which mean their Windows client only can be used on XP-x64 or 32-bit Windows later versions // this problem also hurt Sandboxie project for few months, but they found a sponsor who signed their Win7+ drivers for them. Sadly USB-IP did not. – Arioch 'The Nov 25 '15 at 11:13
  • 2
    Incentives Pro/SimplyCore LLC USB Redirector - is an expectedly commercial: you can use free client to connect to paid server, or you can use paid client to connect to paid server, it is prohibited to connect by free client to free server. ( Tested in the field and covertly documented at http://www.incentivespro.com/purchase.html ) – Arioch 'The Nov 25 '15 at 11:15
  • Couldn't one use `netcap` to accomplish this? Cf. the question "[Converting serial port data to TCP/IP in a linux environment](https://stackoverflow.com/q/484740/1429450)." – Geremia Dec 26 '16 at 18:01
  • It's really a shame that USB/IP doesn't have a Windows version for the server. – Banderi Aug 25 '17 at 19:45
  • 2
    To add to what @Arioch'The said, the Incentives Pro [purchase page](http://www.incentivespro.com/purchase.html) says "**USB Redirector Client is FREE for connecting USB devices shared by USB Redirector on Windows [1]. Commercial license must be purchased for connecting USB devices shared by USB Redirector for Linux. [2]**". ~~~ The "USB Redirector on Windows" [1] is paid software and "USB Redirector for Linux. [2]" is free. – scooter Mar 04 '18 at 00:04
  • To add more, we wanted to move from Windows server to Linux server, so we asked USB Redirector vendor if they can change our Windows-Server license to equivalent Linux-server one, or better make that license universal, applicable to both Windows and Linux servers interchangeably, but sadly they refused, though promised to consider it for future versions some day – Arioch 'The Mar 05 '18 at 07:44