Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Is there a product that can be plugged into a computer and appear as a USB flash drive, while in reality it is also say a Samba / FTP server? Along the lines of the Eye-Fi card (www.eye.fi), but wired and more configurable. It could also be a special data-transfer cable allowing one connect a complete separate networked computer. The targeted computer must only see a USB stick, no special drivers, no network configuration changes must be required on this computer.

Clarification_001: The targeted computer (or embedded device) must be able to write to this USB “stick”. However it would be ok if the data were visible on the network with some delay, say few minutes. This magic stick could copy between the flash & network in batch mode, every few minutes. BTW: My immediate need is to harvest logs from hard-to-network embedded device.

Clarification_002: Further research brought me to devices called "USB Bus/Protocol Analyzers".
like: http://www.ellisys.com/products/usbex200/index.php These would probably do the job. They are expensive ($800-$3000++). Internally, they must duplicate the USB data, I infer that the device I am looking for should cost under $500.

TIA, Radim

share|improve this question

closed as too localized by Mark Henderson Jan 15 '12 at 5:27

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
That's an interesting concept. +1 –  Matt Simmons Jun 19 '09 at 1:29
    
That's a new one to me. I doubt anything of the like exists. I think you've got an idea for a product. USB memory sticks are block devices and you're talking about connecting to exported filesystems (not block devices), so there's an impedence mismatch there. Your hypothetical device could make calls in / out of a large file that, if loopback mounted (to use the Linux terminology) has a filesystem inside it. Kind of a mind-bending idea for a device. Get somebody to develop it... I could see using it in digital picture frames. (BTW: The Eye-Fi doesn't work like you think it does.) –  Evan Anderson Jun 19 '09 at 1:35
    
I like that you're trying to hack some device to do something it wasn't designed for-- turning some data logger into a networked data logger, or something of that ilk. You're going to need hardware hacking to get this done, but it would be an awesome product if you did get somebody to build one. –  Evan Anderson Jun 19 '09 at 2:42
    
Just to clarify, you want what is written to the USB device to also be written to a share or FTP site? You do not want a USB device that is, itself, a Samba server or FTP server, correct? –  Kevin Kuphal Jun 19 '09 at 3:08
    
@radim: Put me on a list to notify if you get this thing rolling as a product. I'd love to be a beta tester, etc. This thing sounds like a really fun idea. –  Evan Anderson Jun 23 '09 at 15:00

2 Answers 2

up vote 2 down vote accepted

You got me interested in this one. I can't find you an "off the shelf" solution, but I've got a lead on hardware and a rough idea of an implementation. (The pricing might be outside what you're looking for, but you might be able to get a quantity deal if this is for a real production device.)

The PLX NET2280 USB controller chip supported target mode. It's been replaced with the NET2282, and you can find more about it here: http://www.plxtech.com/2282

The Linux "USB Gadget" API supports this controller. There's a "rapid development kit" available with the controller on a PCI card all ready to go.

Assuming that the device you're trying to talk to is using the FAT filesystem (lowest common denominator for embedded devices using USB storage, typically), you could implement a virtual FAT volume and access it with a loopback mount on a Linux machine when it's not in use by the USB host. Since FAT isn't a multi-writer filesystem, you're going to have to implement some kind of protocol to handle contention between the host and the target. I'd export a file as the FAT volume to the USB host, and watch for write access to the volume becoming quiescent for a period of time, at which point I'd swoop in and make changes.

There's a good chance your target is caching (or, at the very least, assuming that the state of the USB storage isn't going to change out from under it). A possible "out" for that is as follows: If the host you're plugging into doesn't have a problem with the target "disappearing" and "reappearing" you could "unplug" during a quiescent period as described above, then immediately "plug in" with a new empty filesystem all ready to go.

If this is meant for general purpose use with any USB host you'll always have compatibility problems with some devices who don't expect anything to be on the USB target other than dumb storage. (It'd be interesting to see how the Eye-Fi gets around this.) OTOH, if you're doing this for a single-purpose use you could probably get pretty intimate with the host device's code and figure out how best to interact with it.

What a fun idea. Not really a "Server Fault" thing, per se, but fun nonetheless! To get this going, I think you're going to need some hardcore USB hackers who are familiar with working in the embedded space.

share|improve this answer
    
Could Nokia N810 give me the hardware I need? It has a USB-slave-port, it runs linux. I am a software engineer (a physicist by education), I would definitely welcome off-the-shelf hardware. –  radim Jul 8 '09 at 20:29
    
I wondered, while I was posting that, about some of these PDA's and other devices have USB target capabilities. I can't really say anything re: the Nokia N810 in terms of personal experience since I've never even seen one, but the specs lead me to believe that it looks like it would do what you need. –  Evan Anderson Jul 8 '09 at 21:07

Yes - this should be quite possible, as long as you have no requirement to see the same storage on the computer as you do on the network.

If you do want to see the same thing, such a configuration would require some sort of multimount filesystem. You're trying to export the same data both via a network filesystem protocol and block level.

You might be able to get away with it (more or less) if the storage device only allowed the computer to mount its storage read-only. It would work most of the time :)

share|improve this answer
1  
I'd like to hear how you're going to plug into a host USB port to simulate being the "thumb drive" part of the equation using off the shelf hardware. Everything else you said basically makes sense, but I don't know of easily available interfaces to allow a PC to act as a USB device to be plugged into a USB host. It sure would be neat, though. (Personally, I'd implement that thing that some MacOS did where the whole machine could act like a firewire disk drive. That was fairly sweet-- ya' know-- for being from Apple.) –  Evan Anderson Jun 19 '09 at 2:40
    
I figured the thumb drive requirement. What I'd like to know is how is this useful. Why not just plug in an external drive or a HDD enclosure. Are we short of such external storage and have lots of spare machines running? (we should probably move this conversation to serverfault at least). –  nik Jun 19 '09 at 2:46
    
The poster's "need" is a hack. It's actually very similiar to the hack that the Eye-Fi does. –  Evan Anderson Jun 19 '09 at 2:49
    
Is this the product of interest? ferret.com.au/c/Glyn-High-Tech-Distribution/… –  nik Jun 19 '09 at 2:50
    
@nik (myself), for some reason i thought i was answering on SO! sorry for that distracting last comment. –  nik Jun 19 '09 at 2:52

Not the answer you're looking for? Browse other questions tagged or ask your own question.