4

This is a weird one. Allow me to clarify, I have a Debian Linux file server - and I need to access some files from it. Usually, I would just use a network for this (wifi, ethernet, etc) but unfortunately the client computer can only access files over USB (the client is designed so that you can insert a USB flash drive, from which it reads).

Is there a way of making a USB drive pretend that it is a flash drive (or similar)? Perhaps that's phrased badly; to put it another way -- how do I make a USB port provide a file system instead of using it to access one?

Update: I forgot to mention that I'm using Debian Linux for the file system.

Nick Bolton
  • 5,126
  • 12
  • 54
  • 62
  • I know a Macintosh can do this with FireWire, but only on post. I'd be interested to see the answer to this, that would be damn handy even if you had to encapsulate it. – SpacemanSpiff Nov 27 '10 at 15:06
  • I'd also be interested to see any suggestions for what to search for; all of my Google searches so far have returned things like "How to install Debian on USB" or "How to format a flash drive" -- which is nothing like what I need. – Nick Bolton Nov 27 '10 at 15:08
  • I'm confused, do you have a USB drive you want to read or write files from/to? – Chopper3 Nov 27 '10 at 15:11
  • Chopper3, I need to connect computer A to computer B via a USB cable. Computer A has files, and computer B needs to read these files (it only supports reading from a flash drive or external hard drive). So computer A needs to "pretend" (so to speak) to be a flash drive or external drive. I cannot use network to do this since computer B is an embedded machine with no network support. – Nick Bolton Nov 27 '10 at 15:16
  • Very odd problem. I have two Ubuntu workstations I'm going to try this out with if I can find a cable. – gravyface Nov 27 '10 at 16:05

3 Answers3

6

I'm glad I didn't try this:

http://en.wikipedia.org/wiki/Direct_cable_connection#DCC_with_USB

DCC with USB

Connecting any two computers using USB requires a special proprietary bridge cable solution; the usual USB-to-USB cable does not work as USB does not support such type of communication and attempting to do so may even damage the connecting computers as it can short the two computers' power supplies together, possibly destroying one or both machines or causing a fire hazard. [3] Therefore, Direct Cable Connection over USB is not possible; a USB link cable must be used, as seen in the Microsoft knowledge base article 814982. However, with a USB link cable, a program which supports data transfer using that cable must be used. Typically, such a program is supplied with the USB link cable. The DCC wizard or Windows Explorer cannot be used to transfer files over a USB link cable.

EDIT

If this works, it would be the easiest method; depending on how much you value your time, spending $30-40 bucks on something like this would be the first route I'd take:

http://ca.startech.com/product/PCMACLINK2-USB-to-USB-Data-Transfer-Cable-for-Windows-and-Mac

...and this site references other data transfer USB cables/devices that are (likely) more Linux friendly:

http://www.linux-usb.org/usbnet/

More digging produced this; I've seen this referenced in several other forum threads: http://www.linux-usb.org/gadget/

It's an API that appears to put your host (server) into USB slave mode to emulate a mass storage device. Looks like it's non-trivial to implement (see "how much do you value your time").

After digesting all of this, is there any reason why you can't do the obvious and copy the files you need from the server to a USB pendrive/harddrive?

gravyface
  • 13,957
  • 19
  • 68
  • 100
1

I dont have a resolution for you. But it looks like this thread is on the right track.

dan.k
  • 81
  • 7
0

Every Android phone can do something like this. Plug it in a USB port, hit the unmount option, and it looks like a USB stick to the host computer. Some more digging around this area might turn up the answer you are looking for.

Porch
  • 680
  • 5
  • 12
  • Blackberry's can go into "Mass Storage Mode" as well, but likely that's some proprietary technology not available to the public. – gravyface Nov 27 '10 at 22:32